Forum Discussion
HI,
Thank you for replies!!
In my case, i just only change sys_encoding attribute, the state machine work correctly.
In the begining, i didn't declare sys_encoding attribute (quartus default is one-hot), the stat machine will fail in some state.
After founding fail case, I add sys_encoding attribute(* syn_encoding = "gray" *) or (* syn_encoding = "sequential" *), the state machine works well.
(RTL code are fixed, didn't change)
Attachment is my RTL code, that define states and next-state logic.
In my fail case, spi_mode_sel ==2'b11, qspi_header_type == 1'b1,qspi_ddr_mode_en == 1'b0 , color_format == 3'b000, and all above signal are constant.
In should be "SPI_IDLE->SPI_RESET_STATE->CHK_FIFO->4W_HEADER1(33 clk)-> 4W_RGB888".
But if using one-hot coding, the state machine will be ""SPI_IDLE->SPI_RESET_STATE->CHK_FIFO->4W_HEADER1(1 clk)-> 4W_RGB888"
How can i prevent this problem?
And What will cause this porblem?
Thank you all.
Do you need further help regarding this case?
Regards,
Richard Tan