73 const std::unordered_map<u32, std::unordered_set<Gate*>>&
get_groups()
const;
187 const std::map<std::pair<PinDirection, std::string>, std::string>& pin_prefixes,
188 const std::unordered_set<u32>& group_ids)
const;
201 const std::map<std::pair<PinDirection, std::string>, std::string>& pin_prefixes,
202 const std::unordered_set<u32>& group_ids)
const;
210 std::vector<std::vector<Gate*>>
get_groups_as_list(
const std::unordered_set<u32>& group_ids = {})
const;
248 std::unordered_map<u32, std::unordered_set<Gate*>> m_gates_of_group;
253 std::unordered_map<const Gate*, u32> m_parent_group_of_gate;
258 std::unordered_map<const Gate*, std::unordered_map<PinType, std::unordered_set<Net*>>> m_gate_signals;
263 std::unordered_map<const Gate*, std::unordered_set<Gate*>> m_gate_successors;
268 std::unordered_map<const Gate*, std::unordered_set<Gate*>> m_gate_predecessors;
273 std::unordered_map<u32, std::unordered_map<PinType, std::unordered_set<Net*>>> m_group_signals;
278 std::unordered_map<u32, std::unordered_set<u32>> m_group_successors;
283 std::unordered_map<u32, std::unordered_set<u32>> m_group_predecessors;
Result of a dataflow analysis run.
hal::Result< u32 > merge_groups(const std::vector< u32 > &group_ids)
Merge multiple groups specified by ID.
hal::Result< std::unordered_set< Gate * > > get_gates_of_group(const u32 group_id) const
Get the gates of the specified group of sequential gates.
hal::Result< std::unordered_set< u32 > > get_group_predecessors(const u32 group_id) const
Get the predecessor groups of the group with the given ID.
hal::Result< std::vector< u32 > > split_group(u32 group_id, const std::vector< std::unordered_set< Gate * >> &new_groups)
Split a group into multiple smaller groups specified by sets of gates.
std::vector< std::vector< Gate * > > get_groups_as_list(const std::unordered_set< u32 > &group_ids={}) const
Get the groups of the dataflow analysis result as a list.
hal::Result< std::unordered_map< u32, Module * > > create_modules(const std::unordered_set< u32 > &group_ids={}) const
Create modules for the dataflow analysis result.
hal::Result< std::monostate > write_txt(const std::filesystem::path &out_path, const std::unordered_set< u32 > &group_ids={}) const
Write the groups resulting from dataflow analysis to a .txt file.
hal::Result< std::unordered_set< Net * > > get_group_control_nets(const u32 group_id, const PinType type) const
Get the control nets of the group with the given group ID that are connected to a pin of the specifie...
hal::Result< std::unordered_set< Gate * > > get_gate_successors(const Gate *gate) const
Get the sequential successor gates of the given sequential gate.
const std::unordered_map< u32, std::unordered_set< Gate * > > & get_groups() const
Get the groups of sequential gates resulting from dataflow analysis.
hal::Result< u32 > get_group_id_of_gate(const Gate *gate) const
Get the group ID of the group that contains the given gate.
hal::Result< std::unordered_set< Net * > > get_gate_control_nets(const Gate *gate, const PinType type) const
Get the control nets of the given gate that are connected to a pin of the specified type.
Result(Netlist *nl, const Grouping &grouping)
Netlist * get_netlist() const
Get the netlist on which dataflow analysis has been performed.
hal::Result< std::unordered_set< u32 > > get_group_successors(const u32 group_id) const
Get the successor groups of the group with the given ID.
hal::Result< std::unordered_set< Gate * > > get_gate_predecessors(const Gate *gate) const
Get the sequential predecessor gates of the given sequential gate.
std::vector< Gate * > get_gates() const
Get all gates contained in any of the groups groups.
hal::Result< std::monostate > write_dot(const std::filesystem::path &out_path, const std::unordered_set< u32 > &group_ids={}) const
Write the dataflow graph as a DOT graph to the specified location.
This file contains the class that holds all information of a dataflow analysis grouping.
Grouping used during dataflow analysis.