|
|
|
|
|
|
|
|
|
|
|
|
Introduction
|
|
|
SystemC has large number of data types to support modelling of Hardware as well as modelling of fractional fixed-point. Since SytemC is based on C++, it supports all the data types of C++. Choice of datatypes to use depends on synthesiability, level of abstraction and simulation speed. |
|
|
|
|
|
- C++ Data Types
- Bit Type
- Logic Type
- Arbitrary Width Bit Type
- Arbitrary Width Logic Type
- Signed Integer Type
- Unsigned Integer Type
- Arbitrary Precision Signed Integer Type
- Arbitrary Precision Unsigned Integer Type
- Resolved Types
- User-defined Data Types
|
|
|
|
|
|
|
|
|
|
|
|
Numeric Representation
|
|
|
To support hardware data representations, SystemC provides a unified string representation using C-style strings. It is possible to convert both to and from this format. SystemC uses the following syntax for strings: |
|
|
|
|
|
sc_string name ("0 base [sign] number e[+/-] exp]"); |
|
|
|
|
|
Here |
|
|
- name : Name of the variable
- base : b for binary, o for octal, d for decimal and x for hexa decimal
- sign : us for unsigned, sm for signed magnitute, csd for canonical signed digit
- number : Number is an integer in the indicated base
- exp : The optional exponent exp is always specified using decimal
|
|
|
|
|
|
C++ Data Types
|
|
|
SystemC supports all the C++ data types listed below. |
|
|
|
|
|
- int
- long int
- unsigned int
- unsigned long int
- unsigned short int
- short
- float
- char
- bool
|
|
|
All the above data types are covered in C++ chapter. Refer to C++ chapter if you want to know more on C++ data types. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|