Altera_Forum
Honored Contributor
12 years agoState Machine register "alias"
Hi,
I have a state machine which I have defined as:enum bit {S_WAIT = 2'b01, S_DOSTUFF = 2'b10} dumb_state, dumb_next_state; After compiling this correctly gets detected as a state machine by Quartus. I also have status register that I can access via a AvMM bus defined as: logic status_reg; I want to read the state value via my status register for debug purposes. So I did the following assignment:
always_ff @(posedge clk) begin
status_reg <= dumb_state;
end
This compiles fine as well. However, now Quartus is not detecting my state machine. I'm guessing this is happening because dumb_state is being analyzed as a standard logic element due to the assignment made. Is there any way to get around this?