Table Of Contents

Previous topic

Coprocessors

Next topic

dsx.device_tree

This Page

dsx.systemc

The SystemC module representation

class dsx.systemc.systemc.SystemC
SystemC is a dsx.ware.Ware object used for SystemC
netlisting. This contains a SystemC hierarchical module.
__init__(tmpl_params, inst_params, *nodes)

Creates a new SystemC netlist object.

Parameters:
  • tmpl_params (list) – A list of template parameter names for the module
  • inst_params (list) – A list of template parameter names for the module
  • nodes (iterable) – an iterable of ScNode.
class dsx.systemc.systemc.ScNode

A node in a SystemC netlist. This corresponds to a member of the module, with:

  • a name,
  • a C++ type,
  • a contructor call,
  • some headers to use,
  • some methods to call on the object,
  • some class methods to call on the class.
__init__(name, type, cxx_type='', ctor_params='', includes=[], configurators=(), static_configurators=())

Creates a new node.

Parameters:
  • name (str) – instance name
  • type (str) – node type (as per dsx.ware.WNode.type)
  • ctor_params (str) – Parameter string to constructor call
  • cxx_type (str) – C++ type name (with namespace and template parameters)
  • include (list) – File names to #include
  • configurators (list) – C++ lines to apply on the object
  • static_configurators (list) – C++ lines to apply on the object’s class
class dsx.systemc.systemc.Component

A module instance in the SystemC parent module.

This inherits ScNode.

__init__(name, cxx_type='', ctor_params='', includes=[], configurators=(), static_configurators=(), connection_lines=[])

Creates a new component node.

Parameters:
  • name (str) – instance name
  • cxx_type (str) – C++ type name (with namespace and template parameters)
  • ctor_params (str) – Parameter string to constructor call
  • include (list) – File names to #include
  • configurators (list) – C++ lines to apply on the object
  • static_configurators (list) – C++ lines to apply on the object’s class
  • connection_lines (list) – C++ lines to apply to the object in order to connect ports to signals
class dsx.systemc.systemc.Signal

A signal inside the SystemC parent module.

This inherits ScNode.

__init__(name, cxx_type='', ctor_params='', includes=[], configurators=(), static_configurators=())

Creates a new signal node.

Parameters:
  • name (str) – signal name
  • cxx_type (str) – C++ type name (with namespace and template parameters)
  • ctor_params (str) – Parameter string to constructor call
  • include (list) – File names to #include
  • configurators (list) – C++ lines to apply on the object
  • static_configurators (list) – C++ lines to apply on the object’s class
class dsx.systemc.systemc.Configurator

A pure-C++ object inside the SystemC parent module.

This inherits ScNode.

__init__(name, cxx_type='', ctor_params='', includes=[], configurators=(), static_configurators=())

Creates a new object.

Parameters:
  • name (str) – instance name
  • cxx_type (str) – C++ type name (with namespace and template parameters)
  • ctor_params (str) – Parameter string to constructor call
  • include (list) – File names to #include
  • configurators (list) – C++ lines to apply on the object
  • static_configurators (list) – C++ lines to apply on the object’s class
class dsx.systemc.systemc.Segment

A segment object inside the SystemC parent module. (SoCLib-specific)

This inherits ScNode.

__init__(name, cxx_type='', ctor_params='', includes=[], configurators=(), static_configurators=())

Creates a new segment.

Parameters:
  • name (str) – segment name
  • cxx_type (str) – C++ type name (with namespace and template parameters)
  • ctor_params (str) – Parameter string to constructor call
  • include (list) – File names to #include
  • configurators (list) – C++ lines to apply on the object
  • static_configurators (list) – C++ lines to apply on the object’s class
class dsx.systemc.systemc.Port

A port object inside the SystemC parent module. This is used to export an interface on the module boundary.

This inherits ScNode.

__init__(name, cxx_type='', ctor_params='', includes=[], configurators=(), connection_lines=[])

Creates a new port.

Parameters:
  • name (str) – port name
  • cxx_type (str) – C++ type name (with namespace and template parameters)
  • ctor_params (str) – Parameter string to constructor call
  • include (list) – File names to #include
  • configurators (list) – C++ lines to apply on the object
  • static_configurators (list) – C++ lines to apply on the object’s class

The SystemC netlist driver

class dsx.systemc.driver.ScModuleDriver

Driver class for a Systemc netlist.

__init__(outdir, module_name)

Create a new SystemC driver.

Parameters:
  • outdir (str) – Output directory
  • module_name (str) – Name for module to create
header

Generated header file name

implementation

Generated implementation file name

drive(hw)

See dsx.driver.Driver.drive().

Parameters:hw (SystemC) – a SystemC object