![]() |
HAL
|
#include <ram_port_component.h>
Public Member Functions | |
RAMPortComponent (std::unique_ptr< GateTypeComponent > component, const std::string &data_group, const std::string &addr_group, const BooleanFunction &clock_bf, const BooleanFunction &enable_bf, bool is_write) | |
ComponentType | get_type () const override |
std::vector< GateTypeComponent * > | get_components (const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const override |
const std::string & | get_data_group () const |
void | set_data_group (const std::string &data_group) |
const std::string & | get_address_group () const |
void | set_address_group (const std::string &addr_group) |
const BooleanFunction & | get_clock_function () const |
void | set_clock_function (const BooleanFunction &clock_bf) |
const BooleanFunction & | get_enable_function () const |
void | set_enable_function (const BooleanFunction &enable_bf) |
bool | is_write_port () const |
void | set_write_port (bool is_write) |
![]() | |
virtual | ~GateTypeComponent ()=default |
template<typename T > | |
T * | convert_to () |
template<typename T > | |
const T * | convert_to () const |
GateTypeComponent * | get_component (const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const |
template<typename T > | |
T * | get_component_as (const std::function< bool(const GateTypeComponent *)> &filter=nullptr) |
Static Public Member Functions | |
static bool | is_class_of (const GateTypeComponent *component) |
![]() | |
static std::unique_ptr< GateTypeComponent > | create_lut_component (std::unique_ptr< GateTypeComponent > component, bool init_ascending) |
static std::unique_ptr< GateTypeComponent > | create_ff_component (std::unique_ptr< GateTypeComponent > component, const BooleanFunction &next_state_bf, const BooleanFunction &clock_bf) |
static std::unique_ptr< GateTypeComponent > | create_latch_component (std::unique_ptr< GateTypeComponent > component) |
static std::unique_ptr< GateTypeComponent > | create_ram_component (std::unique_ptr< GateTypeComponent > component, const u32 bit_size) |
static std::unique_ptr< GateTypeComponent > | create_mac_component () |
static std::unique_ptr< GateTypeComponent > | create_init_component (const std::string &init_category, const std::vector< std::string > &init_identifiers) |
static std::unique_ptr< GateTypeComponent > | create_state_component (std::unique_ptr< GateTypeComponent > component, const std::string &state_identifier, const std::string &neg_state_identifier) |
static std::unique_ptr< GateTypeComponent > | create_ram_port_component (std::unique_ptr< GateTypeComponent > component, const std::string &data_group, const std::string &addr_group, const BooleanFunction &clock_bf, const BooleanFunction &enable_bf, bool is_write) |
Additional Inherited Members | |
![]() | |
enum class | ComponentType { lut , ff , latch , ram , mac , init , state , ram_port } |
Definition at line 33 of file ram_port_component.h.
hal::RAMPortComponent::RAMPortComponent | ( | std::unique_ptr< GateTypeComponent > | component, |
const std::string & | data_group, | ||
const std::string & | addr_group, | ||
const BooleanFunction & | clock_bf, | ||
const BooleanFunction & | enable_bf, | ||
bool | is_write | ||
) |
Construct a new RAMPortComponent with given child component, the write/read data/address pin groups, and the write/read clock/enable functions.
[in] | component | - Another component to be added as a child component. |
[in] | data_group | - The name of the read or write data pin group. |
[in] | addr_group | - The name of the read or write address pin group. |
[in] | clock_bf | - The read or write clock's Boolean function. |
[in] | enable_bf | - The read or write enable's Boolean function. |
[in] | is_write | - True if the port is a write port, false otherwise. |
Definition at line 5 of file ram_port_component.cpp.
const std::string & hal::RAMPortComponent::get_address_group | ( | ) | const |
Get the name of the read or write address pin group.
Definition at line 58 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
const BooleanFunction & hal::RAMPortComponent::get_clock_function | ( | ) | const |
Get the Boolean function determining the read or write clock.
Definition at line 68 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
|
overridevirtual |
Get the sub-components of the gate type component. A user-defined filter may be applied to the result vector, but is disabled by default.
[in] | filter | - The user-defined filter function applied to all candidate components. |
Implements hal::GateTypeComponent.
Definition at line 25 of file ram_port_component.cpp.
const std::string & hal::RAMPortComponent::get_data_group | ( | ) | const |
Get the name of the read or write data pin group.
Definition at line 48 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
const BooleanFunction & hal::RAMPortComponent::get_enable_function | ( | ) | const |
Get the Boolean function determining the read or write enable.
Definition at line 78 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
|
overridevirtual |
Get the type of the gate type component.
Implements hal::GateTypeComponent.
Definition at line 15 of file ram_port_component.cpp.
|
static |
Check whether a component is a RAMPortComponent.
[in] | component | - The component to check. |
Definition at line 20 of file ram_port_component.cpp.
References hal::GateTypeComponent::get_type().
Referenced by hal::gate_type_components_init(), hal::RAMPortWizardPage::initializePage(), and hal::GateLibraryFrameRAMPort::update().
bool hal::RAMPortComponent::is_write_port | ( | ) | const |
Check whether the port is a write or a read port.
Definition at line 88 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
void hal::RAMPortComponent::set_address_group | ( | const std::string & | addr_group | ) |
Set the name of the read or write address pin group.
[in] | addr_group | - The name of the pin group. |
Definition at line 63 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
void hal::RAMPortComponent::set_clock_function | ( | const BooleanFunction & | clock_bf | ) |
Set the Boolean function determining the read or write clock.
[in] | clock_bf | - The Boolean function. |
Definition at line 73 of file ram_port_component.cpp.
References hal::BooleanFunction::clone().
Referenced by hal::gate_type_components_init().
void hal::RAMPortComponent::set_data_group | ( | const std::string & | data_group | ) |
Set the name of the read or write data pin group.
[in] | data_group | - The name of the pin group. |
Definition at line 53 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().
void hal::RAMPortComponent::set_enable_function | ( | const BooleanFunction & | enable_bf | ) |
Set the Boolean function determining the read or write enable.
[in] | enable_bf | - The Boolean function. |
Definition at line 83 of file ram_port_component.cpp.
References hal::BooleanFunction::clone().
Referenced by hal::gate_type_components_init().
void hal::RAMPortComponent::set_write_port | ( | bool | is_write | ) |
Set the port to be a write or a read port.
[in] | is_write | - True to set the port to be a write port, false to set it to be a read port. |
Definition at line 93 of file ram_port_component.cpp.
Referenced by hal::gate_type_components_init().