VHDL Synthesis for Implementing Digital Designs into FPGAs MSc Cristian Sisterna UNSJ
V H D L Very High Speed ICs Hardware Description Language Introduction C. Sisterna DSDA - © 2019
Hardware Description Language HDL (VHDL/Verilog) FPGA ASIC Xilinx Altera Lattice Actel DSDA - © 2019 C. Sisterna
Hardware Description Language High level of abstraction Easy to debug Parameterized designs Re-uso IP Cores (free) available if(reset=‘1’) then count <= 0; elsif(rising_edge(clk)) then count <= count+1; end if; DSDA - © 2019 C. Sisterna
What is not VHDL Verilog o VHDL IS NOT A programming language; IT IS A HARDWARE DESCRIPTION LENGUAGE Verilog o VHDL is not (yet) a highly abstract language: y(n) = 0.75y(n-1) + 0.3x(n) ; (Simulink/FPGA design flow) DSDA - © 2019 C. Sisterna
HDL Synthesis Sub-Set VHDL VHDL Synthesizable Used to write code to simulate the behavior of a design VHDL VHDL Synthesizable Used to implement the design into hardware (for instance in FPGA) DSDA - © 2019 C. Sisterna
VHDL ‘Description’ Examples if(sel=‘1’) then z <= y; else z <= x; end if; z y 1 sel z <= y when sel=‘1’ else x; DSDA - © 2019 C. Sisterna
VHDL ‘Description’ Ejemplos if(clk )then q <= d; else q <= q; end if; q d clk if(clk )then q <= d; end if; if(rising_edge(clk))then q <= d; end if; DSDA - © 2019 C. Sisterna
VHDL – Module Structure ff.vhd libraries& packages entity q d I/O clk architecture functionality DSDA - © 2019 C. Sisterna
VHDL Module Structure q d clk ff.vhd entity ff is port( library ieee; useieee.std_logic_1164.all; entity ff is port( d,clk : in std_logic; q : out std_logic); end ff; entity f port( end ff; architecture test of ff is begin process(clk) end process; end test; architecture test of ff is begin process(clk) if(rising_edge(clk)) then q <= d; end if; end process; end test; q d clk DSDA - © 2019 C. Sisterna
VHDL Code – Is it really Works? ? Test Bench Unit Under Test Stimulus Signals Tested Signals DSDA - © 2019 C. Sisterna
VHDL – Simulation / Verification C. Sisterna DSDA - © 2019
VHDL -> Synthesis and P&R with tmp select j <= w when “1000”, x when “0100”, y when “0010”, z when “0001”, '0‘when others; VHDL Code Design Constraints FPGA list of Components and Connections NET CLOCK PERIOD = 50 ns; NET LOAD LOC = P Synthesis – P&R Tool FPGA Library of Components Cyclone Spartan Design Attributes attribute syn_encoding of my_fsm: type is “one-hot”; DSDA - © 2019 C. Sisterna
Generic VHDL-FPGA Design Flow DSDA - © 2019 C. Sisterna ICTP - 2009
Design Implemented in the FPGA DSDA - © 2019 C. Sisterna
FPGA Kit – DE1-SoC http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=205&No=836&PartNo=1 DSDA - © 2019 C. Sisterna
FPGA Kit – DE2-115 http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=502 DSDA - © 2019 C. Sisterna
FPGA Kit – DE0-Nano-SoC Kit http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=941 DSDA - © 2019 C. Sisterna
FPGA Kit – DE0-Nano Kit http://www.terasic.com.tw/cgi-bin/page/archive.pl?CategoryNo=139&No=593 DSDA - © 2019 C. Sisterna
FPGA – Xilinx V5 DSDA - © 2019 C. Sisterna