shaiko
Advanced Member level 5
The simplest way I know to describe a tristate buffer is :
io_port <= driver when direction = '1' else 'Z'
But what if I do it in a more complex way - In a registered output FSM for example ?
--------------------------------
if rising_edge (clk) then
case state is
when state_1 =>
io_port <= ( others => 'Z' ) ;
registered_io_port <= io_port ;
when state_2 =>
io_port <= driver ;
--------------------------------
Will the above FSM code inffer (with guaranteed certainty) a tri-state buffer for "io_port" ?
io_port <= driver when direction = '1' else 'Z'
But what if I do it in a more complex way - In a registered output FSM for example ?
--------------------------------
if rising_edge (clk) then
case state is
when state_1 =>
io_port <= ( others => 'Z' ) ;
registered_io_port <= io_port ;
when state_2 =>
io_port <= driver ;
--------------------------------
Will the above FSM code inffer (with guaranteed certainty) a tri-state buffer for "io_port" ?