Base Module
Base Hardware Module.
BaseMod defines the base interface which is common to all hardware modules.
BaseMod
Bases: NamedObject
Hardware Module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent |
BaseMod
|
Parent Module. |
None
|
name |
str
|
Instance name. Required if parent is provided. |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
title |
str
|
Title |
descr |
str
|
Description |
comment |
str
|
Comment |
paramdict |
dict
|
Parameter values for this instance. |
basequalnames
cached
property
Qualified Name (Library Name + Module Name) of Base Modules.
is_locked
property
Return If Module Is Already Completed And Locked For Modification.
Locking is done by the build process automatically and MUST NOT be done earlier or later. Use a different module type or enumeration or struct type, if you have issues with locking.
add_param
Add Module Parameter (:any:Param).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arg |
BaseType | Param
|
Type or Parameter |
required |
name |
str | None
|
Name. Mandatory if arg is a Type. |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
title |
str | None
|
Full Spoken Name. |
descr |
str | None
|
Documentation Description. |
comment |
str | None
|
Source Code Comment. |
ifdef |
str | None
|
IFDEF pragma |
exist_ok |
bool
|
Do not complain about already existing item |
add_const
Add Module Internal Constant (:any:Const).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arg |
BaseType | Const
|
Type or Parameter |
required |
name |
str | None
|
Name. Mandatory if arg is a Type. |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
title |
str | None
|
Full Spoken Name. |
descr |
str | None
|
Documentation Description. |
comment |
str | None
|
Source Code Comment. |
ifdef |
str | None
|
IFDEF pragma |
exist_ok |
bool
|
Do not complain about already existing item |
add_type_consts
Add description of type_ as local parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_ |
Type to be described. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
exist_ok |
bool
|
Do not complain, if parameter already exists. |
name |
str
|
Name of the local parameter. Base on |
only |
str
|
Limit parameters to these listed in here, separated by ';' |
item_suffix |
str
|
Enumeration Suffix. |
add_port
Add Module Port (:any:Port).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_ |
BaseType
|
Type. |
required |
name |
str
|
Name. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
direction |
Direction | None
|
Signal Direction. Automatically detected if |
title |
str | None
|
Full Spoken Name. |
descr |
str | None
|
Documentation Description. |
comment |
str | None
|
Source Code Comment. Default is 'title' |
ifdef |
str | None
|
IFDEF mapping |
route |
Routeables | None
|
Routes (iterable or string separated by ';') |
add_signal
add_signal(type_, name, direction=FWD, title=None, descr=None, comment=None, ifdef=None, route=None)
Add Module Internal Signal (:any:Signal).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_ |
BaseType
|
Type. |
required |
name |
str
|
Name. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
direction |
Orientation
|
Signal Direction. Automatically detected if |
title |
str | None
|
Full Spoken Name. |
descr |
str | None
|
Documentation Description. |
comment |
str | None
|
Source Code Comment. Default is 'title' |
ifdef |
str | None
|
IFDEF mapping |
route |
Routeables | None
|
Routes (iterable or string separated by ';') |
add_port_or_signal
add_port_or_signal(type_, name, direction=None, title=None, descr=None, comment=None, ifdef=None, route=None)
Add Module Port (:any:Port) or Signal (:any:Signal) depending on name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_ |
BaseType
|
Type. |
required |
name |
str
|
Name. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
direction |
Direction | None
|
Signal Direction. Automatically detected if |
title |
str | None
|
Full Spoken Name. |
descr |
str | None
|
Documentation Description. |
comment |
str | None
|
Source Code Comment. Default is 'title' |
ifdef |
str | None
|
IFDEF mapping |
route |
Routeables | None
|
Routes (iterable or string separated by ';') |
set_parent
Set Parent.
Do not use this method, until you really really really know what you do.
assign
Assign target to source.
The assignment is done without routing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target |
Parseable
|
Target to be driven. Must be known within this module. |
required |
source |
Parseable | Note
|
Source driving target. Must be known within this module. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
cast |
bool
|
Cast. |
overwrite |
bool
|
Overwrite existing assignment. |
filter_ |
(str, Callable)
|
Target names or function to filter target identifiers. |
add_inst
set_instcon
Connect port of inst to expr without routing.
The assignment is done without routing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inst |
Union[BaseMod, str]
|
Module Instance |
required |
port |
Parseable
|
Port to be connected. Must be known within module instance. |
required |
expr |
Parseable
|
Expression. Must be known within this module. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
cast |
bool
|
Cast. |
overwrite |
bool
|
Overwrite existing assignment. |
add_flipflop
Add Module Internal Flip-Flop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_ |
BaseType
|
Type. |
required |
name |
str
|
Name. |
required |
clk |
Parseable
|
Clock. Module Clock by default. |
required |
rst_an |
Parseable
|
Reset. Module Reset by default. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
nxt |
Parseable | None
|
Next Value. Basename of |
rst |
Parseable | None
|
Synchronous Reset. |
ena |
Parseable | None
|
Enable Condition. |
route |
Routeables | None
|
Routing of flip-flop output. |
add_mux
Add Multiplexer with name And Return It For Filling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
str
|
Name. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
title |
str
|
Full Spoken Name. |
descr |
str
|
Documentation Description. |
comment |
str
|
Source Code Comment. |
See :any:Mux.set() how to fill the multiplexer and the example above.
lock
Lock.
Locking is done via this method by the build process automatically and MUST NOT be done earlier or later. Use a different module type or enumeration or struct type, if you have issues with locking.
Router
Bases: Object
The One And Only Router.