Professional Documents
Culture Documents
simulación
Sequential Circuit
Design:
Practice
DSED, Curso 2017-2018
Pablo Ituero
RTL Hardware Design by P.
Chu
1
Register/Latch/Wire
Inference Rules
http://www.it.kth.se/courses/IL2217/1011/synthesizableVHDL.pdf
library ieee; -- attempt 2
use ieee.std_logic_1164.all; process(clk)
variable tmp_var2: std_logic;
entity varaible_ff_demo is begin
port( if (clk'event and clk='1') then
a,b,clk: in std_logic; tmp_var2 := a and b;
q1,q2,q3: out std_logic q2 <= tmp_var2;
); end if;
end varaible_ff_demo; end process;
-- attempt 3
architecture arch of varaible_ff_demo is process(clk)
signal tmp_sig1: std_logic; variable tmp_var3: std_logic;
begin begin
-- attempt 1 if (clk'event and clk='1') then
process(clk) q3 <= tmp_var3;
begin tmp_var3 := a and b;
if (clk'event and clk='1') then end if;
tmp_sig1 <= a and b; end process;
q1 <= tmp_sig1; end arch;
end if;
end process;
3
4
5
6
Crédito de las transparencias y
lectura alternativa
• Transparencias del Prof. Pong P. Chu
• La clase cubre el capítulo 9 de RTL Hardware
Design by P. Chu
7
Outline
1. Poor design practice and remedy
2. More counters
3. Register as fast temporary storage
r_next r_reg
d q q
+1
clk
clk reset
reset
• gray to binary
67
Synthesis Guidelines
• Asynchronous reset, if used, should be only for system
initialization. It should not be used to clear the registers
during regular operation.
• Do not manipulate or gate the clock signal. Most
desired operations can be achieved by using a register
with an enable signal.
• LFSR is an effective way to construct a counter. It can
be used when the counting patterns are not important.
68