Forum Discussion
Altera_Forum
Honored Contributor
15 years agoVHDL state to entity
Hi,
I have a VHDL design with 8 states. I want to take the state "cur_state" specifically to entity output port. This is not for debug, but a specific customer requirement. Please let me know how to do this. Regards, freak22 Replies
- Altera_Forum
Honored Contributor
Hi kaz,
This is throwing error. I had already tried this. The error is copied below, Error-[SEQSTMTASSIGNTYPE] Type mismatch ../dut/state_machine.vhd, 33 SYNTH outp_state <= cur_state; ^ The assignment statement target data type does not match the source data type. The target data type is 'Anonymous subtype of STD_LOGIC_VECTOR' and is declared by 'PACKAGE IEEE.STD_LOGIC_1164'. The source data type is 'STATE' and is declared by 'ARCHITECTURE SYNTH'. "../dut/state_machine.vhd": errors: 1; warnings: 0. This occurs because our state variable is user defined and ouptut port is std_logic_vector. The state definition is copied below;
Any idea to override this or any convesion function. Regards, freaktype state is (IDLE, ST1, ST2, ST3, ST4,ST5, ST6, ST7); signal cur_state, nxt_state : state; - Altera_Forum
Honored Contributor
add an output port with your favorite name, then
curr_state_out <= curr_state; This should keep your customer happy.