data/full_repos/permissive/50192283/afu.sv
1: b'%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:4: Little bit endian vector: MSB < LSB of bit range: 0:7\n  output [0:7]   ah_ctag,         \n         ^\n                    ... Use "/* verilator lint_off LITENDIAN */" and lint_on around source to disable this message.\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:6: Little bit endian vector: MSB < LSB of bit range: 0:12\n  output [0:12]  ah_com,          \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:8: Little bit endian vector: MSB < LSB of bit range: 0:2\n  output [0:2]   ah_cabt,         \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:9: Little bit endian vector: MSB < LSB of bit range: 0:63\n  output [0:63]  ah_cea,          \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:11: Little bit endian vector: MSB < LSB of bit range: 0:15\n  output [0:15]  ah_cch,          \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:12: Little bit endian vector: MSB < LSB of bit range: 0:11\n  output [0:11]  ah_csize,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:13: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_croom,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:16: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_brtag,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:18: Little bit endian vector: MSB < LSB of bit range: 0:5\n  input  [0:5]   ha_brad,         \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:19: Little bit endian vector: MSB < LSB of bit range: 0:3\n  output [0:3]   ah_brlat,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:20: Little bit endian vector: MSB < LSB of bit range: 0:511\n  output [0:511] ah_brdata,       \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:21: Little bit endian vector: MSB < LSB of bit range: 0:7\n  output [0:7]   ah_brpar,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:23: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_bwtag,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:25: Little bit endian vector: MSB < LSB of bit range: 0:5\n  input  [0:5]   ha_bwad,         \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:26: Little bit endian vector: MSB < LSB of bit range: 0:511\n  input  [0:511] ha_bwdata,       \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:27: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_bwpar,        \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:30: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_rtag,         \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:32: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_response,     \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:33: Little bit endian vector: MSB < LSB of bit range: 0:8\n  input  [0:8]   ha_rcredits,     \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:34: Little bit endian vector: MSB < LSB of bit range: 0:1\n  input  [0:1]   ha_rcachestate,  \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:35: Little bit endian vector: MSB < LSB of bit range: 0:12\n  input  [0:12]  ha_rcachepos,    \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:41: Little bit endian vector: MSB < LSB of bit range: 0:23\n  input  [0:23]  ha_mmad,         \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:43: Little bit endian vector: MSB < LSB of bit range: 0:63\n  input  [0:63]  ha_mmdata,       \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:46: Little bit endian vector: MSB < LSB of bit range: 0:63\n  output  [0:63] ah_mmdata,       \n          ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:50: Little bit endian vector: MSB < LSB of bit range: 0:7\n  input  [0:7]   ha_jcom,         \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:52: Little bit endian vector: MSB < LSB of bit range: 0:63\n  input  [0:63]  ha_jea,          \n         ^\n%Warning-LITENDIAN: data/full_repos/permissive/50192283/afu.sv:57: Little bit endian vector: MSB < LSB of bit range: 0:63\n  output [0:63]  ah_jerror,       \n         ^\n%Error: data/full_repos/permissive/50192283/afu.sv:67: Cannot find file containing module: \'shift_register\'\n  shift_register ah_jdone_shift(\n  ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/50192283,data/full_repos/permissive/50192283/shift_register\n             data/full_repos/permissive/50192283,data/full_repos/permissive/50192283/shift_register.v\n             data/full_repos/permissive/50192283,data/full_repos/permissive/50192283/shift_register.sv\n             shift_register\n             shift_register.v\n             shift_register.sv\n             obj_dir/shift_register\n             obj_dir/shift_register.v\n             obj_dir/shift_register.sv\n%Error: data/full_repos/permissive/50192283/afu.sv:72: Cannot find file containing module: \'mmio\'\n  mmio mmio_handler(\n  ^~~~\n%Error: data/full_repos/permissive/50192283/afu.sv:86: Cannot find file containing module: \'parity_generator\'\n  parity_generator work_element(\n  ^~~~~~~~~~~~~~~~\n%Error: Exiting due to 3 error(s), 27 warning(s)\n'
module afu (

  output         ah_cvalid,
  output [0:7]   ah_ctag,
  output         ah_ctagpar,
  output [0:12]  ah_com,
  output         ah_compar,
  output [0:2]   ah_cabt,
  output [0:63]  ah_cea,
  output         ah_ceapar,
  output [0:15]  ah_cch,
  output [0:11]  ah_csize,
  input  [0:7]   ha_croom,

  input          ha_brvalid,
  input  [0:7]   ha_brtag,
  input          ha_brtagpar,
  input  [0:5]   ha_brad,
  output [0:3]   ah_brlat,
  output [0:511] ah_brdata,
  output [0:7]   ah_brpar,
  input          ha_bwvalid,
  input  [0:7]   ha_bwtag,
  input          ha_bwtagpar,
  input  [0:5]   ha_bwad,
  input  [0:511] ha_bwdata,
  input  [0:7]   ha_bwpar,

  input          ha_rvalid,
  input  [0:7]   ha_rtag,
  input          ha_rtagpar,
  input  [0:7]   ha_response,
  input  [0:8]   ha_rcredits,
  input  [0:1]   ha_rcachestate,
  input  [0:12]  ha_rcachepos,

  input          ha_mmval,
  input          ha_mmcfg,
  input          ha_mmrnw,
  input          ha_mmdw,
  input  [0:23]  ha_mmad,
  input          ha_mmadpar,
  input  [0:63]  ha_mmdata,
  input          ha_mmdatapar,
  output         ah_mmack,
  output  [0:63] ah_mmdata,
  output         ah_mmdatapar,

  input          ha_jval,
  input  [0:7]   ha_jcom,
  input          ha_jcompar,
  input  [0:63]  ha_jea,
  input          ha_jeapar,
  output reg     ah_jrunning,
  output         ah_jdone,
  output         ah_jcack,
  output [0:63]  ah_jerror,
  output         ah_jyield,
  output         ah_tbreq,
  output         ah_paren,
  input          ha_pclock
);

  reg ah_jdone_out;
  reg we_reset;

  shift_register ah_jdone_shift(
    .clock(ha_pclock),
    .in(ah_jdone_out),
    .out(ah_jdone));

  mmio mmio_handler(
    .ha_pclock(ha_pclock),
    .ha_mmval(ha_mmval),
    .ha_mmcfg(ha_mmcfg),
    .ha_mmrnw(ha_mmrnw),
    .ha_mmdw(ha_mmdw),
    .ha_mmad(ha_mmad),
    .ha_mmadpar(ha_mmadpar),
    .ha_mmdata(ha_mmdata),
    .ha_mmdatapar(ha_mmdatapar),
    .ah_mmack_out(ah_mmack),
    .ah_mmdata_out(ah_mmdata),
    .ah_mmdatapar(ah_mmdatapar));

  parity_generator work_element(
    .clock(ha_pclock),
    .enable(ah_jrunning),
    .reset(we_reset),
    .wed(ha_jea),
    .ah_cvalid(ah_cvalid),
    .ah_ctag(ah_ctag),
    .ah_ctagpar(ah_ctagpar),
    .ah_com(ah_com),
    .ah_compar(ah_compar),
    .ah_cabt(ah_cabt),
    .ah_cea(ah_cea),
    .ah_ceapar(ah_ceapar),
    .ah_cch(ah_cch),
    .ah_csize(ah_csize),
    .ha_croom(ha_croom),
    .ha_brvalid(ha_brvalid),
    .ha_brtag(ha_brtag),
    .ha_brtagpar(ha_brtagpar),
    .ha_brad(ha_brad),
    .ah_brlat(ah_brlat),
    .ah_brdata(ah_brdata),
    .ah_brpar(ah_brpar),
    .ha_bwvalid(ha_bwvalid),
    .ha_bwtag(ha_bwtag),
    .ha_bwtagpar(ha_bwtagpar),
    .ha_bwad(ha_bwad),
    .ha_bwdata(ha_bwdata),
    .ha_bwpar(ha_bwpar),
    .ha_rvalid(ha_rvalid),
    .ha_rtag(ha_rtag),
    .ha_rtagpar(ha_rtagpar),
    .ha_response(ha_response),
    .ha_rcredits(ha_rcredits),
    .ha_rcachestate(ha_rcachestate),
    .ha_rcachepos(ha_rcachepos));

  assign ah_jerror = 0,
         ah_jcack = 0,
         ah_jyield = 0,
         ah_tbreq = 0,
         ah_paren = 1;


  always @ (posedge ha_pclock)
  begin
    if(ha_jval)
    begin
      case(ha_jcom)
        'h80: begin
          $display("Reset");
          ah_jrunning <= 0;
          ah_jdone_out <= 1;
          we_reset <= 1;
        end
        'h90: begin
          $display("Start");
          ah_jrunning <= 1;
          we_reset <= 0;
        end
        default: begin
          $display("Invalid command given: %h", ha_jcom);
          ah_jdone_out <= 0;
          we_reset <= 0;
        end
      endcase
    end else begin
      ah_jdone_out <= 0;
    end
  end

