SystemC int bit logic

 Fixed-Precision Integer Types  

sc_int and sc_unit are the fixed-precision integer types.
Syntax:
            sc_int<w>
            sc_uint<w>
             where w specifies the width.
sc_int and sc_unit are of integer type, with the width can be explicitly specified.The maximum precision is limited to 64 bits, Therefore these types are called as Fixed-Precision type.
sc_int is signed.
sc_uint is unsigned.
Bit select, part select, concatenation and reduction operators are supported.
Declaration Examples:
            sc_int<4>     a;  //a of sc_int  type with width ‘4’ bit
            sc_uint<6>   b;  //b of sc_uint type with width ‘6’ bit

 Arbitrary Precision Integer Types 

sc_bigint and sc_bigunit are the Arbitrary  precision integer types,
Syntax:
            sc_int<w>
            sc_uint<w>
             where w specifies the width.Syntax,
sc_bigint and sc_biguint are of integer type.
sc_bigint is signed.
sc_biguint is unsigned.
Bit select, part select, concatenation and reduction operators are supported.
Declaration Examples:
            sc_bigint<4>     a;  //a of sc_bigint  type
            sc_biguint<6>   b;  //b of sc_biguint type

 Arbitrary Width Bit Vectors 

A bit vector shall implement a multiple bit data type where each bit has a state of logic 0 or logic 1 and is represented by the symbols ‘0’ or ‘1’, respectively.
Syntax:
            sc_bv<w>
Bit select, part select, concatenation and reduction operators are supported.

 Logic Type 

logic types implement a four-valued logic data type with states logic 0, logic 1, high-impedance,
and unknown and shall be represented by the symbols ‘0’, ‘1’, ‘X’, and ‘Z’, respectively.
Syntax:
            sc_logic
Bit select, part select, concatenation and reduction operators are supported.

❮ Previous Next ❯