data/full_repos/permissive/434644200/tetris_top.v
1: b"%Error: data/full_repos/permissive/434644200/tetris_top.v:80: Cannot find file containing module: 'tetris_array'\ntetris_array tArray(\n^~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/434644200,data/full_repos/permissive/434644200/tetris_array\n             data/full_repos/permissive/434644200,data/full_repos/permissive/434644200/tetris_array.v\n             data/full_repos/permissive/434644200,data/full_repos/permissive/434644200/tetris_array.sv\n             tetris_array\n             tetris_array.v\n             tetris_array.sv\n             obj_dir/tetris_array\n             obj_dir/tetris_array.v\n             obj_dir/tetris_array.sv\n%Error: data/full_repos/permissive/434644200/tetris_top.v:92: Cannot find file containing module: 'hdmi_output'\nhdmi_output hdmi_o(\n^~~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module tetris(
  input                 clk,
  input                 rst,
  input                 left,
  input                 right,
  input                 rotate,
  input                 fall,
  output reg    [3:0]   led,
  output reg            hs,
  output reg            vs,
  output reg            de,
  output wire   [7:0]   rgb_r,
  output wire   [7:0]   rgb_g,
  output wire   [7:0]   rgb_b
);


wire  [11:0]  active_x, active_y;
wire  [11:0]  v_cnt, h_cnt;
wire          hs_syn, vs_syn;
wire          video_active;
wire          temp_bit;


always@(posedge clk or posedge rst) begin
  if(rst == 1'b1)
    begin
      hs <= 1'b0;
      vs <= 1'b0;
      de <= 1'b0;
    end
  else
    begin
      hs <= hs_syn;
      vs <= vs_syn;
      de <= video_active;
    end
end


reg   [3:0] action;
reg   [3:0] temp_preAction_in;
wire  [3:0] temp_action_in;
assign      temp_action_in = {left, right, rotate, fall};
integer i;
always@(posedge clk or posedge rst) begin
  if(rst == 1'b1) begin
    led               <= 4'b0;
    action            <= 4'b0;
    temp_preAction_in <= 4'b0;
  end
  else begin
    temp_preAction_in <= temp_action_in;
    for(i=1; i<4; i=i+1) begin
      if(temp_action_in[i] == 1'b1 && temp_preAction_in[i] == 1'b0) begin
        led[i]        <= ~led[i];
        action[i]     <= 1'b1;
      end
      else begin
        action[i]     <= 1'b0;
      end
    end
    action[0]         <= ~fall;
    if(temp_action_in[0] == 1'b1 && temp_preAction_in[0] == 1'b0)
      led[0]          <= ~led[0];
  end
end


tetris_array tArray(
  .clk(clk),
  .rst(rst),
  .h_cnt(h_cnt),
  .v_cnt(v_cnt),
  .active_x(active_x),
  .active_y(active_y),
  .action(action),
  .temp_bit(temp_bit)
);


hdmi_output hdmi_o(
  .clk(clk),
  .rst(rst),
  .hs_reg(hs_syn),
  .vs_reg(vs_syn),
  .video_active(video_active),
  .rgb_r_reg(rgb_r),
  .rgb_g_reg(rgb_g),
  .rgb_b_reg(rgb_b),
  .active_x(active_x),
  .active_y(active_y),
  .h_cnt(h_cnt),
  .v_cnt(v_cnt),
  .temp_bit(temp_bit) 
);

endmodule
module tetris(
  input                 clk,
  input                 rst,
  input                 left,
  input                 right,
  input                 rotate,
  input                 fall,
  output reg    [3:0]   led,
  output reg            hs,
  output reg            vs,
  output reg            de,
  output wire   [7:0]   rgb_r,
  output wire   [7:0]   rgb_g,
  output wire   [7:0]   rgb_b
);



wire  [11:0]  active_x, active_y;
wire  [11:0]  v_cnt, h_cnt;
wire          hs_syn, vs_syn;
wire          video_active;
wire          temp_bit;


always@(posedge clk or posedge rst) begin
  if(rst == 1'b1)
    begin
      hs <= 1'b0;
      vs <= 1'b0;
      de <= 1'b0;
    end
  else
    begin
      hs <= hs_syn;
      vs <= vs_syn;
      de <= video_active;
    end
end


reg   [3:0] action;
reg   [3:0] temp_preAction_in;
wire  [3:0] temp_action_in;
assign      temp_action_in = {left, right, rotate, fall};
integer i;
always@(posedge clk or posedge rst) begin
  if(rst == 1'b1) begin
    led               <= 4'b0;
    action            <= 4'b0;
    temp_preAction_in <= 4'b0;
  end
  else begin
    temp_preAction_in <= temp_action_in;
    for(i=1; i<4; i=i+1) begin
      if(temp_action_in[i] == 1'b1 && temp_preAction_in[i] == 1'b0) begin
        led[i]        <= ~led[i];
        action[i]     <= 1'b1;
      end
      else begin
        action[i]     <= 1'b0;
      end
    end
    action[0]         <= ~fall;
    if(temp_action_in[0] == 1'b1 && temp_preAction_in[0] == 1'b0)
      led[0]          <= ~led[0];
  end
end


tetris_array tArray(
  .clk(clk),
  .rst(rst),
  .h_cnt(h_cnt),
  .v_cnt(v_cnt),
  .active_x(active_x),
  .active_y(active_y),
  .action(action),
  .temp_bit(temp_bit)
);


hdmi_output hdmi_o(
  .clk(clk),
  .rst(rst),
  .hs_reg(hs_syn),
  .vs_reg(vs_syn),
  .video_active(video_active),
  .rgb_r_reg(rgb_r),
  .rgb_g_reg(rgb_g),
  .rgb_b_reg(rgb_b),
  .active_x(active_x),
  .active_y(active_y),
  .h_cnt(h_cnt),
  .v_cnt(v_cnt),
  .temp_bit(temp_bit) 
);

endmodule