Domain-Specific Language APIs¶
-
class
pymtl3.dsl.Component.
Component
¶ -
__module__
= 'pymtl3.dsl.Component'¶
-
static
__new__
(cls, *args, **kwargs)¶ Convention: variables local to the object is created in __new__
-
add_component_by_name
(name, obj, provided_connections=[])¶
-
add_connection
(o1, o2)¶
-
add_connections
(*args)¶
-
add_value_port
(parent, name, o)¶
-
apply
(pass_instance)¶
-
check
()¶
-
delete_component
(name)¶
-
elaborate
()¶
-
get_all_components
()¶
-
get_all_explicit_constraints
()¶
-
get_all_method_nets
()¶
-
get_all_object_filter
(filt)¶
-
get_all_upblk_metadata
()¶
-
get_all_update_blocks
()¶
-
get_all_update_ff
()¶
-
get_all_update_once
()¶
-
get_all_value_nets
()¶
-
get_child_components
(sort_key=None)¶
-
get_component_level
()¶
-
get_connect_order
()¶
-
get_input_value_ports
(sort_key=None)¶
-
get_local_object_filter
(filt, sort_key=None)¶
-
get_metadata
(key)¶ Get the metadata
key
of the given component.Can be called before, during, or after elaboration.
Parameters: key (MetadataKey) – Key of the metadata.
Returns: The metadata of the given
key
.Return type: object
Raises: TypeError
– Raised ifkey
is not an instance ofMetadataKey
.UnsetMetadataError
– Raised if the component does not have metadata for the givenkey
.
-
get_output_value_ports
(sort_key=None)¶
-
get_signal_adjacency_dict
()¶
-
get_upblk_metadata
()¶
-
get_update_block_host_component
(blk)¶
-
get_update_block_info
(blk)¶
-
get_update_block_order
()¶
-
get_update_blocks
()¶
-
get_update_ff
()¶
-
get_wires
(sort_key=None)¶
-
has_metadata
(key)¶ Check if the component has metadata for
key
.Can be called before, during, or after elaboration.
Parameters: key (MetadataKey) – Key of the metadata. Returns: Whether or not the component has the metadata for key
.Return type: bool Raises: TypeError
– Raised ifkey
is not an instance ofMetadataKey
.
-
replace_component
(foo, cls, check=True)¶
-
replace_component_with_obj
(foo, new_obj, check=True)¶
-
set_metadata
(key, value)¶ Set the metadata
key
of the given component to bevalue
.Can be called before, during, or after elaboration.
Parameters: - key (MetadataKey) – Key of the metadata.
- value (object) – The metadata. Can be any object.
-