diff --git a/src/cells/dff.mjs b/src/cells/dff.mjs index 23f088c..e31c6b3 100644 --- a/src/cells/dff.mjs +++ b/src/cells/dff.mjs @@ -68,7 +68,7 @@ export const Dff = Box.define('Dff', { if ('clock' in polarity) { last_clk = this.last_clk; this.last_clk = data.clk.get(0); - }; + } if ('enable' in polarity && data.en.get(0) != pol('enable')) return this.get('outputSignals'); if ('arst' in polarity && data.arst.get(0) == pol('arst')) diff --git a/src/cells/io.mjs b/src/cells/io.mjs index b58bd7b..59984a8 100644 --- a/src/cells/io.mjs +++ b/src/cells/io.mjs @@ -161,6 +161,7 @@ export const NumEntry = NumBase.define('NumEntry', { this.get('ports').items = [ { id: 'out', group: 'out', dir: 'out', bits: bits } ]; + this.setLogicValue(Vector3vl.xes(bits)); NumBase.prototype.initialize.apply(this, arguments); @@ -422,7 +423,7 @@ export const IOView = BoxView.extend({ export const Input = IO.define('Input', {}, { io_dir: 'out', setLogicValue: function(sig) { - if (sig.bits != this.get('bits')) + if (sig.bits != this.get('bits')) throw new Error("setLogicValue: wrong number of bits"); this.set('outputSignals', { out: sig }); }