diff --git a/vpr7_x2p/vpr/ARCH/k6_N10_scan_chain_ptm45nm_TT.xml b/vpr7_x2p/vpr/ARCH/k6_N10_scan_chain_ptm45nm_TT.xml index f056d3b9b..9ee90ce4b 100644 --- a/vpr7_x2p/vpr/ARCH/k6_N10_scan_chain_ptm45nm_TT.xml +++ b/vpr7_x2p/vpr/ARCH/k6_N10_scan_chain_ptm45nm_TT.xml @@ -174,7 +174,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -299,7 +299,7 @@ - + @@ -307,7 +307,7 @@ - + @@ -320,7 +320,7 @@ - + @@ -331,7 +331,7 @@ - + diff --git a/vpr7_x2p/vpr/SRC/fpga_spice/spice/spice_mux.c b/vpr7_x2p/vpr/SRC/fpga_spice/spice/spice_mux.c index 76edce0d0..daac233b4 100644 --- a/vpr7_x2p/vpr/SRC/fpga_spice/spice/spice_mux.c +++ b/vpr7_x2p/vpr/SRC/fpga_spice/spice/spice_mux.c @@ -796,10 +796,9 @@ void fprint_spice_mux_model_cmos_subckt(FILE* fp, fprintf(fp, "\n"); /* Handle the corner case: input size = 2 */ - if (2 == mux_size) { + cur_mux_structure = spice_model.design_tech_info.structure; + if (2 == spice_mux_arch.num_input) { cur_mux_structure = SPICE_MODEL_STRUCTURE_ONELEVEL; - } else { - cur_mux_structure = spice_model.design_tech_info.structure; } /* Print internal architecture*/ diff --git a/vpr7_x2p/vpr/SRC/fpga_spice/verilog/verilog_submodules.c b/vpr7_x2p/vpr/SRC/fpga_spice/verilog/verilog_submodules.c index b8afaada1..38198c4eb 100644 --- a/vpr7_x2p/vpr/SRC/fpga_spice/verilog/verilog_submodules.c +++ b/vpr7_x2p/vpr/SRC/fpga_spice/verilog/verilog_submodules.c @@ -1179,6 +1179,8 @@ void dump_verilog_cmos_mux_submodule(FILE* fp, t_spice_model_port** output_port = NULL; t_spice_model_port** sram_port = NULL; + enum e_spice_model_structure cur_mux_structure; + /* Find the basis subckt*/ char* mux_basis_subckt_name = NULL; char* mux_special_basis_subckt_name = NULL; @@ -1261,9 +1263,15 @@ void dump_verilog_cmos_mux_submodule(FILE* fp, /* Print local vdd and gnd*/ fprintf(fp, ");"); fprintf(fp, "\n"); + + /* Handle the corner case: input size = 2 */ + cur_mux_structure = spice_model.design_tech_info.structure; + if (2 == spice_mux_arch.num_input) { + cur_mux_structure = SPICE_MODEL_STRUCTURE_ONELEVEL; + } /* Print internal architecture*/ - switch (spice_model.design_tech_info.structure) { + switch (cur_mux_structure) { case SPICE_MODEL_STRUCTURE_TREE: dump_verilog_cmos_mux_tree_structure(fp, mux_basis_subckt_name, spice_model, spice_mux_arch, num_sram_port, sram_port);