mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-28 17:08:46 +00:00
Improvements in CellEdgesDatabase
This commit is contained in:
parent
f162b858f2
commit
b1c432af56
3 changed files with 167 additions and 16 deletions
|
@ -28,7 +28,7 @@ YOSYS_NAMESPACE_BEGIN
|
|||
struct AbstractCellEdgesDatabase
|
||||
{
|
||||
virtual ~AbstractCellEdgesDatabase() { }
|
||||
virtual void add_edge(RTLIL::Cell *cell, RTLIL::IdString from_port, int from_bit, RTLIL::IdString to_port, int to_bit) = 0;
|
||||
virtual void add_edge(RTLIL::Cell *cell, RTLIL::IdString from_port, int from_bit, RTLIL::IdString to_port, int to_bit, int delay) = 0;
|
||||
bool add_cell(RTLIL::Cell *cell);
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct FwdCellEdgesDatabase : AbstractCellEdgesDatabase
|
|||
dict<SigBit, pool<SigBit>> db;
|
||||
FwdCellEdgesDatabase(SigMap &sigmap) : sigmap(sigmap) { }
|
||||
|
||||
virtual void add_edge(RTLIL::Cell *cell, RTLIL::IdString from_port, int from_bit, RTLIL::IdString to_port, int to_bit) override {
|
||||
virtual void add_edge(RTLIL::Cell *cell, RTLIL::IdString from_port, int from_bit, RTLIL::IdString to_port, int to_bit, int) override {
|
||||
SigBit from_sigbit = sigmap(cell->getPort(from_port)[from_bit]);
|
||||
SigBit to_sigbit = sigmap(cell->getPort(to_port)[to_bit]);
|
||||
db[from_sigbit].insert(to_sigbit);
|
||||
|
@ -51,7 +51,7 @@ struct RevCellEdgesDatabase : AbstractCellEdgesDatabase
|
|||
dict<SigBit, pool<SigBit>> db;
|
||||
RevCellEdgesDatabase(SigMap &sigmap) : sigmap(sigmap) { }
|
||||
|
||||
virtual void add_edge(RTLIL::Cell *cell, RTLIL::IdString from_port, int from_bit, RTLIL::IdString to_port, int to_bit) override {
|
||||
virtual void add_edge(RTLIL::Cell *cell, RTLIL::IdString from_port, int from_bit, RTLIL::IdString to_port, int to_bit, int) override {
|
||||
SigBit from_sigbit = sigmap(cell->getPort(from_port)[from_bit]);
|
||||
SigBit to_sigbit = sigmap(cell->getPort(to_port)[to_bit]);
|
||||
db[to_sigbit].insert(from_sigbit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue