mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-27 01:39:23 +00:00
consty stuff
This commit is contained in:
parent
36289ab208
commit
8bdcc6987b
2 changed files with 56 additions and 4 deletions
|
|
@ -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 ¶mname, RTLIL::Const value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue