Department of Communication Engineering, NCTU 1 Unit 5 Programmable Logic and Storage Devices – RAMs and FPGAs.

Slides:



Advertisements
Similar presentations
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Advertisements

Lecture 15 Finite State Machine Implementation
Prith Banerjee ECE C03 Advanced Digital Design Spring 1998
Commercial FPGAs: Altera Stratix Family Dr. Philip Brisk Department of Computer Science and Engineering University of California, Riverside CS 223.
Reconfigurable Computing (EN2911X, Fall07) Lecture 04: Programmable Logic Technology (2/3) Prof. Sherief Reda Division of Engineering, Brown University.
COE 405 Design and Synthesis of DataPath Controllers Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Chapter 10. Memory, CPLDs, and FPGAs
Useful Things to Know Norm. Administrative Midterm Grading Finished –Stats on course homepage –Pickup after this lab lec. –Regrade requests within 1wk.
1 Lecture 16B Memories. 2 Memories in General Computers have mostly RAM ROM (or equivalent) needed to boot ROM is in same class as Programmable Logic.
The Spartan 3e FPGA. CS/EE 3710 The Spartan 3e FPGA  What’s inside the chip? How does it implement random logic? What other features can you use?  What.
Programmable logic and FPGA
Spring 2002EECS150 - Lec19-memory Page 1 EECS150 - Digital Design Lecture 18 - Memory April 4, 2002 John Wawrzynek.
Memory Taken from Digital Design and Computer Architecture by Harris and Harris and Computer Organization and Architecture by Null and Lobur.
1 Lecture 16B Memories. 2 Memories in General RAM - the predominant memory ROM (or equivalent) needed to boot ROM is in same class as Programmable Logic.
Registers and Shift Registers Discussion D8.2. D Flip-Flop X 0 Q 0 ~Q 0 D CLK Q ~Q D gets latched to Q on the rising edge of the clock. Positive.
Basic Computer Organization CH-4 Richard Gomez 6/14/01 Computer Science Quote: John Von Neumann If people do not believe that mathematics is simple, it.
Chapter 6 Memory and Programmable Logic Devices
Sequential circuits part 2: implementation, analysis & design All illustrations  , Jones & Bartlett Publishers LLC, (
Memory Technology “Non-so-random” Access Technology:
EKT 221 Digital Electronics II
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
ECE 2372 Modern Digital System Design
EKT 221 : Digital 2 Memory Basics
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
System Arch 2008 (Fire Tom Wada) /10/9 Field Programmable Gate Array.
CPLD (Complex Programmable Logic Device)
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 9 – Part 1.
Digital Electronics Chapter 7 Memory and Programmable Logic.
Lecture 9. MIPS Processor Design – Instruction Fetch Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education &
Programmable Logic Devices
Memory Devices May be classified as: Connections: ROM; Flash; SRAM;
Digital Logic Design Instructor: Kasım Sinan YILDIRIM
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Power-Aware RAM Processing for FPGAs December 9, 2005 Power-aware RAM Processing for FPGA Embedded Memory Blocks Russell Tessier University of Massachusetts.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Introduction to FPGA Created & Presented By Ali Masoudi For Advanced Digital Communication Lab (ADC-Lab) At Isfahan University Of technology (IUT) Department.
Basic Sequential Components CT101 – Computing Systems Organization.
 Seattle Pacific University EE Logic System DesignMemory-1 Memories Memories store large amounts of digital data Each bit represented by a single.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
CPLD Vs. FPGA Positioning Presentation
ESS | FPGA for Dummies | | Maurizio Donna FPGA for Dummies Basic FPGA architecture.
Overview von Neumann Architecture Computer component Computer function
Memory Devices 1. Memory concepts 2. RAMs 3. ROMs 4. Memory expansion & address decoding applications 5. Magnetic and Optical Storage.
Chapter 3: Dataflow Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 3-1 Chapter 3: Dataflow Modeling.
07/11/2005 Register File Design and Memory Design Presentation E CSE : Introduction to Computer Architecture Slides by Gojko Babić.
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #3 Flip-Flops, Registers, Shift registers, Counters, Memory 3/3/2005.
CS 1410 Intro to Computer Tecnology Computer Hardware1.
Gunjeet Kaur Dronacharya Group of Institutions. Outline I Random-Access Memory Memory Decoding Error Detection and Correction Read-Only Memory Programmable.
Introduction to Field Programmable Gate Arrays (FPGAs) EDL Spring 2016 Johns Hopkins University Electrical and Computer Engineering March 2, 2016.
FPGA Technology Overview Carl Lebsack * Some slides are from the “Programmable Logic” lecture slides by Dr. Morris Chang.
Digital Logic & Design Dr.Waseem Ikram Lecture No. 43.
Field Programmable Gate Arrays
Memories.
COMP211 Computer Logic Design
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Memory Units Memories store data in units from one to eight bits. The most common unit is the byte, which by definition is 8 bits. Computer memories are.
Lecture 15: Synthesis of Memories in FPGA
Chapter 11 Sequential Circuits.
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
Chapter 9: Sequential Logic Modules
SYNTHESIS OF SEQUENTIAL LOGIC
CSC 220: Computer Organization
part 2: implementation, analysis & design
ECE 551: Digital System Design & Synthesis
Optimizing RTL for EFLX Tony Kozaczuk, Shuying Fan December 21, 2016
Lecture 10: Sequential Blocks Arrays
Presentation transcript:

Department of Communication Engineering, NCTU 1 Unit 5 Programmable Logic and Storage Devices – RAMs and FPGAs

Department of Communication Engineering, NCTU 2 Unit 5-1 Static Random Access Memory (SRAM)

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 3 Reason for using random access memory (RAM)  Computers and other digital systems perform operations that retrieve, manipulate, transform and store data  Read only memories (ROMs) can not dynamically store data  Registers support fast and random storage, but cannot be used for mass storage because they are implemented with FFs and occupy too much physical area  RAM is faster and occupies less area than a register file Most RAMs are volatile- the information vanishes after power is removed from the device There are two types of RAMs: static and dynamic  Dynamic RAMs need refresh and static RAMs don’t

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 4 Basic static RAM (SRAM) structure Word EN Bit_line_N Bit_line cell Cell_N Word EN Bit_line_N Bit_line

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 5 module SRAM1 (data_out, data_in, CS_N,WE_N); outputdata_out; inputdata_in; inputCS_N, WE_N; wire data_out = (CS_N==0) ? (WE_N==0) ? data_in : data_out : 1’bz; endmodule Level-sensitive Verilog models of RAMs A 32K  8 SRAM data_out CS WE data_in CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT CS WE OE Mux Demux D_IN D_OUT Decoder data_in data_out

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 6 Basic static RAM (SRAM) structure A 16K SRAM module SRAM2 (data, CS_N,WE_N,OE_N); outputdata_out; inputCS_N, WE_N,OE_N; wire latch_out = ((CS_N==0) && (WE_N==0)&&(OE_N==1)) ? data : latch_out; assign data = ((CS_N==0) && (WE_N==1)&&(OE_N==0)) ? latch_out : 1’bz; endmodule data CS OE WE Column Input/Output A 10 A 9 A 0 A3A3A2A2A1A1A0A0A3A3A2A2A1A1A0A0 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0

Department of Communication Engineering, NCTU 7 Unit 5-3 Altera FPGA Architecture

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 8 Architecture of Stratix  Logic array blocks (LABs) : 10 logic elements (LEs) in each LAB  Memory block structures 512 RAM: simple dual-port memory blocks (512 +parity =576) M4K RAM: true dual-port memory blocks (4K + parity =4608) M-RAM: true dual-port memory blocks (512K+parity=589,824)  DSP blocks 9×9- or 18×18- or 36×36-bit multiplier with add and subtraction 18-bit input shift registers  I/O element (IOE) : contains a bidirectional I/O buffer and six registers Supports single-ended, differential I/O standards and external memory devices such as DDR-SDRAM

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 9

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 10 Logic elements (LE) : the smallest unit of logics in the Stratix architecture each of which contains :  A four-input LUT  A programmable register : can be configured for D, T, JK and SR FFs Asynchronous data,  Support single bit addition and subtraction

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 11

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 12

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 13

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 14

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 15

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 16

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 17

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 18

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 19 Single-Clock SRAM without read-through-write behavior module ram_infer (q, a, d, we, clk); output reg [7:0] q; input [7:0] d; input [6:0] a; input we, clk; reg [7:0] mem [127:0]; (posedge clk) begin if (we) mem[a] <= d; q <= mem[a]; // q doesn't get d in this clock cycle end endmodule clk we a A0A0 A1A1 A3A3 d d(A 0 ) + d(A 1 ) + d(A 3 ) + q d(A 1 ) d(A 0 ) A2A2 d(A 2 ) + d(A 2 )

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 20 Single-Clock SRAM with read-through-write behavior module ram_infer (q, a, d, we, clk); output [7:0] q; input [7:0] d; input [6:0] a; input we, clk; reg [6:0] read_add; reg [7:0] mem [127:0]; (posedge clk) begin if (we) mem[a] <= d; read_add <= a; end assign q = mem[read_add]; endmodule clk we a A0A0 A1A1 A3A3 d d(A 0 ) + d(A 1 ) + d(A 3 ) + q d(A 1 ) + d(A 0 ) + A2A2 d(A 2 ) +

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 21

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 22

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 23

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 24

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 25

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 26

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 27

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 28

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 29

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 30

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 31

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 32

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 33

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 34

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 35

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 36

Department of Communication Engineering, NCTU 37 Unit 5-4 Model Simulation Library

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 38 Choose a working directory that you want to store the compiled Libraries

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 39 Create a new library for the compiled library

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 40 Create the library named: stratix_atoms Repeat the above two procedures For the following two libraries altera_mf 220model

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 41 Compile the stratix_atomsLibrary

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 42 Choose the stratix_atoms.vfile

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 43 Notice the difference from Map the stratix_atoms to the compiled stratix_atoms library

Department of Communication Engineering, NCTU 44 Unit 5-5 Simulation with Altera mega-functions

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 45 Load Altera_mf library

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 46 Load Altera_mf Then you are done

Department of Communication Engineering, NCTU 47 Unit 5-5 Post Layout Simulation

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 48 Specify options for Generating output files For modelsim File name : *.vo

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 49 Import top-level Test bench and top-level design *.vo only

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 50 Load Stratix_atoms library

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 51 Load Stratix_atoms library

Digital CASUnit 5 : SRAMs and FPGAsSau-Hsuan Wu Department of Communication Engineering, NCTU 52 Notice!! the Instance name of the top-level design, not its module name Load *.sdo file From the SDF Option and apply it to the Top-level design