R
Richard G.
Guest
Hi all,
I have a very simple question. I have a statemachine, where the states
are declared as follows:
type SM_TYPE is (IDLE,WRITE0,WRITE1,READ1,ABORT0, ABORT1,ABORT2,ABORT3,
ABORT4, DONE);
signal nstate : SM_TYPE;
I would like to have now an output signal of my state machine which
encodes the state to that I can use this signal to debug the
statemachine with Chipscope. I am just wondering what kind of signal
the output port that encodes the state has to be. I think one-hot
encoding is used, and I have 10 states, so I would assume that
I could declare it like that
port (
...
dbg_state_out : out std_logic_vector(9 downto 0);
...
);
....
dbg_state_out <= nstate;
Is my approach right, or is the state encoded in something different
than a std_logic_vector.
Many thanks
I have a very simple question. I have a statemachine, where the states
are declared as follows:
type SM_TYPE is (IDLE,WRITE0,WRITE1,READ1,ABORT0, ABORT1,ABORT2,ABORT3,
ABORT4, DONE);
signal nstate : SM_TYPE;
I would like to have now an output signal of my state machine which
encodes the state to that I can use this signal to debug the
statemachine with Chipscope. I am just wondering what kind of signal
the output port that encodes the state has to be. I think one-hot
encoding is used, and I have 10 states, so I would assume that
I could declare it like that
port (
...
dbg_state_out : out std_logic_vector(9 downto 0);
...
);
....
dbg_state_out <= nstate;
Is my approach right, or is the state encoded in something different
than a std_logic_vector.
Many thanks