cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pgigliotti_usac
Explorer
Explorer
941 Views
Registered: ‎10-22-2020

FSM encoding report in Vivado 2020.1

Jump to solution

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?

0 Kudos
1 Solution

Accepted Solutions
miker
Xilinx Employee
Xilinx Employee
668 Views
Registered: ‎11-30-2007

@pgigliotti_usac 

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.

forums_fsm_state.png

Please Reply, Kudos, and Accept as Solution.

View solution in original post

17 Replies
apetley
Xilinx Employee
Xilinx Employee
860 Views
Registered: ‎06-14-2018

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 

 

0 Kudos
drjohnsmith
Teacher
Teacher
847 Views
Registered: ‎07-09-2009

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 ? 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
pgigliotti_usac
Explorer
Explorer
778 Views
Registered: ‎10-22-2020

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.

 

0 Kudos
pgigliotti_usac
Explorer
Explorer
777 Views
Registered: ‎10-22-2020

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?

0 Kudos
drjohnsmith
Teacher
Teacher
757 Views
Registered: ‎07-09-2009

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 ?

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
miker
Xilinx Employee
Xilinx Employee
755 Views
Registered: ‎11-30-2007

@pgigliotti_usac 

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.

forums_chipscope_enum.png

Please Reply, Kudos, and Accept as Solution.
0 Kudos
pgigliotti_usac
Explorer
Explorer
755 Views
Registered: ‎10-22-2020

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!

0 Kudos
barriet
Xilinx Employee
Xilinx Employee
753 Views
Registered: ‎08-13-2007

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.

0 Kudos
drjohnsmith
Teacher
Teacher
740 Views
Registered: ‎07-09-2009

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.

 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
miker
Xilinx Employee
Xilinx Employee
729 Views
Registered: ‎11-30-2007

@pgigliotti_usac 

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.

Please Reply, Kudos, and Accept as Solution.
0 Kudos
pgigliotti_usac
Explorer
Explorer
700 Views
Registered: ‎10-22-2020

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.

 

pgigliotti_usac
Explorer
Explorer
686 Views
Registered: ‎10-22-2020

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. 

0 Kudos
pgigliotti_usac
Explorer
Explorer
682 Views
Registered: ‎10-22-2020

I will look through the synthesis report again, but did not see all state-machines listed.

0 Kudos
pgigliotti_usac
Explorer
Explorer
679 Views
Registered: ‎10-22-2020

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....

pgigliotti_usac_1-1614109439094.png

 

pgigliotti_usac_0-1614109381209.png

 

0 Kudos
miker
Xilinx Employee
Xilinx Employee
669 Views
Registered: ‎11-30-2007

@pgigliotti_usac 

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.

forums_fsm_state.png

Please Reply, Kudos, and Accept as Solution.

View solution in original post

barriet
Xilinx Employee
Xilinx Employee
660 Views
Registered: ‎08-13-2007

make sure you are looking at the actual synthesis report file itself, as suggested above.

0 Kudos
pgigliotti_usac
Explorer
Explorer
627 Views
Registered: ‎10-22-2020

User error....