English 中文(简体)
Does system C support tri-state logic?
原标题:

Does System C support tri-state logic? That is, bits that can get 0, 1 or X, where X means "unknown"?

If it does, does it also support vectors that can contain Xes, including logic and arithmetic operations?

最佳回答

Here is what you need:

It does not have tri-state variables, but quad-state (is that correct? :P) variables (0,1,X,Z). More about it in the above links. It also supports vectors of those variables.

Hope I helped you a little bit :)

问题回答

Yeah, you re looking for the sc_logic and sc_lv types which are 4 state variables: 0, 1, X, and Z. Pay attention to how they interact when you resolve them together. There s a nice tables on the asic-world.com site taken directly from the SystemC User Manual.

Note though that this doesn t work like in Verilog where X can also act as a wildcard. I had to build my own function to add that functionality.





相关问题
Understanding types in SystemC

I am a beginner in SystemC programming and there is one thing I noticed (looking in the SystemC official documentation): all types that I used to deal with in VHDL simulations have not been "ported" ...

selective access to bits on datatypes with C++

I m using C++ for hardware-based model design with SystemC. SystemC as a C++ extension introduces specific datatypes useful for signal and byte descriptions. How can I access the first bits of a ...

SystemC Seg Fault on sc_core::sc_in<bool>::read()

I am having a repeating seg fault while using SystemC. During initialization I set a value to 0. During operation of a testbench I am setting this value to 1 in a module (proc). This is a sc_signal ...

Does system C support tri-state logic?

Does System C support tri-state logic? That is, bits that can get 0, 1 or X, where X means "unknown"? If it does, does it also support vectors that can contain Xes, including logic and arithmetic ...

Installing systemc SCV library on x86-64 machine

When I tried to install the SCV library, I came accross with the following problem: "checking build system type... Invalid configuration x86_64-unknown-linux-gnu : machine x86_64-unknown not ...

VHDL/Verilog related programming forums? [closed]

Hardware design with VHDL or Verilog is more like programming nowadays. However, I see SO members are not so actively talking about VHDL/Verilog programming. Is there any forum dealing with hardware ...

热门标签