Altera_Forum
Honored Contributor
16 years agostrang things about FSM
in my design i use FSM,and i don't know why my FSM alway be in a undefined status, see the picture below, and I have use "default" : default:begin ............ end
you a.v is not clearly arranged and so hard so read and understand
what i do with fsm is that have one always block that handles only the fsm register and no other register. spiStatusMachineReg is your fsm register after reset it seems to start with SPI_config_status the next state depends upon "addr" but thats an external signal have you checked the quartus setting about State machine Processing ? you don#T need to code one hot shot as quartus can change the fsm type if needed. normaly it is set to one-hot, change it to user encoded so it must keep your coding style. and not modifying it. also signaltap will show you the single states and you can assign names to ist via a table, that makes ist easier to read