33 #include <unordered_map>
65 void set_name(std::string
name);
72 std::string get_name()
const;
117 bool assign_gate(
Gate* gate,
bool force =
false);
128 bool assign_gate_by_id(
const u32 gate_id,
bool force =
false);
135 const std::vector<Gate*>& get_gates()
const;
144 std::vector<Gate*> get_gates(
const std::function<
bool(
Gate*)>& filter)
const;
153 std::vector<u32> get_gate_ids(
const std::function<
bool(
Gate*)>& filter =
nullptr)
const;
162 bool remove_gate(
Gate* gate);
171 bool remove_gate_by_id(
const u32 gate_id);
179 bool contains_gate(
Gate* gate)
const;
187 bool contains_gate_by_id(
const u32 gate_id)
const;
204 bool assign_net(
Net*
net,
bool force =
false);
215 bool assign_net_by_id(
const u32 net_id,
bool force =
false);
222 const std::vector<Net*>& get_nets()
const;
231 std::vector<Net*> get_nets(
const std::function<
bool(
Net*)>& filter)
const;
240 std::vector<u32> get_net_ids(
const std::function<
bool(
Net*)>& filter =
nullptr)
const;
249 bool remove_net(
Net*
net);
258 bool remove_net_by_id(
const u32 net_id);
266 bool contains_net(
Net*
net)
const;
274 bool contains_net_by_id(
const u32 net_id)
const;
302 bool assign_module_by_id(
const u32 module_id,
bool force =
false);
309 const std::vector<Module*>& get_modules()
const;
318 std::vector<Module*> get_modules(
const std::function<
bool(
Module*)>& filter)
const;
327 std::vector<u32> get_module_ids(
const std::function<
bool(
Module*)>& filter =
nullptr)
const;
345 bool remove_module_by_id(
const u32 module_id);
361 bool contains_module_by_id(
const u32 module_id)
const;
373 std::vector<Gate*> m_gates;
374 std::unordered_map<u32, Gate*> m_gates_map;
375 std::vector<Net*> m_nets;
376 std::unordered_map<u32, Net*> m_nets_map;
377 std::vector<Module*> m_modules;
378 std::unordered_map<u32, Module*> m_modules_map;
const Module * module(const Gate *g, const NodeBoxes &boxes)