summaryrefslogtreecommitdiff
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 6271aeef..5075215c 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -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());