Memory in FPGAs مرتضي صاحب الزماني. Inferring Memory Inferring Memory in XST:  Distributed or block memory? −XST implements small RAM components on distributed.

Slides:



Advertisements
Similar presentations
HDL Programming Fundamentals
Advertisements

What are FPGA Power Management HDL Coding Techniques Xilinx Training.
Basic HDL Coding Techniques
Spartan-3 FPGA HDL Coding Techniques
Altera FLEX 10K technology in Real Time Application.
George Mason University FPGA Design Flow ECE 448 Lecture 9.
Lecture 11 Xilinx FPGA Memories
FPGA Devices & FPGA Design Flow
History TTL-logic PAL (Programmable Array Logic)
© Dr. Alaaeldin Amin 1 Hardware Modeling & Synthesis Using VHDL Very High Speed Integrated Circuits Start Of VHDL Development First Publication.
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.
Configurable System-on-Chip: Xilinx EDK
CSE140L – Lab4 Overall picture of Lab4 Tutorial on Bus & Memory Tutorial on Truth table.
1 Chapter 7 Design Implementation. 2 Overview 3 Main Steps of an FPGA Design ’ s Implementation Design architecture Defining the structure, interface.
Random-Access Memory Distributed and Block RAM Discussion D10.3 Example 41.
Virtex-6 and Spartan-6 HDL Coding Techniques
ECE 448: Lab 4 FIR Filters.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 10 Memories (RAM/ROM)
FPGA-Based System Design: Chapter 4 Copyright  2004 Prentice Hall PTR HDL coding n Synthesis vs. simulation semantics n Syntax-directed translation n.
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.
ECE Advanced Digital Systems Design Lecture 12 – Timing Analysis Capt Michael Tanner Room 2F46A HQ U.S. Air Force Academy I n t e g r i.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 11 Memories in Xilinx FPGAs.
1 H ardware D escription L anguages Modeling Digital Systems.
FPGA (Field Programmable Gate Array): CLBs, Slices, and LUTs Each configurable logic block (CLB) in Spartan-6 FPGAs consists of two slices, arranged side-by-side.
Array Synthesis in SystemC Hardware Compilation Authors: J. Ditmar and S. McKeever Oxford University Computing Laboratory, UK Conference: Field Programmable.
Introduction to FPGA Created & Presented By Ali Masoudi For Advanced Digital Communication Lab (ADC-Lab) At Isfahan University Of technology (IUT) Department.
© 2009 Xilinx, Inc. All Rights Reserved Part 2 Virtex-6 and Spartan-6 HDL Coding Techniques.
© 2003 Xilinx, Inc. All Rights Reserved Synchronous Design Techniques.
FPGA and ASIC Technology Comparison - 1 © 2009 Xilinx, Inc. All Rights Reserved ASIC to FPGA Coding Conversion, Part 1.
Winning with HDL. AGENDA  Introduction  HDL coding techniques  Virtex hardware  Summary.
Lab 05 Sen Ma.
CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis Aleksandar Milenkovic
Introduction to FPGA Tools
Tools - LogiBLOX - Chapter 5 slide 1 FPGA Tools Course The LogiBLOX GUI and the Core Generator LogiBLOX L BX.
This material exempt per Department of Commerce license exception TSU Synchronous Design Techniques.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL ECE 448 Lecture 10 Memories: RAM, ROM.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Data Storage VHDL ET062G & ET063G Lecture 4 Najeem Lawal 2012.
CDA 4253 FGPA System Design Xilinx FPGA Memories
Lecture 10 Xilinx FPGA Memories Part 1
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL FPGA Devices ECE 448 Lecture 5.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
Lecture 11 Xilinx FPGA Memories Part 2
Class Exercise 1B.
B e h a v i o r a l to R T L Coding
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Custom Designed Integrated Circuits
Maj Jeffrey Falkinburg Room 2E46E
Programmable Logic Memories
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
Programmable Logic Memories
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
ECE 448 Lecture 5 FPGA Devices
ECE 545 Lecture 17 RAM.
VHDL Introduction.
Behavioral Modeling of Sequential-Circuit Building Blocks
ECE 448: Lab 4 FIR Filters.
Win with HDL Slide 4 System Level Design
Hardware Modeling & Synthesis Using VHDL
THE ECE 554 XILINX DESIGN PROCESS
THE ECE 554 XILINX DESIGN PROCESS
(Sequential-Circuit Building Blocks)
Presentation transcript:

Memory in FPGAs مرتضي صاحب الزماني

