Random-Access Memory Distributed and Block RAM Discussion D10.3 Example 41.

Slides:



Advertisements
Similar presentations
Lecture 11 Xilinx FPGA Memories
Advertisements

Arbitrary Waveform Discussion 5.5 Example 34.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
A Simple Microcontroller VHDL Tutorial R. E. Haskell and D. M. Hanna T6: VHDL State Machines.
Integer Square Root.
6/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
FPGAs and VHDL Lecture L13.1 Sections 13.1 – 13.3.
Sequencing and Control Mano and Kime Sections 8-1 – 8-7.
Finite State Machines Discussion D8.1 Example 36.
CSE140L – Lab4 Overall picture of Lab4 Tutorial on Bus & Memory Tutorial on Truth table.
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 10 Memories (RAM/ROM)
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
1 Part V: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Designing with FPGAs ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
George Mason University FPGA Memories ECE 448 Lecture 13.
System Arch 2008 (Fire Tom Wada) /10/9 Field Programmable Gate Array.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 11 Memories in Xilinx FPGAs.
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis Aleksandar Milenkovic
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL ECE 448 Lecture 10 Memories: RAM, ROM.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
CS/EE 3700 : Fundamentals of Digital System Design
Data Storage VHDL ET062G & ET063G Lecture 4 Najeem Lawal 2012.
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
CDA 4253 FGPA System Design Xilinx FPGA Memories
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
PARBIT Tool 1 PARBIT Partial Bitfile Configuration Tool Edson L. Horta Washington University, Applied Research Lab August 15, 2001.
July 2, 2001Systems Architecture I1 Systems Architecture II (CS 282) Lab 3: State Elements, Registers, and Memory * Jeremy R. Johnson Monday July 2, 2001.
Lecture 11 Xilinx FPGA Memories Part 2
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Combinational logic circuit
Lecture L5.1 Mealy and Moore Machines
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part IV: VHDL CODING.
Programmable Logic Memories
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
VHDL Hierarchy in XILINX
Programmable Logic Memories
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
مدار های ترکیبی دیکدر لامپ های هفت قسمتی یکی از دیکدر هایی که اغلب به کار برده می شود،دیکدر 4 به 7 برای تبدیل کد bcd به کد هفت بیتی برای لامپ های seven.
A Data Stack CoreGen Discussion 12.1.
ECE 545 Lecture 17 RAM.
A Greatest Common Divisor (GCD) Processor
Behavioral Modeling of Sequential-Circuit Building Blocks
Founded in Silicon Valley in 1984
Figure 8.1. The general form of a sequential circuit.
Fast, Asynchronous SRAM
FPro Video Subsystem: VGA Frame Buffer Core
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
(Sequential-Circuit Building Blocks)
Presentation transcript:

Random-Access Memory Distributed and Block RAM Discussion D10.3 Example 41

RAM

To run Core Generator, click Tools and CoreGen & Architecture Wizard

Then, select Memories & Storage Elements RAMs & ROMs Distributed Memory (ver 7.1) Select Project  Options

The following files were generated for 'ram16x8' in directory c:\My_Designs\RAM\xilinxcoregen\: ram16x8.edn: Electronic Data Netlist (EDN) file containing the information required to implement the module in a Xilinx (R) FPGA. ram16x8.vhd: VHDL wrapper file provided to support functional simulation. This file contains simulation model customization data that are passed to a parameterized simulation model for the core. ram16x8.vho: VHO template file containing code that can be used as a model for instantiating a CORE Generator module in a VHDL design. ram16x8_readme.txt: Text file indicating the files generated and how they are used.

State machine for writing to each location in the 16x8 RAM followed by reading the data from each location

-- Simple state machine for writing to and reading from RAM 16x8 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity RAMsm is port ( clk : in std_logic; clr : in std_logic; we : out std_logic; data : out std_logic_vector(7 downto 0); addr : out std_logic_vector(3 downto 0) ); end RAMsm; RAMsm.vhd

