mirror of https://github.com/YosysHQ/yosys.git
abstract: -state refactor sigbit rep pool collection
This commit is contained in:
parent
bfb20147b7
commit
355f5e3740
|
@ -43,10 +43,7 @@ bool abstract_state_port(FfData& ff, SigSpec& port_sig, std::set<int> offsets, E
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int abstract_state(Module* mod, EnableLogic enable) {
|
pool<SigBit> gather_selected_reps(Module* mod, SigMap& sigmap) {
|
||||||
CellTypes ct;
|
|
||||||
ct.setup_internals_ff();
|
|
||||||
SigMap sigmap(mod);
|
|
||||||
pool<SigBit> selected_representatives;
|
pool<SigBit> selected_representatives;
|
||||||
|
|
||||||
// Collect reps for all wire bits of selected wires
|
// Collect reps for all wire bits of selected wires
|
||||||
|
@ -60,6 +57,14 @@ unsigned int abstract_state(Module* mod, EnableLogic enable) {
|
||||||
if (cell->output(conn.first))
|
if (cell->output(conn.first))
|
||||||
for (auto bit : conn.second.bits())
|
for (auto bit : conn.second.bits())
|
||||||
selected_representatives.insert(sigmap(bit));
|
selected_representatives.insert(sigmap(bit));
|
||||||
|
return selected_representatives;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int abstract_state(Module* mod, EnableLogic enable) {
|
||||||
|
CellTypes ct;
|
||||||
|
ct.setup_internals_ff();
|
||||||
|
SigMap sigmap(mod);
|
||||||
|
pool<SigBit> selected_representatives = gather_selected_reps(mod, sigmap);
|
||||||
|
|
||||||
unsigned int changed = 0;
|
unsigned int changed = 0;
|
||||||
std::vector<FfData> ffs;
|
std::vector<FfData> ffs;
|
||||||
|
|
Loading…
Reference in New Issue