endmodule
module afu (

  output         ah_cvalid,
  output [0:7]   ah_ctag,
  output         ah_ctagpar,
  output [0:12]  ah_com,
  output         ah_compar,
  output [0:2]   ah_cabt,
  output [0:63]  ah_cea,
  output         ah_ceapar,
  output [0:15]  ah_cch,
  output [0:11]  ah_csize,
  input  [0:7]   ha_croom,

  input          ha_brvalid,
  input  [0:7]   ha_brtag,
  input          ha_brtagpar,
  input  [0:5]   ha_brad,
  output [0:3]   ah_brlat,
  output [0:511] ah_brdata,
  output [0:7]   ah_brpar,
  input          ha_bwvalid,
  input  [0:7]   ha_bwtag,
  input          ha_bwtagpar,
  input  [0:5]   ha_bwad,
  input  [0:511] ha_bwdata,
  input  [0:7]   ha_bwpar,

  input          ha_rvalid,
  input  [0:7]   ha_rtag,
  input          ha_rtagpar,
  input  [0:7]   ha_response,
  input  [0:8]   ha_rcredits,
  input  [0:1]   ha_rcachestate,
  input  [0:12]  ha_rcachepos,

  input          ha_mmval,
  input          ha_mmcfg,
  input          ha_mmrnw,
  input          ha_mmdw,
  input  [0:23]  ha_mmad,
  input          ha_mmadpar,
  input  [0:63]  ha_mmdata,
  input          ha_mmdatapar,
  output         ah_mmack,
  output  [0:63] ah_mmdata,
  output         ah_mmdatapar,

  input          ha_jval,
  input  [0:7]   ha_jcom,
  input          ha_jcompar,
  input  [0:63]  ha_jea,
  input          ha_jeapar,
  output reg     ah_jrunning,
  output         ah_jdone,
  output         ah_jcack,
  output [0:63]  ah_jerror,
  output         ah_jyield,
  output         ah_tbreq,
  output         ah_paren,
  input          ha_pclock
);


  reg ah_jdone_out;
  reg we_reset;

  shift_register ah_jdone_shift(
    .clock(ha_pclock),
    .in(ah_jdone_out),
    .out(ah_jdone));

  mmio mmio_handler(
    .ha_pclock(ha_pclock),
    .ha_mmval(ha_mmval),
    .ha_mmcfg(ha_mmcfg),
    .ha_mmrnw(ha_mmrnw),
    .ha_mmdw(ha_mmdw),
    .ha_mmad(ha_mmad),
    .ha_mmadpar(ha_mmadpar),
    .ha_mmdata(ha_mmdata),
    .ha_mmdatapar(ha_mmdatapar),
    .ah_mmack_out(ah_mmack),
    .ah_mmdata_out(ah_mmdata),
    .ah_mmdatapar(ah_mmdatapar));

  parity_generator work_element(
    .clock(ha_pclock),
    .enable(ah_jrunning),
    .reset(we_reset),
    .wed(ha_jea),
    .ah_cvalid(ah_cvalid),
    .ah_ctag(ah_ctag),
    .ah_ctagpar(ah_ctagpar),
    .ah_com(ah_com),
    .ah_compar(ah_compar),
    .ah_cabt(ah_cabt),
    .ah_cea(ah_cea),
    .ah_ceapar(ah_ceapar),
    .ah_cch(ah_cch),
    .ah_csize(ah_csize),
    .ha_croom(ha_croom),
    .ha_brvalid(ha_brvalid),
    .ha_brtag(ha_brtag),
    .ha_brtagpar(ha_brtagpar),
    .ha_brad(ha_brad),
    .ah_brlat(ah_brlat),
    .ah_brdata(ah_brdata),
    .ah_brpar(ah_brpar),
    .ha_bwvalid(ha_bwvalid),
    .ha_bwtag(ha_bwtag),
    .ha_bwtagpar(ha_bwtagpar),
    .ha_bwad(ha_bwad),
    .ha_bwdata(ha_bwdata),
    .ha_bwpar(ha_bwpar),
    .ha_rvalid(ha_rvalid),
    .ha_rtag(ha_rtag),
    .ha_rtagpar(ha_rtagpar),
    .ha_response(ha_response),
    .ha_rcredits(ha_rcredits),
    .ha_rcachestate(ha_rcachestate),
    .ha_rcachepos(ha_rcachepos));

  assign ah_jerror = 0,
         ah_jcack = 0,
         ah_jyield = 0,
         ah_tbreq = 0,
         ah_paren = 1;


  always @ (posedge ha_pclock)
  begin
    if(ha_jval)
    begin
      case(ha_jcom)
        'h80: begin
          $display("Reset");
          ah_jrunning <= 0;
          ah_jdone_out <= 1;
          we_reset <= 1;
        end
        'h90: begin
          $display("Start");
          ah_jrunning <= 1;
          we_reset <= 0;
        end
        default: begin
          $display("Invalid command given: %h", ha_jcom);
          ah_jdone_out <= 0;
          we_reset <= 0;
        end
      endcase
    end else begin
      ah_jdone_out <= 0;
    end
  end

endmodule