2

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 "XXXXX..." or "ZZZZ..."!

How to check that a signal is a valid one? Meaning not "ZZZZ...", not "XXXX..." but a valid one like "000110..."? Thankyou

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

Community
  • 1
  • 1
Andry
  • 16,172
  • 27
  • 138
  • 246
  • Hard to understand what is asked here. If you want numbers then check if what you got are numbers. – Öö Tiib Feb 28 '13 at 11:36
  • Well, basically if it is a valid signal it is a number so the question might turn like: "how to check if the signal is a number", but I do not know whether systemc treats X and Z like -1 or similar... This is my question... – Andry Feb 28 '13 at 11:40

1 Answers1

2

sc_logic.is_01()?

bool is_01() const;

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

AndresM
  • 1,293
  • 10
  • 19
vermaete
  • 1,330
  • 1
  • 17
  • 28