data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v
1: b'%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:33: Cannot find include file: sdio_cia_defines.v\n`include "sdio_cia_defines.v" \n         ^~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/41807012/rtl/cia,data/full_repos/permissive/41807012/sdio_cia_defines.v\n             data/full_repos/permissive/41807012/rtl/cia,data/full_repos/permissive/41807012/sdio_cia_defines.v.v\n             data/full_repos/permissive/41807012/rtl/cia,data/full_repos/permissive/41807012/sdio_cia_defines.v.sv\n             sdio_cia_defines.v\n             sdio_cia_defines.v.v\n             sdio_cia_defines.v.sv\n             obj_dir/sdio_cia_defines.v\n             obj_dir/sdio_cia_defines.v.v\n             obj_dir/sdio_cia_defines.v.sv\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:66: Define or directive not defined: \'`VENDOR_ID\'\nwire            [15:0]      vendor_id = `VENDOR_ID;\n                                        ^~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:66: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\nwire            [15:0]      vendor_id = `VENDOR_ID;\n                                                  ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:67: Define or directive not defined: \'`PRODUCT_ID\'\nwire            [15:0]      product_id  = `PRODUCT_ID; \n                                          ^~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:67: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\nwire            [15:0]      product_id  = `PRODUCT_ID; \n                                                     ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:76: Define or directive not defined: \'`FBR_FUNC_ID_ADDR\'\nassign  fbr[`FBR_FUNC_ID_ADDR]          = {o_csa_en, csa_support, 2\'b00, FUNC_TYPE};\n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:76: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_FUNC_ID_ADDR]          = {o_csa_en, csa_support, 2\'b00, FUNC_TYPE};\n                             ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:77: Define or directive not defined: \'`FBR_FUNC_EXT_ID_ADDR\'\nassign  fbr[`FBR_FUNC_EXT_ID_ADDR]      = {4\'h0, func_type_ext};\n            ^~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:77: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_FUNC_EXT_ID_ADDR]      = {4\'h0, func_type_ext};\n                                 ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:78: Define or directive not defined: \'`FBR_POWER_SUPPLY_ADDR\'\nassign  fbr[`FBR_POWER_SUPPLY_ADDR]     = {o_pwr_mode, 3\'b000, support_pwr_sel};\n            ^~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:78: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_POWER_SUPPLY_ADDR]     = {o_pwr_mode, 3\'b000, support_pwr_sel};\n                                  ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:79: Define or directive not defined: \'`FBR_ISDIO_FUNC_ID_ADDR\'\nassign  fbr[`FBR_ISDIO_FUNC_ID_ADDR]    = {8\'h00};\n            ^~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:79: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_ISDIO_FUNC_ID_ADDR]    = {8\'h00};\n                                   ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:80: Define or directive not defined: \'`FBR_MANF_ID_LOW_ADDR\'\nassign  fbr[`FBR_MANF_ID_LOW_ADDR]      = {vendor_id[15:8]};\n            ^~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:80: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_MANF_ID_LOW_ADDR]      = {vendor_id[15:8]};\n                                 ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:81: Define or directive not defined: \'`FBR_MANF_ID_HIGH_ADDR\'\nassign  fbr[`FBR_MANF_ID_HIGH_ADDR]     = {vendor_id[7:0]};\n            ^~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:81: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_MANF_ID_HIGH_ADDR]     = {vendor_id[7:0]};\n                                  ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:82: Define or directive not defined: \'`FBR_PROD_ID_LOW_ADDR\'\nassign  fbr[`FBR_PROD_ID_LOW_ADDR]      = {product_id[15:8]};\n            ^~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:82: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_PROD_ID_LOW_ADDR]      = {product_id[15:8]};\n                                 ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:83: Define or directive not defined: \'`FBR_PROD_ID_HIGH_ADDR\'\nassign  fbr[`FBR_PROD_ID_HIGH_ADDR]     = {product_id[7:0]};\n            ^~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:83: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_PROD_ID_HIGH_ADDR]     = {product_id[7:0]};\n                                  ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:84: Define or directive not defined: \'`FBR_ISDIO_PROD_TYPE\'\nassign  fbr[`FBR_ISDIO_PROD_TYPE]       = {8\'h00};\n            ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:84: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_ISDIO_PROD_TYPE]       = {8\'h00};\n                                ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:85: Define or directive not defined: \'`FBR_CIS_LOW_ADDR\'\nassign  fbr[`FBR_CIS_LOW_ADDR]          = {cis_addr[23:16]};\n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:85: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_CIS_LOW_ADDR]          = {cis_addr[23:16]};\n                             ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:86: Define or directive not defined: \'`FBR_CIS_MID_ADDR\'\nassign  fbr[`FBR_CIS_MID_ADDR]          = {cis_addr[23:16]};\n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:86: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_CIS_MID_ADDR]          = {cis_addr[23:16]};\n                             ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:87: Define or directive not defined: \'`FBR_CIS_HIGH_ADDR\'\nassign  fbr[`FBR_CIS_HIGH_ADDR]         = {cis_addr[23:16]};\n            ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:87: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_CIS_HIGH_ADDR]         = {cis_addr[23:16]};\n                              ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:88: Define or directive not defined: \'`FBR_CSA_LOW_ADDR\'\nassign  fbr[`FBR_CSA_LOW_ADDR]          = {8\'h00};  \n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:88: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_CSA_LOW_ADDR]          = {8\'h00};  \n                             ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:89: Define or directive not defined: \'`FBR_CSA_MID_ADDR\'\nassign  fbr[`FBR_CSA_MID_ADDR]          = {8\'h00};  \n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:89: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_CSA_MID_ADDR]          = {8\'h00};  \n                             ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:90: Define or directive not defined: \'`FBR_CSA_HIGH_ADDR\'\nassign  fbr[`FBR_CSA_HIGH_ADDR]         = {8\'h00};  \n            ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:90: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_CSA_HIGH_ADDR]         = {8\'h00};  \n                              ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:91: Define or directive not defined: \'`FBR_DATA_ACC_ADDR\'\nassign  fbr[`FBR_DATA_ACC_ADDR]         = {8\'h00};  \n            ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:91: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_DATA_ACC_ADDR]         = {8\'h00};  \n                              ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:92: Define or directive not defined: \'`FBR_BLOCK_SIZE_LOW_ADDR\'\nassign  fbr[`FBR_BLOCK_SIZE_LOW_ADDR]   = {o_block_size[7:0]};\n            ^~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:92: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_BLOCK_SIZE_LOW_ADDR]   = {o_block_size[7:0]};\n                                    ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:93: Define or directive not defined: \'`FBR_BLOCK_SIZE_HIGH_ADDR\'\nassign  fbr[`FBR_BLOCK_SIZE_HIGH_ADDR]  = {o_block_size[15:8]};\n            ^~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:93: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nassign  fbr[`FBR_BLOCK_SIZE_HIGH_ADDR]  = {o_block_size[15:8]};\n                                     ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:108: Define or directive not defined: \'`FBR_FUNC_ID_ADDR\'\n            `FBR_FUNC_ID_ADDR:\n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:108: syntax error, unexpected \':\', expecting endcase\n            `FBR_FUNC_ID_ADDR:\n                             ^\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:110: Define or directive not defined: \'`FBR_POWER_SUPPLY_ADDR\'\n            `FBR_POWER_SUPPLY_ADDR:\n            ^~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:112: Define or directive not defined: \'`FBR_BLOCK_SIZE_LOW_ADDR\'\n            `FBR_BLOCK_SIZE_LOW_ADDR:\n            ^~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/41807012/rtl/cia/sdio_fbr.v:114: Define or directive not defined: \'`FBR_BLOCK_SIZE_HIGH_ADDR\'\n            `FBR_BLOCK_SIZE_HIGH_ADDR:\n            ^~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 46 error(s)\n'
module sdio_fbr #(
    parameter               INDEX           =   0,
    parameter               FUNC_TYPE       =   4'h0,
    parameter               FUNC_TYPE_EXT   =   4'h0,
    parameter               SUPPORT_PWR_SEL =   1'b0,
    parameter               CSA_SUPPORT     =   0,
    parameter               CSA_OFFSET      =   0,
    parameter               CIS_OFFSET      =   0,
    parameter               BLOCK_SIZE      =   256
)(
  input                     clk,
  input                     rst,


  output  reg               o_csa_en,
  output  reg   [3:0]       o_pwr_mode,
  output  reg   [15:0]      o_block_size,

  input                     i_activate,
  input                     i_write_flag,
  input         [7:0]       i_address,
  input                     i_data_stb,
  input         [7:0]       i_data_in,
  output  reg   [7:0]       o_data_out

);

