3
0
Fork 0
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:
Clifford Wolf 2013-10-18 13:25:24 +02:00
parent 0836a1f2ba
commit cc5e379eca
2 changed files with 13 additions and 0 deletions

View file

@ -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());