Register-Transfer Level Hardware Description with SystemC:Synthesizable Subset for SystemC

Synthesizable Subset for SystemC

All examples (except the testbenches) presented in the previous section have direct hardware correspondence and therefore they can be manually synthesized to actual hardware. Since an RTL model is usually used as an input of a synthesis tool, there are constraints that must be followed when designing at this level. Therefore, the term “nonsynthesizable design” does not imply that there is no way to convert that design to a corresponding hardware. Rather, it denotes that the design conversion is not supported by most of the existing tools, or it is very complex to be performed automatically.

In May 2001, Synopsys released a subset for synthesizable SystemC. Many CAD tools dealing with RTL SystemC rely on this subset. However, with minor revisions, a number of its constructs that are

Register-Transfer Level Hardware Description with SystemC-0349

defined as nonsynthesizable can be used in special cases for automatic synthesis. In the following section, a list of constructs that can or cannot be used in a synthesizable design is shown. For more details, the reader can refer to Ref. [3].

Nonsynthesizable SystemC Constructs

The following constructs in SystemC are not supported for RTL synthesis:

SC_THREAD and SC_CTHREAD: SC_THREAD and SC_CTHREAD are not synthesizable since they can contain wait functions. In the previous section, most of the threads and clocked threads used in examples can be easily converted to a method (SC_METHOD), which is synthesizable.

sc_main: it can be used only as a testbench, not a part of the design.

• sc_start

• Global and local watchings

• Tracing: creating waveforms and trace files only can be performed in testbenches.

In addition, there are several C/C++ constructs that cannot be used in a synthesizable RTL design in SystemC. The major C/C++ constructs that are not supported are:

• Local and nested class declarations

• Derived classes: the only supported classes are SystemC modules and processes

• Dynamic memory allocation

• Exception handling

• Recursive functions

• Function and operator overloading: the only exception is the classes overloaded by SystemC

virtual functions

• Inheritance and multiple-inheritance

public, protected, private, and friend keywords are ignored during synthesis process. All the members of a class become public

-> operator: the only exception is in module instantiation

• Static members

* and & operators for dereferencing

• Commas in for-loops

• Pointers: the pointers are only allowed in the instantiation part of the hierarchical modules

• User-defined template classes

• Run-time type castings and type identifications

goto statement

• unions

• Global variables

• Member variables shared by two or more processes

volatile variables

Nonsynthesizable Data Types

The following list shows the data types which are not supported for RTL synthesis:

• Floating-point types

• Fixed-point types (e.g., sc_fix)

• Access types (e.g., pointers)

• File types and IO streams

Except the above list, other types of SystemC and C/C++ are synthesizable.

Comments

Popular posts from this blog

Square wave oscillators and Op-amp square wave oscillator.

Adders:Carry Look-Ahead Adder.

Timing Description Languages:SDF