3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-27 01:39:23 +00:00

consty stuff

This commit is contained in:
Emil J. Tywoniak 2024-06-13 12:55:52 +02:00
parent 36289ab208
commit 8bdcc6987b
2 changed files with 56 additions and 4 deletions

View file

@ -3525,6 +3525,22 @@ const RTLIL::SigSpec &RTLIL::Cell::getPort(const RTLIL::IdString &portname) cons
throw std::out_of_range("Cell::setPort()");
}
}
const RTLIL::SigSpec &RTLIL::Cell::getPort(const RTLIL::IdString &portname) {
if (is_legacy())
return legacy->getPort(portname);
if (type == ID($not)) {
if (portname == ID::A) {
return not_.a;
} else if (portname == ID::Y) {
return not_.y;
} else {
throw std::out_of_range("Cell::setPort()");
}
} else {
throw std::out_of_range("Cell::setPort()");
}
}
// TODO autogen
void RTLIL::Cell::setParam(const RTLIL::IdString &paramname, RTLIL::Const value) {