26 if (component ==
nullptr)
31 return std::make_unique<LUTComponent>(std::move(component), init_ascending);
36 return std::make_unique<FFComponent>(std::move(component), next_state_bf.
clone(), clock_bf.
clone());
41 return std::make_unique<LatchComponent>(std::move(component));
46 if (component ==
nullptr)
51 return std::make_unique<RAMComponent>(std::move(component), bit_size);
57 return std::make_unique<MACComponent>();
62 return std::make_unique<InitComponent>(init_category, init_identifiers);
65 std::unique_ptr<GateTypeComponent>
68 return std::make_unique<StateComponent>(std::move(component), state_identifier, neg_state_identifier);
72 const std::string& data_group,
73 const std::string& addr_group,
78 return std::make_unique<RAMPortComponent>(std::move(component), data_group, addr_group, clock_bf.
clone(), enable_bf.
clone(), is_write);
83 std::vector<GateTypeComponent*> components = this->
get_components(filter);
85 if (components.size() == 1)
87 return *components.begin();
BooleanFunction clone() const
virtual std::vector< GateTypeComponent * > get_components(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const =0
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_lut_component(std::unique_ptr< GateTypeComponent > component, bool init_ascending)
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_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_ff_component(std::unique_ptr< GateTypeComponent > component, const BooleanFunction &next_state_bf, const BooleanFunction &clock_bf)
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)
GateTypeComponent * get_component(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
static std::unique_ptr< GateTypeComponent > create_mac_component()