Professional Documents
Culture Documents
Jan Kořenek
korenek@liberouter.org
Outline
• Introduction to synthesis
• Synthesis levels
• Synthesis issues
• Conclusion
VHDL
• VHDL - Very high speed integrated circuit
Hardware Description Language.
• when statement
mx_out <= a when "00" else
b when "01" else
c when "10" else
d;
Counter
• up and down counter.
process (clk, reset)
begin
if reset=’1’ then
count <= "0000";
elsif clk=’1’ and clk’event then
if ce=’1’ then
if load=’1’ then
count <= din;
else
if dir=’1’ then
count <= count + 1;
else
count <= count − 1;
end if;
end if;
end if;
end if;
end process;
Register
• with asynchronious reset
process (clk, reset)
begin
if reset=’1’ then −− asynchronous reset
dout <= ’0’;
elsif (clk’event and clk=’1’) then
dout <= din;
end if;
end process;
memory
Finite state machine (cont.)
• Use enumerated type to encode state variables
signal present_state, next_state : state_type;
type state_type is (idle,init,test,add,shift);
curent state
when s_something =>
logic output
next_state <= fst_state;
logic
when others =>
null;
next state
end case;
logic
end process ns_logic;
Block RAM
• Virtex–II component instantion
component RAMB16_S36
generic (
WRITE_MODE : string := "READ_FIRST";
);
port (
DI : in (31 downto 0);
DIP : in std_logic_vector (3 downto 0);
ADDR : in std_logic_vector (8 downto 0);
EN : in std_logic;
WE : in std_logic;
SSR : in std_logic;
CLK : in std_logic;
DO : out std_logic_vector (31 downto 0);
DOP : out std_logic_vector (3 downto 0)
);
end component;
Synthesis library
• The standard for VHDL Register Transfer Level
Synthesis is IEEE Std 1076.6-1999.
basic synthesis library
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all; arithmetic operations
use ieee.std_logic_unsigned.all;
• Seqvential assignment
• Technology consideration
Inferring latches
• Code and circuit example
correct source
uncavered latch
=>
values generation
Incomplete sesitivity list
• Missing signal at sensitivity list
. different behavior in function and time
simulation.
. it is difficult to find this error
a, b, c, d signals missing
process (sel)
begin
case sel is
when "00" => mux_out <= a;
when "01" => mux_out <= b;
when "10" => mux_out <= c;
when "11" => mux_out <= d;
when others => null;
end case;
end process;
Loop and Generate statement
• Loops and Genarate - this syntax construction
can be used only for constant integer
generation or loops.
PE
Input Output
data data
PE
Pipeline
• Basic paralel technic
• Paralel computing - similar computation time
• Can eliminate wire delay
• Higher freqvency can be reach
Reg Reg Reg
Conclusion
• Model translation from higher to lower level
• Synthesis levels - use only RTL and Logic levels
• Use only predefined templates
• Issues - inferring latches, incomplete sensitivity
list, etc
• Design speed-up - pipeline and other paralel
technics