architecture RAMsm of RAMsm is type state_type is (start, write, clear, read); signal present_state, next_state: state_type; signal addrcnt : std_logic_vector(3 downto 0); begin sreg: process(clk, clr) begin if clr = '1' then present_state <= start; elsif clk'event and clk = '1' then present_state <= next_state; case present_state is when start => addrcnt <= X"0"; --clear address variable when write => addrcnt <= addrcnt + 1;--incr address var when clear => addrcnt <= X"0"; --clear address variable when read => addrcnt <= addrcnt + 1;--incr address var when others => null; end case; end if; end process;

C1: process(present_state, addrcnt) begin case present_state is when start => next_state <= write; when write => if addrcnt < 15 then next_state <= write; else next_state <= clear; end if; when clear => next_state <= read; when read => if addrcnt < 15 then next_state <= read; else next_state <= start; end if; when others => null; end case; end process;

C2: process(present_state, addrcnt) begin we <= '0'; if present_state = write then we <= '1'; end if; end process; addr <= addrcnt; data <= "0000" & addrcnt; -- connect data to addr since we want to write -- the addr as the data for each location end RAMsm;

RAMtest.vhd (top-level) -- Top level for RAM16x8 and the simple RAM test state machine library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity RAMtest is port ( clk : in std_logic; clr : in std_logic; RAMdata : out std_logic_vector(7 downto 0) ); end RAMtest; architecture RAMtest of RAMtest is component ram16x8 is port ( A: in std_logic_vector(3 downto 0); CLK: in std_logic; D: in std_logic_vector(7 downto 0); WE: in std_logic; SPO: out std_logic_vector(7 downto 0)); end component;

component RAMsm is port ( clk : in std_logic; clr : in std_logic; we : out std_logic; data : out std_logic_vector(7 downto 0); addr : out std_logic_vector(3 downto 0)); end component; signal data : std_logic_vector(7 downto 0); signal addr : std_logic_vector(3 downto 0); signal we : std_logic; begin RAM: ram16x8 port map( A => addr, CLK => clk, D => data, WE => we, SPO => RAMdata); SM: RAMsm port map( clk => clk, clr => clr, we => we, data => data, addr => addr); end RAMtest;

Simulation for the test state machine, RAMsm Simulation for the RAM test component, RAMtest

Design Summary Logic Utilization: Number of Slice Flip Flops: 6 out of 3,840 1% Number of 4 input LUTs: 8 out of 3,840 1% Logic Distribution: Number of occupied Slices: 11 out of 1,920 1% Number of Slices containing only related logic: 11 out of % Number of Slices containing unrelated logic: 0 out of 11 0% Total Number 4 input LUTs: 16 out of 3,840 1% Number used as logic: 8 Number used as 16x1 RAMs: 8 Number of bonded IOBs: 10 out of 173 5% Number of GCLKs: 1 out of 8 12% Number of RPM macros: 1 Total equivalent gate count for design: 1,123 Additional JTAG gate count for IOBs: 480 Peak Memory Usage: 128 MB Design Summary for RAMtest including the 16x8 Distributed RAM

Using Block RAM to implement a 16x8 RAM module

... component ram16x8block IS port ( addr: IN std_logic_VECTOR(3 downto 0); clk: IN std_logic; din: IN std_logic_VECTOR(7 downto 0); dout: OUT std_logic_VECTOR(7 downto 0); we: IN std_logic); END component;... RAM: ram16x8block port map( addr => addr, clk => clk, din => data, we => we, dout => RAMdata);... Component declaration and port map for the 16x8 Block RAM in RAMtest.vhd

Simulation for the Block RAM test component, RAMtest

Design Summary Logic Utilization: Number of Slice Flip Flops: 6 out of 3,840 1% Number of 4 input LUTs: 8 out of 3,840 1% Logic Distribution: Number of occupied Slices: 7 out of 1,920 1% Number of Slices containing only related logic: 7 out of 7 100% Number of Slices containing unrelated logic: 0 out of 7 0% Total Number of 4 input LUTs: 8 out of 3,840 1% Number of bonded IOBs: 10 out of 173 5% Number of Block RAMs: 1 out of 12 8% Number of GCLKs: 1 out of 8 12% Total equivalent gate count for design: 65,635 Additional JTAG gate count for IOBs: 480 Peak Memory Usage: 129 MB Design Summary for RAMtest including the 16x8 Block RAM