Inferring Memory Inferring Memory in XST:  Distributed or block memory? −XST implements small RAM components on distributed resources to achieve better performance. −Small? −The threshold varies depending on: −The device family −memory depth −The total number of memory bits 2

Criteria for BRAM inferring  Use RAM Style to override these criteria and force implementation of small RAM and ROM components on Block RAMs. 3

RAM Style 4 attribute ram_style: string; … attribute ram_style of {signal_name|entity_name}: {signal|entity} is "{auto|block|distributed|block_power1|block_power2}";

RAM Style auto (default):  Looks for the best implementation for each inferred RAM, based on: −Whether the description style allows block RAM implementation (synchronous data read) −Available block RAM resources distributed:  Manually forces to distributed RAM resources block:  Manually forces to block RAM 5

RAM Style block_power1:  Minimally impacts performance block_power2:  Provides more significant power reduction.  Can significantly impact area and speed  Use block_power2 if: −Your primary concern is power reduction, and −You are willing to give up some degree of speed and area optimization. 6

BRAM Incorporation Three ways to incorporate BRAMs: 1.Instantiate directly using primitives: −Example: RAMB36E1 or RAMB18E1 in Virtex-6 and Virtex-7 −Enables low-level access to all BRAM features 2.CoreGen tool: −to generate a customizable core, such as a FIFO, which includes BRAMs −BRAM contents can be initialized from a file 7

BRAM Incorporation Three ways to incorporate BRAMs: 3.RTL inference: −You must follow the synthesis tool coding style −Advantage: code portability to other chips (but not to other tools) 8

Modeling RAM in VHDL Single write port Two write ports 9 type ram_type is array (0 to 255) of std_logic_vector (15 downto 0); signal RAM : ram_type; type ram_type is array (0 to 255) of std_logic_vector (15 downto 0); shared variable RAM : ram_type;

Modeling RAM in VHDL Write access (single write): 10 use IEEE.std_logic_unsigned.all signal addr : std_logic_vector(ADDR_WIDTH-1 downto 0); process (clk) begin if rising_edge(clk) then if we = ‘1’ then RAM(conv_integer(addr)) <= di; end if; end process;

Modeling RAM in VHDL Write access (two write): 11 use IEEE.std_logic_unsigned.all process (clk) begin if rising_edge(clk) then if we = ‘1’ then RAM(conv_integer(addr)) := di; end if; end process;  Other forms in: XST User Guide for Virtex-6, Spartan-6, and 7 Series Devices

RAM Initialization Example 1: 12 type ram_type is array (0 to 31) of std_logic_vector(19 downto 0); signal RAM : ram_type := ( X"0200A", X"00300", X"08101", X"04000", X"08601", X"0233A", X"00300", X"08602", X"02310", X"0203B", X"08300", X"04002", X"08201", X"00500", X"04001", X"02500", X"00340", X"00241", X"04002", X"08300", X"08201", X"00500", X"08101", X"00602", X"04003", X"0241E", X"00301", X"00102", X"02122", X"02021", X"0030D", X"08201" );

RAM Initialization Example 2: 13 type ram_type is array (0 to 127) of std_logic_vector (15 downto 0); signal RAM : ram_type := (others => " "); Example 3: type ram_type is array (255 downto 0) of std_logic_vector (15 downto 0); signal RAM : ram_type:= ( 196 downto 110 => X"B8B8", 100 => X"FEFC" 99 downto 0 => X"8282", others => X"3344");

RAM Initialization Example 4:  Read from a file 14 type RamType is array(0 to 127) of bit_vector(31 downto 0); impure function InitRamFromFile (RamFileName : in string) return RamType is FILE RamFile : text is in RamFileName; variable RamFileLine : line; variable RAM : RamType; begin for I in RamType'range loop readline (RamFile, RamFileLine); read (RamFileLine, RAM(I)); end loop; return RAM; end function; signal RAM : RamType := InitRamFromFile("rams_20c.data");

Implementing General Logic with BRAM  If you cannot fit the design onto the device, place some of the logic into unused block RAM.  XST does not automatically decide which logic can be placed into block RAM 15

Logic on BRAM To implement logic on BRAM 1.Isolate the part of RTL code to be placed into BRAM in a separate block. 2.Apply BRAM_MAP to the block −directly in HDL, or −In Constraint File (XCF) 16 attribute bram_map: string; attribute bram_map of component_name: component is "{yes|no}";

Logic on BRAM  The logic must satisfy the following criteria: −All outputs are registered. −The block contains only one level of Registers (Output Registers). −All Output Registers have the same control signals. −The Output Registers have a synchronous reset signal. 17