From 2cfe44635d9f5b0379994caf32db9c90a2bd727b Mon Sep 17 00:00:00 2001 From: Anish Date: Thu, 25 May 2023 20:07:06 -0700 Subject: [PATCH] mux bugfix and flatten --- top_level/design_instantiations_flattened.v | 4 ++-- top_level/merged.v | 4 ++-- top_level/multiplexer.sv | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/top_level/design_instantiations_flattened.v b/top_level/design_instantiations_flattened.v index 143faf5..3508ed5 100644 --- a/top_level/design_instantiations_flattened.v +++ b/top_level/design_instantiations_flattened.v @@ -357516,7 +357516,7 @@ module design_instantiations(io_in, io_out, des_sel, hold_if_not_sel, sync_input assign _075176_ = ~ (* src = "merged.v:109545.14-109556.3|merged.v:0.0-0.0" *) _075562_; (* src = "merged.v:109545.14-109556.3|merged.v:109500.2-109506.5" *) always @(posedge \mux.clock ) - \mux.io_in_sync1 <= { 1'h0, \mux.io_in }; + \mux.io_in_sync1 <= { \mux.reset , \mux.io_in }; (* src = "merged.v:109545.14-109556.3|merged.v:109500.2-109506.5" *) always @(posedge \mux.clock ) \mux.io_in_sync2 <= \mux.io_in_sync1 ; @@ -358017,7 +358017,7 @@ module design_instantiations(io_in, io_out, des_sel, hold_if_not_sel, sync_input assign _074842_[63] = _074880_; assign _074841_[767:756] = _074879_; assign _074843_ = _075177_; - assign _074845_ = { 1'h0, \mux.io_in }; + assign _074845_ = { \mux.reset , \mux.io_in }; assign _074846_ = \mux.io_in_sync1 ; assign _074847_ = \mux.io_in_sync2 ; assign _074840_ = _075177_; diff --git a/top_level/merged.v b/top_level/merged.v index ae97434..a54d175 100644 --- a/top_level/merged.v +++ b/top_level/merged.v @@ -109500,9 +109500,9 @@ module multiplexer ( always @(posedge clock) begin des_sel_dec <= 1'sb0; des_sel_dec[des_sel] <= 1; - io_in_sync3 <= {reset, io_in_sync2}; + io_in_sync3 <= io_in_sync2; io_in_sync2 <= io_in_sync1; - io_in_sync1 <= io_in; + io_in_sync1 <= {reset, io_in}; end integer i; always @(*) begin diff --git a/top_level/multiplexer.sv b/top_level/multiplexer.sv index fb12cc4..26fa685 100644 --- a/top_level/multiplexer.sv +++ b/top_level/multiplexer.sv @@ -24,9 +24,9 @@ module multiplexer ( des_sel_dec[des_sel] <= 1; // 3FF sync the inputs - io_in_sync3 <= {reset, io_in_sync2}; + io_in_sync3 <= io_in_sync2; io_in_sync2 <= io_in_sync1; - io_in_sync1 <= io_in; + io_in_sync1 <= {reset, io_in}; end integer i; @@ -40,7 +40,7 @@ module multiplexer ( // hold_if_not_sel will hold all others // in reset with all-zero inputs when set - if (hold_if_not_sel && (!des_sel_dec[i])) begin + if (hold_if_not_sel && (!(des_sel_dec[i]))) begin des_io_in[i] = '0; des_reset[i] = '1; end