Altera_Forum
Honored Contributor
17 years agoDebug one-hot SM w/ 2 states active: look at actual SM bits?
Basically Signal Tap is reporting that under certain conditions a State Machine has two states active. My impression is that SignalTap does some encoding of the actual SM bits when it reports the active states. How can we capture the actual underlying state machine bits to better understand what is going on? I don't see anything other that the state names when I list the signals in SignalTap.
Details: We have an AHDL SM with many states that was synthesized with one-hot encoding. When I add the states (via their name) to SignalTap, it seems like the value is set to 1 whenever the state machine is in that state. This is different than the encoding reported by the SM viewer tool. For our reset state "IDLE" the encoding reports all bits are 0's, while SignalTap returns a 1 in the IDLE signal when we are in the idle state. Therefore it seems like SignalTap is doing some encoding when it reports the states. The problem we see is that while in the IDLE state, a signal that NOT used in the IDLE state (but is used in other states) is pulled very weakly low to high. When this signal finally goes high SignalTap reports a second state is also active along with IDLE. Obviously using a floating signal to determine which state to go to next will result in unpredictable operation. BUT since this signal is not used in any of the state transition equations to leave the IDLE state (verified via the SM viewer transitions equations) it should have no effect in the IDLE state. All the signals involved in leaving the IDLE state are synchronous and steady during this time. What we expect is that the actual underlying state machine bits are corrupted but SignalTap's encoding hides that. Perhaps when SignalTap reports IDLE the actual underlying bit pattern is invalid but the encoding hides that. Stefan