data/full_repos/permissive/446997925/hw4/mux_2_to_1.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/446997925/hw4/mux_2_to_1.v:18: Multiple top level modules\n                                                                           : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                           : ... Top module \'mux_2_to_1\'\nmodule mux_2_to_1(a , b , sel, out );\n       ^~~~~~~~~~\n                                                                           : ... Top module \'mux_2_to_1_32bit\'\nmodule mux_2_to_1_32bit(a [31:0], b [31:0], sel, out [31:0]);\n       ^~~~~~~~~~~~~~~~\n                                                                           : ... Top module \'mux_2_to_1_3bit\'\nmodule mux_2_to_1_3bit(a [3:0], b [3:0], sel, out [3:0]);\n       ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/446997925/hw4/mux_2_to_1.v:32: Cannot find file containing module: \'AND_n_bit\'\nAND_n_bit first(or1[31:0], b[31:0], sel32 [31:0]);\n^~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/446997925/hw4,data/full_repos/permissive/446997925/AND_n_bit\n             data/full_repos/permissive/446997925/hw4,data/full_repos/permissive/446997925/AND_n_bit.v\n             data/full_repos/permissive/446997925/hw4,data/full_repos/permissive/446997925/AND_n_bit.sv\n             AND_n_bit\n             AND_n_bit.v\n             AND_n_bit.sv\n             obj_dir/AND_n_bit\n             obj_dir/AND_n_bit.v\n             obj_dir/AND_n_bit.sv\n%Error: data/full_repos/permissive/446997925/hw4/mux_2_to_1.v:33: Cannot find file containing module: \'AND_n_bit\'\nAND_n_bit second(or2[31:0], a[31:0], sel_not32 [31:0]);\n^~~~~~~~~\n%Error: data/full_repos/permissive/446997925/hw4/mux_2_to_1.v:34: Cannot find file containing module: \'OR_n_bit\'\nOR_n_bit or_gate(out[31:0], or1[31:0], or2[31:0]);\n^~~~~~~~\n%Error: Exiting due to 3 error(s), 1 warning(s)\n'
module mux_2_to_1_32bit(a [31:0], b [31:0], sel, out [31:0]);

input [31:0] a, b;
input sel;
output [31:0] out;

wire [31:0] or1, or2;
wire sel_not;

not(sel_not, sel);

wire [31:0] sel32 = {32{sel}};
wire [31:0] sel_not32 = {32{sel_not}};

AND_n_bit first(or1[31:0], b[31:0], sel32 [31:0]);
AND_n_bit second(or2[31:0], a[31:0], sel_not32 [31:0]);
OR_n_bit or_gate(out[31:0], or1[31:0], or2[31:0]);

endmodule
module mux_2_to_1_32bit(a [31:0], b [31:0], sel, out [31:0]);


input [31:0] a, b;
input sel;
output [31:0] out;

wire [31:0] or1, or2;
wire sel_not;

not(sel_not, sel);

wire [31:0] sel32 = {32{sel}};
wire [31:0] sel_not32 = {32{sel_not}};

AND_n_bit first(or1[31:0], b[31:0], sel32 [31:0]);
AND_n_bit second(or2[31:0], a[31:0], sel_not32 [31:0]);
OR_n_bit or_gate(out[31:0], or1[31:0], or2[31:0]);

endmodule