The items LED0 and LED1 of your state machine are not variables but names for signals. Nothing what the debugger is able to "see".
As you already discovered an I/O pin connected to a signal could be used to read the state. Another choice is to use a status register component which will read all the signals (up to 8)connected to it.
Thanks for the reply! I created the status register like you said and placed a variable "statevar" which is set by the variable state, which is set in each individual state (please see pic attached). I think this will do what I want but it left me with a few additional questions:
1) Is it assumed that these states are binary or am I ok treating it like a non binary variable (I'm only going from 0-3 and I haven't got any flags but I thought I'd ask all the same)?
2) I can call "StateMachine_SMStatusReg_Read();" but I don't know how to read the variables I'm looking for (as the function doesn't take any arguments). Once it's in a status register, how do I go about getting the values stored?
3) What's the best resource for learning more about this? I watched a few youtube videos but none of them really had the information I was looking for. I also looked through a document called the "Component Author Guide", that was pretty helpful but not as complete as I was hoping for as it didn't seem to show how to get information from code and it didn't go over some additional specifics like the difference between sticky and transparent (this might be unnecessary as it describes sticky as being cleared on read so I assume that transparent wouldn't be cleared on read, but it definitely suggests that these variables would need to be binary, to me anyway).
4) If I wanted to customize an existing UDB provided by Cypress (or at least to break it apart and look how it's put together), is there a way to open it in the UDB editor or is the generated Verilog code all I have to go off of?
I'm hoping to make much more complicated UDBs so mastering these basics should be a great step in the right direction! I'm going to include the updated files, in case it makes it easier to look at. Thanks again for the help!
StateMachineFiles_3.zip 2.2 MB
Am I posting in the right area or should I be posting in the Components section when I have questions like this? I'm not trying to have someone do the work for me, I'm perfectly willing to do things myself but when I get stuck, I'm not really sure where I should be looking or who I should be talking to/where I should be posting in.