Andry Andry - 1 year ago 75
C++ Question

What is the best way to check whether a signal is a valid one in SystemC?

I am having a little problem in a SystemC simulation because in one component I did forget to check for signals integrity and my simulation breaks because of this. Basically I do not handle situations when my signals are like


How to check that a signal is a valid one? Meaning not
, not
but a valid one like

A little detail

Someone pointed out that maybe here I am asking about checking whether a signal is a number or not. Ok, let's say that if the signal is valid it is a number of course. But I experienced in some debugging sessions that
signals are sometimes treated like -1 or negative numbers in general... So that is why I did not ask about how to check whether a signal is a number or not...

Answer Source


bool is_01() const;

from at page 259 of the IEEE Std 1666-2011.