mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 07:27:58 +00:00
Added RTLIL NEW_WIRE macro
This commit is contained in:
parent
0836a1f2ba
commit
cc5e379eca
2 changed files with 13 additions and 0 deletions
|
@ -382,6 +382,15 @@ RTLIL::Module *RTLIL::Module::clone() const
|
|||
return new_mod;
|
||||
}
|
||||
|
||||
RTLIL::SigSpec RTLIL::Module::new_wire(int width, RTLIL::IdString name)
|
||||
{
|
||||
RTLIL::Wire *wire = new RTLIL::Wire;
|
||||
wire->width = width;
|
||||
wire->name = name;
|
||||
add(wire);
|
||||
return wire;
|
||||
}
|
||||
|
||||
void RTLIL::Module::add(RTLIL::Wire *wire)
|
||||
{
|
||||
assert(!wire->name.empty());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue