Cesar0182
Member level 5
Greetings ... I have a state machine for a project in Vivado 2017.4 and where I need to show or add text in the waveforms when I simulate with Modelsim 14.5
This is a part of the code that I am using.
I need to show the change of states that occurs with ¨rx_sm_st¨ but this does not appear among the objects of the state machine. Could someone help me with this please?
This is a part of the code that I am using.
Code:
SIGNAL l1_spi_rx_sm_sm : std_logic_vector(7 DOWNTO 0); -- Current State ( Register )
SIGNAL l1_spi_rx_sm_next : std_logic_vector(7 DOWNTO 0); -- Next State ( Combinatorial Bus )
type rx_smtype is (SM_IDLE,SM_WRITE_TSM,SM_WRITE_TSL,SM_MESSAGE_ACTIVE,SM_WRITE_EOF_TK);
SIGNAL rx_sm_st : rx_smtype;
-- State Register
process (i_clk,i_rst)
begin
if( i_rst = '1' ) then
l1_spi_rx_sm_sm <= Idle;
elsif rising_edge( i_clk ) then
l1_spi_rx_sm_sm <= l1_spi_rx_sm_next;
end if;
end process;
-- Next State combinational logic
process (l1_spi_rx_sm_sm,i_frame_done,i_rx_vldchar_tk)
begin
case l1_spi_rx_sm_sm is
when Idle =>
-- pragma synthesis_off
rx_sm_st <= SM_IDLE;
-- pragma synthesis_on
if i_rx_vldchar_tk = '1' then
l1_spi_rx_sm_next <= Write_Tsm;
else
l1_spi_rx_sm_next <= Idle;
end if;
when Write_Tsm =>
-- pragma synthesis_off
rx_sm_st <= SM_WRITE_TSM;
-- pragma synthesis_on
l1_spi_rx_sm_next <= Write_Tsl;
when Write_Tsl =>
-- pragma synthesis_off
rx_sm_st <= SM_WRITE_TSL;
-- pragma synthesis_on
l1_spi_rx_sm_next <= Message_Active;
when Message_Active =>
-- pragma synthesis_off
rx_sm_st <= SM_MESSAGE_ACTIVE;
-- pragma synthesis_on
if i_frame_done = '1' then
l1_spi_rx_sm_next <= Write_Eof_Tk;
else
l1_spi_rx_sm_next <= Message_Active;
end if;
when Write_Eof_Tk =>
-- pragma synthesis_off
rx_sm_st <= SM_WRITE_EOF_TK;
-- pragma synthesis_on
l1_spi_rx_sm_next <= Idle;
when others =>
l1_spi_rx_sm_next <= Idle;
end case;
end process;