data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v
None: at end of input
1: b'%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:1: Cannot find include file: config.vh\n`include "config.vh" \n         ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/109936328/memory_peripheral,data/full_repos/permissive/109936328/config.vh\n             data/full_repos/permissive/109936328/memory_peripheral,data/full_repos/permissive/109936328/config.vh.v\n             data/full_repos/permissive/109936328/memory_peripheral,data/full_repos/permissive/109936328/config.vh.sv\n             config.vh\n             config.vh.v\n             config.vh.sv\n             obj_dir/config.vh\n             obj_dir/config.vh.v\n             obj_dir/config.vh.sv\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:2: Cannot find include file: mem_codes.vh\n`include "mem_codes.vh" \n         ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:38: Define or directive not defined: \'`WORD_W\'\n  localparam ADDR_COUNT = WORD_COUNT * `WORD_W / 8;\n                                       ^~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:38: syntax error, unexpected \'/\', expecting TYPE-IDENTIFIER\n  localparam ADDR_COUNT = WORD_COUNT * `WORD_W / 8;\n                                               ^\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:41: Define or directive not defined: \'`WORD_W\'\n  localparam GPIO_W = WORD_COUNT * `WORD_W;\n                                   ^~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:41: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n  localparam GPIO_W = WORD_COUNT * `WORD_W;\n                                          ^\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:50: Define or directive not defined: \'`ADDR_W\'\n  input [`ADDR_W - 1:0] i_req_addr;\n         ^~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:51: Define or directive not defined: \'`WORD_W\'\n  input [`WORD_W - 1:0] i_req_wr_data;\n         ^~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:53: Define or directive not defined: \'`MEM_COUNT_W\'\n  input [`MEM_COUNT_W - 1:0] i_req_count;\n         ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:58: Define or directive not defined: \'`WORD_W\'\n  output reg [`WORD_W - 1:0] o_res_rd_data;\n              ^~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:59: Define or directive not defined: \'`MEM_CODE_W\'\n  output reg [`MEM_CODE_W - 1:0] o_res_code;\n              ^~~~~~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:64: Define or directive not defined: \'`WORD_W\'\n  wire [`WORD_W - 1:0] s_res_rd_data;\n        ^~~~~~~\n%Error: data/full_repos/permissive/109936328/memory_peripheral/gpio_interface.v:65: Define or directive not defined: \'`MEM_CODE_W\'\n  wire [`MEM_CODE_W - 1:0] s_res_code;\n        ^~~~~~~~~~~\n%Error: Exiting due to 13 error(s)\n'
module gpio_interface(

  clk,
  aresetn,


  i_req_addr,

  i_req_wr_data,

  i_req_wr_en,

  i_req_count,


  o_res_rd_data,

  o_res_code,


  o_gpio_state
);



  parameter ADDR_START = 0;
  parameter BANK_COUNT = 1;

  



  localparam WORD_COUNT = BANK_COUNT;
  localparam ADDR_COUNT = WORD_COUNT * `WORD_W / 8;
  localparam ADDR_END = ADDR_START + ADDR_COUNT - 1;
  localparam real R_ADDR_COUNT = ADDR_COUNT;
  localparam GPIO_W = WORD_COUNT * `WORD_W;





  input clk;
  input aresetn;

  input [`ADDR_W - 1:0] i_req_addr;
  input [`WORD_W - 1:0] i_req_wr_data;
  input i_req_wr_en;
  input [`MEM_COUNT_W - 1:0] i_req_count;




  output reg [`WORD_W - 1:0] o_res_rd_data;
  output reg [`MEM_CODE_W - 1:0] o_res_code;

  output [GPIO_W - 1:0] o_gpio_state;


  wire [`WORD_W - 1:0] s_res_rd_data;
  wire [`MEM_CODE_W - 1:0] s_res_code;

  readwrite_registers#(
    .ADDR_START(ADDR_START),
    .WORD_COUNT(WORD_COUNT)
  ) rw_reg(
    .clk(clk),
    .aresetn(aresetn),

    .i_req_addr(i_req_addr),
    .i_req_wr_data(i_req_wr_data),
    .i_req_wr_en(i_req_wr_en),
    .i_req_count(i_req_count),
    
    .o_res_rd_data(s_res_rd_data),
    .o_res_code(s_res_code),
    
    .o_exposed_mem(o_gpio_state)
  );


  always@(*) begin
    if(i_req_addr >= ADDR_START && i_req_addr <= ADDR_END) begin
      o_res_rd_data = s_res_rd_data;
      o_res_code = s_res_code;
    end else begin
      o_res_rd_data = 'bz;
      o_res_code = 'bz;
    end
  end

endmodule
module gpio_interface(

  clk,
  aresetn,


  i_req_addr,

  i_req_wr_data,

  i_req_wr_en,

  i_req_count,


  o_res_rd_data,

  o_res_code,


  o_gpio_state
);




  parameter ADDR_START = 0;
  parameter BANK_COUNT = 1;

  



  localparam WORD_COUNT = BANK_COUNT;
  localparam ADDR_COUNT = WORD_COUNT * `WORD_W / 8;
  localparam ADDR_END = ADDR_START + ADDR_COUNT - 1;
  localparam real R_ADDR_COUNT = ADDR_COUNT;
  localparam GPIO_W = WORD_COUNT * `WORD_W;





  input clk;
  input aresetn;

  input [`ADDR_W - 1:0] i_req_addr;
  input [`WORD_W - 1:0] i_req_wr_data;
  input i_req_wr_en;
  input [`MEM_COUNT_W - 1:0] i_req_count;




  output reg [`WORD_W - 1:0] o_res_rd_data;
  output reg [`MEM_CODE_W - 1:0] o_res_code;

  output [GPIO_W - 1:0] o_gpio_state;


  wire [`WORD_W - 1:0] s_res_rd_data;
  wire [`MEM_CODE_W - 1:0] s_res_code;

  readwrite_registers#(
    .ADDR_START(ADDR_START),
    .WORD_COUNT(WORD_COUNT)
  ) rw_reg(
    .clk(clk),
    .aresetn(aresetn),

    .i_req_addr(i_req_addr),
    .i_req_wr_data(i_req_wr_data),
    .i_req_wr_en(i_req_wr_en),
    .i_req_count(i_req_count),
    
    .o_res_rd_data(s_res_rd_data),
    .o_res_code(s_res_code),
    
    .o_exposed_mem(o_gpio_state)
  );


  always@(*) begin
    if(i_req_addr >= ADDR_START && i_req_addr <= ADDR_END) begin
      o_res_rd_data = s_res_rd_data;
      o_res_code = s_res_code;
    end else begin
      o_res_rd_data = 'bz;
      o_res_code = 'bz;
    end
  end

endmodule