data/full_repos/permissive/146246005/Scalable Multiplexer/scale_tb.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Error: Cannot find file containing module: Multiplexer,data/full_repos/permissive/146246005\n        ... Looked in:\n             data/full_repos/permissive/146246005/Scalable/Multiplexer,data/full_repos/permissive/146246005\n             data/full_repos/permissive/146246005/Scalable/Multiplexer,data/full_repos/permissive/146246005.v\n             data/full_repos/permissive/146246005/Scalable/Multiplexer,data/full_repos/permissive/146246005.sv\n             Multiplexer,data/full_repos/permissive/146246005\n             Multiplexer,data/full_repos/permissive/146246005.v\n             Multiplexer,data/full_repos/permissive/146246005.sv\n             obj_dir/Multiplexer,data/full_repos/permissive/146246005\n             obj_dir/Multiplexer,data/full_repos/permissive/146246005.v\n             obj_dir/Multiplexer,data/full_repos/permissive/146246005.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/146246005/Scalable\n%Error: Cannot find file containing module: Multiplexer/scale_tb.v\n%Error: Exiting due to 3 error(s)\n'
module scale_tb();


reg [7:0]A8,B8;
reg [4:0]A5,B5;
reg [1:0]A2,B2;
reg A1,B1;
reg SEL;

wire [7:0] OUT8;
wire [4:0] OUT5;
wire [1:0] OUT2;
wire OUT1;


	scale_mux #(8) MUX8(A8,B8,SEL,OUT8);

  scale_mux #(.Size(5)) MUX5(A5,B5,SEL,OUT5);


  defparam MUX2.Size=2;
  scale_mux MUX2(A2,B2,SEL,OUT2);

  scale_mux MUX1(A1,B1,SEL,OUT1);

initial begin
  $vcdpluson;
  $monitor("%d ns, OUT8=%b, OUT5=%b, OUT2=%b, OUT1=%b \n\t\t A8=%b ,B8=%b, SEL=%b",$time,OUT8,OUT5,OUT2,OUT1,A8,B8,SEL);
end

always @* begin
  A5=A8[4:0];
  B5=B8[4:0];

  A2=A8[1:0];
  B2=B8[1:0];

  A1=A8[0];
  B1=B8[0];
end

initial begin

  $display("\nTest 1: SEL=1, A=!B, OUT=B"); A8=8'b01010101; B8=8'b10101010; SEL=1'b1;

  #10 $display("\nTest 2: SEL=0, OUT=A");SEL=1'b0;


  #10 $display("\nTest 3: SEL=x, A[7:4]=B[7:4], OUT[7:4]=A[7:4], OUT[3:0]=x"); A8=8'b10101010; B8=8'b10100101; SEL=1'bx;

  #10 $display("Test 4: SEL=x, A!=B, OUT=x"); A8=8'b11111111; B8=8'b00000000; SEL=1'bx;

  #10 $display("\nTest 5: SEL=x, A=B=1, OUT=A=0"); A8=8'b11111111; B8=8'b11111111; SEL=1'bx;

  #10 $display("\nTest 6: SEL=x, A=B=0, OUT=A=0"); A8=8'b00000000; B8=8'b00000000; SEL=1'bx;
#10 $finish;
end
endmodule
module scale_tb();



reg [7:0]A8,B8;
reg [4:0]A5,B5;
reg [1:0]A2,B2;
reg A1,B1;
reg SEL;

wire [7:0] OUT8;
wire [4:0] OUT5;
wire [1:0] OUT2;
wire OUT1;


	scale_mux #(8) MUX8(A8,B8,SEL,OUT8);

  scale_mux #(.Size(5)) MUX5(A5,B5,SEL,OUT5);


  defparam MUX2.Size=2;
  scale_mux MUX2(A2,B2,SEL,OUT2);

  scale_mux MUX1(A1,B1,SEL,OUT1);

initial begin
  $vcdpluson;
  $monitor("%d ns, OUT8=%b, OUT5=%b, OUT2=%b, OUT1=%b \n\t\t A8=%b ,B8=%b, SEL=%b",$time,OUT8,OUT5,OUT2,OUT1,A8,B8,SEL);
end

always @* begin
  A5=A8[4:0];
  B5=B8[4:0];

  A2=A8[1:0];
  B2=B8[1:0];

  A1=A8[0];
  B1=B8[0];
end

initial begin

  $display("\nTest 1: SEL=1, A=!B, OUT=B"); A8=8'b01010101; B8=8'b10101010; SEL=1'b1;

  #10 $display("\nTest 2: SEL=0, OUT=A");SEL=1'b0;


  #10 $display("\nTest 3: SEL=x, A[7:4]=B[7:4], OUT[7:4]=A[7:4], OUT[3:0]=x"); A8=8'b10101010; B8=8'b10100101; SEL=1'bx;

  #10 $display("Test 4: SEL=x, A!=B, OUT=x"); A8=8'b11111111; B8=8'b00000000; SEL=1'bx;

  #10 $display("\nTest 5: SEL=x, A=B=1, OUT=A=0"); A8=8'b11111111; B8=8'b11111111; SEL=1'bx;

  #10 $display("\nTest 6: SEL=x, A=B=0, OUT=A=0"); A8=8'b00000000; B8=8'b00000000; SEL=1'bx;
#10 $finish;
end
endmodule