Forum Discussion
After synthesis, I can't see the state diagrams in state machine viewer
Hi, everyone!
I'm using the OSPI protocol to transfer data from Cyclone IV to STM32.
I designed a state machine with three states, and a piece of breathing light code that identifies the normal operation of the program. The code passed the synthesis, and the screenshot shows RTL, but there is nothing in the State machine viewer, it seems that my state machine has been optimized by Quartus.
PLUS,I've tried to modify the compilation settings, including the State machine process, but nothing worked.
Please help me! Any advice would be useful.
5 Replies
- sstrell
Super Contributor
The state machine is recognized as a state machine since it's listed in the pop-up at the top. Do you have to scroll up or down to see the state diagram?
- maya123
New Contributor
Thanks for your reply. The problem should be with my writing style. After I changed it, I can display the state machine flow chart.
Thanks again!
- FvM
Super Contributor
Hi,
problem with above posted code is that signal STATE is a combinational latch, not a clocked register.
Need to add clock edge sensitive condidtion, e.g.
PROCESS(clk,OSPI_NCS) BEGIN if rising_edge(clk) then CASE STATE IS WHEN IDLE => IF (OSPI_NCS = '0') THEN STATE <= DATA_PREPARE; ELSE STATE <= IDLE; END IF; WHEN DATA_PREPARE => OSPI_IO_TEMP <= SEND_DATA; DRDY <= '1'; --- data_ready --- STATE <= DATA_TRANSMIT; WHEN DATA_TRANSMIT => IF(DRDY = '1' AND BYTE_COUNTER = 1) THEN STATE <= IDLE; ELSE STATE <= DATA_TRANSMIT; END IF; WHEN OTHERS => STATE <= IDLE; END CASE; end if; END PROCESS; - RichardT_altera
Super Contributor
I’m glad to hear that you were able to resolve the issue!
Would you mind sharing what steps you took to resolve it? It would be helpful for future reference.
Regards,
Richard Tan
- RichardT_altera
Super Contributor
I will transitioning this thread to community support. If you have any further questions or concerns, please don't hesitate to reach out. Please login to https://supporttickets.intel.com/s/?language=en_US , view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support.
The community users will be able to help you on your follow-up questions.
Thank you and have a great day!
Best Regards,
Richard Tan