02-17-2021 11:36 AM
I have not seen a good answer to this question, so am reposting. I am trouble shooting a design and am trying to determine the state encoding. I have looked at the synthesis report and cannot find how it has encoded my states.
type FRAM_sm0 is (Idle, WR_MEM, RD_MEM, WR_SN, RD_SN, WAIT_4_SPI_done, MEM_TEST, READ_RESET, WR_CMD_LABELS, INIT_VARIABLES, WR_ANALOG, NEW_RECORD, WR_STATUS_LABELS, UPDATE_5HZ, MB_DEBUG);
signal FRAM_state : FRAM_sm0;
attribute fsm_safe_state : string;
attribute fsm_safe_state of FRAM_state : signal is "reset_state";
attribute keep of FRAM_state : signal is "true";
When I look at FRAM_state , I can see that it is stuck in state 5, but have no clue as to which state that is. I sure seems like it would be nice if the tools reported that!
I know I can go back to my code and add logic to tell me where I am at, but really, you have got to be kidding me that Vivado does not report this. What am I missing?
02-23-2021 12:00 PM
Are you searching the Synthesis Report or just the Messages Tab? I show both below. My Synthesis Report defines the value but the Messages tab does not.
02-21-2021 08:17 AM
Hi @pgigliotti_usac ,
Please post link of previous discussion here.
I see you are trying to encode safe FSM, however you dont need to apply keep attribute for that.
Remove keep attribute, check if safe FSM is inferred for FRAM_state.
Let us know, if it works or you need more information.
Thanks,
Ajay
02-21-2021 09:14 AM
can you post the rest of your code please
the simulation should I think use your state names ,
or is this something in the safe switch ?
02-23-2021 09:56 AM
I am debugging hardware. I have an ILA inserted in the design, and am trying to debug. I can see that the state-machine is in State 5, which I have no clue as to how that maps to the names that I have given in my code.
For instance
type status_sm0 is (Idle, Awaiting_grant, Send_270, Send_271, Send_272, Test_1hz, Send_230 ,
Send_250, Send_260, Send_350, Send_351, Send_352);
It sure seems like there should be a report somewhere that tells how these are encoded.
02-23-2021 10:01 AM
Where does it tell me how it has assigned the bits for the encoding. It would seem strange that wether I tell it that I want safe encoding or not, that the tools will not provide gthe way that it has encoded the machine. Is idle = "000" or "001" or etc. Where would I find this information or is it not provided in a synthesis report?
type status_sm0 is (Idle, Awaiting_grant, Send_270, Send_271, Send_272, Test_1hz, Send_230 ,
Send_250, Send_260, Send_350, Send_351, Send_352);
I am in the lab using an ILA and would like to be able to tell what state I am in. I have the machine probed, and it something like a binary 5. How does that correlate to my names?
02-23-2021 10:38 AM
What simulator are you using ?
in the one built into Vivado, I have the state names shown .
do you have the name set to numeric ?
02-23-2021 10:40 AM
You can reference the Vivado Design Suite Programming and Debugging User Guide (UG908; v2020.2; p 208) which will hopefully provide a path to your desired result.
02-23-2021 10:42 AM
As I said, I am using an ILA core. I am not in the simulator! I am running on hardware, capturing real signals, in the hardware debugger!
02-23-2021 10:49 AM
This information is supposed to be in the synthesis report now, see
https://www.xilinx.com/support/answers/59237.html (2014.1 Vivado Synthesis - Where can I find the information about FSM encoding generated by Vivado?)
You could also grep for "Synth 8-802" or "Synth 8-3354" per UG901 to see applicable FSM encoding messages.
02-23-2021 10:56 AM
My apologies
https://www.xilinx.com/support/answers/59237.html
I could have sworn there is a way to transfer the state names to the ILA,
I have done that many times in the older chip-scope, but can't seem to find how to do it in viviado,
the get around might be to make a look up table that encodes your states to a number and look at that in the ILA.
not nice I agree, might be a way forward.
02-23-2021 11:08 AM
Before you discount my response, please re-read my post. My reference is part of the Vivado Design Suite Programming and Debugging User Guide. It highlights how to Enumerate the PROBE values in debug. I did not mention simulation.
02-23-2021 11:23 AM - edited 02-23-2021 11:48 AM
Yeah, I have already added code in my design to be able to track my states. A real pain. I have had to do similar things in the vivado simulator with variables and you cannot view them either. Not great.
02-23-2021 11:32 AM
I had not read your post, and was not replying to you, regarding simulation, that was in reply to another individual.
I had my state machine coded as follows.
type FRAM_sm0 is (Idle, WR_MEM, RD_MEM, WR_SN, RD_SN, WAIT_4_SPI_done, MEM_TEST, READ_RESET, WR_CMD_LABELS,
INIT_VARIABLES, WR_ANALOG, NEW_RECORD, WR_STATUS_LABELS, UPDATE_5HZ, MB_DEBUG);
When I look at the value's in the debugger, it gives me a binary value for the states. It obviously has assigned them a value. I am not seeing how it has encoded values to my states/types, in the synthesis report.
02-23-2021
11:34 AM
- last edited on
02-24-2021
01:53 AM
by
anatoli
I will look through the synthesis report again, but did not see all state-machines listed.
02-23-2021 11:45 AM
Here are the results of the search. Unfortunately doesn't tell me the state values. Is there a verbose setting or something to get this information...Kinda silly to hid this....
02-23-2021 12:00 PM
Are you searching the Synthesis Report or just the Messages Tab? I show both below. My Synthesis Report defines the value but the Messages tab does not.
02-23-2021 12:10 PM
make sure you are looking at the actual synthesis report file itself, as suggested above.
02-23-2021 12:19 PM
User error....