Skip to content

Commit

Permalink
mux bugfix and flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghani committed May 26, 2023
1 parent eba0950 commit 2cfe446
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions top_level/design_instantiations_flattened.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand Down Expand Up @@ -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_;
Expand Down
4 changes: 2 additions & 2 deletions top_level/merged.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions top_level/multiplexer.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 2cfe446

Please sign in to comment.