data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v
1: b'%Warning-WIDTH: data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v:38: Input port connection \'data_in_valid\' expects 1 bits on the pin connection, but pin connection\'s VARREF \'data_in_valid3\' generates 8 bits.\n                                                                                                              : ... In instance switch_fabric\n  .data_in_valid(data_in_valid3), .data_out(data_out3), \n   ^~~~~~~~~~~~~\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v:39: Output port connection \'data_out_ack\' expects 1 bits on the pin connection, but pin connection\'s VARREF \'data_out_ack3\' generates 8 bits.\n                                                                                                              : ... In instance switch_fabric\n  .data_out_ack(data_out_ack3));\n   ^~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v:42: Input port connection \'data_in_valid\' expects 1 bits on the pin connection, but pin connection\'s VARREF \'data_in_valid4\' generates 8 bits.\n                                                                                                              : ... In instance switch_fabric\n  .data_in_valid(data_in_valid4), .data_out(data_out4), \n   ^~~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v:43: Output port connection \'data_out_ack\' expects 1 bits on the pin connection, but pin connection\'s VARREF \'data_out_ack4\' generates 8 bits.\n                                                                                                              : ... In instance switch_fabric\n  .data_out_ack(data_out_ack4));\n   ^~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v:46: Input port connection \'data_in_valid\' expects 1 bits on the pin connection, but pin connection\'s VARREF \'data_in_valid5\' generates 8 bits.\n                                                                                                              : ... In instance switch_fabric\n  .data_in_valid(data_in_valid5), .data_out(data_out5), \n   ^~~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/441359809/src/yosys/tests/asicworld/code_specman_switch_fabric.v:47: Output port connection \'data_out_ack\' expects 1 bits on the pin connection, but pin connection\'s VARREF \'data_out_ack5\' generates 8 bits.\n                                                                                                              : ... In instance switch_fabric\n  .data_out_ack(data_out_ack5));\n   ^~~~~~~~~~~~\n%Error: Exiting due to 6 warning(s)\n'
module switch (
  clk,
  reset,
  data_in,
  data_in_valid,
  data_out,
  data_out_ack
);

input   clk;
input   reset;
input [7:0]  data_in;
input   data_in_valid;
output [7:0]  data_out;
output  data_out_ack;

reg [7:0]  data_out;
reg   data_out_ack;

always @ (posedge clk)
if (reset) begin
   data_out <= 0;
   data_out_ack <= 0;
end else if (data_in_valid) begin
   data_out <= data_in;
   data_out_ack <= 1;
end else begin
   data_out <= 0;
   data_out_ack <= 0;
end

endmodule
module switch (
  clk,
  reset,
  data_in,
  data_in_valid,
  data_out,
  data_out_ack
);


input   clk;
input   reset;
input [7:0]  data_in;
input   data_in_valid;
output [7:0]  data_out;
output  data_out_ack;

reg [7:0]  data_out;
reg   data_out_ack;

always @ (posedge clk)
if (reset) begin
   data_out <= 0;
   data_out_ack <= 0;
end else if (data_in_valid) begin
   data_out <= data_in;
   data_out_ack <= 1;
end else begin
   data_out <= 0;
   data_out_ack <= 0;
end

endmodule