Professional Documents
Culture Documents
VHDL State Machines: 0
VHDL State Machines: 0
as a ’case statement’
begin
states : process( sensitivity list)
begin
case current is
when
... s0 => next_ <= s1;
end case;
end process;
ticker : process(clk)
begin
if (rising_edge(clk)) then
current <= next_;
end if;
end process;
end ;
VHDL State Machines : 2
entity controller is
port (
car : in bit;
timed : in bit;
clk : in bit;
reset : in bit;
timer_run : out bit;
minor_green : out bit;
major_green : out bit);
end controller;
VHDL State Machines : 3
begin -- state_machine
state_comb : process(current_state,
car, timed)
begin
if (reset = ’0’) then
else
VHDL State Machines : 5
case current_state is
process(clk)
begin
end process;
end state_machine;
Algorithmic State Machines : 0
I
00
oe <= 0
we <= 0
0
ready
1
D 11
oe <= 0
we <= 0
0 1
read_write
W 10 R 01
oe <= 0 oe <= 1
we <= 1 we <= 0
0 0
ready ready
1 1
Conditional symbol
exit path or decision box
register op.
major_green
output
Algorithmic State Machines : outputs
conditional output unconditional output
A A
Z Z
1 1
C C
B2
0 0
Y
Y
B B
W W
CLK CLK
Z Z
Y, C=1 Y, C=1
Y, C=0 W, C=1
W Y, C=0
W, C=0
C tested
Timing diagram for
the conditional C tested
output Y. State dependent output
Y
VHDL: monitoring state.
in vdd B;
in vss B;;
in reset B;;
in clk B;;
in read_write B;
in ready B;;
out oe B;;
out we B;
register rw_buf_x.controller_current_state(1 downto 0) B;
begin