localparam     PARAM1  = 32'h00000000;

wire            [7:0]       fbr [18:0];
wire            [23:0]      cis_addr;
wire            [15:0]      vendor_id = `VENDOR_ID;
wire            [15:0]      product_id  = `PRODUCT_ID; 
wire                        csa_support = CSA_SUPPORT;
wire            [3:0]       func_type_ext = FUNC_TYPE_EXT;
wire                        support_pwr_sel = SUPPORT_PWR_SEL;


assign  cis_addr                        = CIS_OFFSET;


assign  fbr[`FBR_FUNC_ID_ADDR]          = {o_csa_en, csa_support, 2'b00, FUNC_TYPE};
assign  fbr[`FBR_FUNC_EXT_ID_ADDR]      = {4'h0, func_type_ext};
assign  fbr[`FBR_POWER_SUPPLY_ADDR]     = {o_pwr_mode, 3'b000, support_pwr_sel};
assign  fbr[`FBR_ISDIO_FUNC_ID_ADDR]    = {8'h00};
assign  fbr[`FBR_MANF_ID_LOW_ADDR]      = {vendor_id[15:8]};
assign  fbr[`FBR_MANF_ID_HIGH_ADDR]     = {vendor_id[7:0]};
assign  fbr[`FBR_PROD_ID_LOW_ADDR]      = {product_id[15:8]};
assign  fbr[`FBR_PROD_ID_HIGH_ADDR]     = {product_id[7:0]};
assign  fbr[`FBR_ISDIO_PROD_TYPE]       = {8'h00};
assign  fbr[`FBR_CIS_LOW_ADDR]          = {cis_addr[23:16]};
assign  fbr[`FBR_CIS_MID_ADDR]          = {cis_addr[23:16]};
assign  fbr[`FBR_CIS_HIGH_ADDR]         = {cis_addr[23:16]};
assign  fbr[`FBR_CSA_LOW_ADDR]          = {8'h00};
assign  fbr[`FBR_CSA_MID_ADDR]          = {8'h00};
assign  fbr[`FBR_CSA_HIGH_ADDR]         = {8'h00};
assign  fbr[`FBR_DATA_ACC_ADDR]         = {8'h00};
assign  fbr[`FBR_BLOCK_SIZE_LOW_ADDR]   = {o_block_size[7:0]};
assign  fbr[`FBR_BLOCK_SIZE_HIGH_ADDR]  = {o_block_size[15:8]};


always @ (posedge clk) begin
  if (rst) begin
    o_pwr_mode              <=  0;
    o_data_out              <=  0;
    o_csa_en                <=  0;
    o_block_size            <=  BLOCK_SIZE;
  end
  else begin
    if (i_activate) begin
      if (i_data_stb) begin
        if (i_write_flag) begin
          case(i_address)
            `FBR_FUNC_ID_ADDR:
              o_csa_en            <=  i_data_in[3];
            `FBR_POWER_SUPPLY_ADDR:
              o_pwr_mode          <=  i_data_in[7:5];
            `FBR_BLOCK_SIZE_LOW_ADDR:
              o_block_size[7:0]   <=  i_data_in;
            `FBR_BLOCK_SIZE_HIGH_ADDR:
              o_block_size[15:8]  <=  i_data_in;
            default: begin
            end 
          endcase
        end
        else begin
          o_data_out          <=  fbr[i_address];
        end
      end
    end
  end
end

endmodule
module sdio_fbr #(
    parameter               INDEX           =   0,
    parameter               FUNC_TYPE       =   4'h0,
    parameter               FUNC_TYPE_EXT   =   4'h0,
    parameter               SUPPORT_PWR_SEL =   1'b0,
    parameter               CSA_SUPPORT     =   0,
    parameter               CSA_OFFSET      =   0,
    parameter               CIS_OFFSET      =   0,
    parameter               BLOCK_SIZE      =   256
)(
  input                     clk,
  input                     rst,


  output  reg               o_csa_en,
  output  reg   [3:0]       o_pwr_mode,
  output  reg   [15:0]      o_block_size,

  input                     i_activate,
  input                     i_write_flag,
  input         [7:0]       i_address,
  input                     i_data_stb,
  input         [7:0]       i_data_in,
  output  reg   [7:0]       o_data_out

);


localparam     PARAM1  = 32'h00000000;

wire            [7:0]       fbr [18:0];
wire            [23:0]      cis_addr;
wire            [15:0]      vendor_id = `VENDOR_ID;
wire            [15:0]      product_id  = `PRODUCT_ID; 
wire                        csa_support = CSA_SUPPORT;
wire            [3:0]       func_type_ext = FUNC_TYPE_EXT;
wire                        support_pwr_sel = SUPPORT_PWR_SEL;


assign  cis_addr                        = CIS_OFFSET;


assign  fbr[`FBR_FUNC_ID_ADDR]          = {o_csa_en, csa_support, 2'b00, FUNC_TYPE};
assign  fbr[`FBR_FUNC_EXT_ID_ADDR]      = {4'h0, func_type_ext};
assign  fbr[`FBR_POWER_SUPPLY_ADDR]     = {o_pwr_mode, 3'b000, support_pwr_sel};
assign  fbr[`FBR_ISDIO_FUNC_ID_ADDR]    = {8'h00};
assign  fbr[`FBR_MANF_ID_LOW_ADDR]      = {vendor_id[15:8]};
assign  fbr[`FBR_MANF_ID_HIGH_ADDR]     = {vendor_id[7:0]};
assign  fbr[`FBR_PROD_ID_LOW_ADDR]      = {product_id[15:8]};
assign  fbr[`FBR_PROD_ID_HIGH_ADDR]     = {product_id[7:0]};
assign  fbr[`FBR_ISDIO_PROD_TYPE]       = {8'h00};
assign  fbr[`FBR_CIS_LOW_ADDR]          = {cis_addr[23:16]};
assign  fbr[`FBR_CIS_MID_ADDR]          = {cis_addr[23:16]};
assign  fbr[`FBR_CIS_HIGH_ADDR]         = {cis_addr[23:16]};
assign  fbr[`FBR_CSA_LOW_ADDR]          = {8'h00};
assign  fbr[`FBR_CSA_MID_ADDR]          = {8'h00};
assign  fbr[`FBR_CSA_HIGH_ADDR]         = {8'h00};
assign  fbr[`FBR_DATA_ACC_ADDR]         = {8'h00};
assign  fbr[`FBR_BLOCK_SIZE_LOW_ADDR]   = {o_block_size[7:0]};
assign  fbr[`FBR_BLOCK_SIZE_HIGH_ADDR]  = {o_block_size[15:8]};


always @ (posedge clk) begin
  if (rst) begin
    o_pwr_mode              <=  0;
    o_data_out              <=  0;
    o_csa_en                <=  0;
    o_block_size            <=  BLOCK_SIZE;
  end
  else begin
    if (i_activate) begin
      if (i_data_stb) begin
        if (i_write_flag) begin
          case(i_address)
            `FBR_FUNC_ID_ADDR:
              o_csa_en            <=  i_data_in[3];
            `FBR_POWER_SUPPLY_ADDR:
              o_pwr_mode          <=  i_data_in[7:5];
            `FBR_BLOCK_SIZE_LOW_ADDR:
              o_block_size[7:0]   <=  i_data_in;
            `FBR_BLOCK_SIZE_HIGH_ADDR:
              o_block_size[15:8]  <=  i_data_in;
            default: begin
            end 
          endcase
        end
        else begin
          o_data_out          <=  fbr[i_address];
        end
      end
    end
  end
end

endmodule