Information About

Systemc




The behaviours (processes) defined may be instantiated any number of times, and provisions are made for processes defined by hierarchies of other processes, as one would expect.

The language thus offered has semantical similarities to VHDL and Verilog , but may be said to have a syntactical overhead compared to these. On the other hand, greater freedom of expressiveness is offered in return, like Object Oriented Design Partitioning , template classes and Dynamic Memory Allocation . Which is more: SystemC is ''both'' a description language ''and'' a simulation kernel. The code written will compile together with the library's simulation kernel to give an executable that behaves like the described model when it is run. The performance of this simulation kernel is not to be compared with that of commercial VHDL/Verilog simulators at the present.


LANGUAGE FEATURES



Modules

Modules are the basic building blocks of a SystemC design hierarchy. A SystemC model usually consists of several modules which communicate via ports.


Ports

Ports allow communication from inside a module to the outside (usually to other modules)


Processes

Processes are the main computation elements. They are concurrent.


Channels

Channels are the communication element of SystemC. They can be either simple wires or complex communication mechanisms like fifo's or bus channels.

Elementary Channels:
  • signal

  • buffer

  • fifo

  • mutex

  • semaphore



Interfaces

Ports use interfaces to communicate with channels.


Events

Allow the synchronisation between processes.


Data types

SystemC introduces several data types which support the modeling of hardware.

Extended standard types:
  • sc_int<> 64-bit signed integer

  • sc_uint<> 64-bit unsigned integer

  • sc_bigint<> arbitrary precision signed integer

  • sc_biguint<> arbitrary precision unsigned integer


Logic types:
  • sc_bit 2-valued single bit

  • sc_logic 4-valued single bit

  • sc_bv<> vector of sc_bit

  • sc_lv<> vector of sc_logic


Fixed point types:
  • sc_fixed<> templated signed fixed point

  • sc_ufixed<> templated unsigned fixed point

  • sc_fix untemplated signed fixed point

  • sc_ufix untemplated unsigned fixed point




EXAMPLE

Example code of an adder:

#include "systemc.h"

SC_MODULE(adder) // module (class) declaration
{
sc_in a, b; // ports
sc_out sum;

void do_add() // process
{
sum = a + b;
}

SC_CTOR(adder) // constructor
{
SC_METHOD(do_add); // register do_add to kernel
sensitive << a << b; // sensitivity list of do_add
}
};



EXTERNAL LINKS

Further information about this open-source project can be found at SystemC homepage .