data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v
 line:60: before: "localparam"
1: b'%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:1: Cannot find include file: anton_common.vh\n`include "anton_common.vh" \n         ^~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/143344034/hdl,data/full_repos/permissive/143344034/anton_common.vh\n             data/full_repos/permissive/143344034/hdl,data/full_repos/permissive/143344034/anton_common.vh.v\n             data/full_repos/permissive/143344034/hdl,data/full_repos/permissive/143344034/anton_common.vh.sv\n             anton_common.vh\n             anton_common.vh.v\n             anton_common.vh.sv\n             obj_dir/anton_common.vh\n             obj_dir/anton_common.vh.v\n             obj_dir/anton_common.vh.sv\n%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:4: Define or directive not defined: \'`BUFFER_END_DEFAULT\'\n  parameter  BUFFER_END  = `BUFFER_END_DEFAULT,  \n                           ^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:4: syntax error, unexpected \',\', expecting TYPE-IDENTIFIER\n  parameter  BUFFER_END  = `BUFFER_END_DEFAULT,  \n                                              ^\n%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:5: Define or directive not defined: \'`CLOG2\'\n  localparam BUFFER_BITS = `CLOG2(BUFFER_END+1)  \n                           ^~~~~~\n%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:6: syntax error, unexpected \')\', expecting \';\'\n)(\n^\n%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:24: syntax error, unexpected always\n  always @(*) begin\n  ^~~~~~\n%Error: data/full_repos/permissive/143344034/hdl/anton_neopixel_stream.v:57: Define or directive not defined: \'`ENUM_STATE_TRANSMIT\'\n    if (state == `ENUM_STATE_TRANSMIT && regCtrlRun) begin\n                 ^~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 7 error(s)\n'
module anton_neopixel_stream #(
  parameter  BUFFER_END  = `BUFFER_END_DEFAULT,
  localparam BUFFER_BITS = `CLOG2(BUFFER_END+1)
)(
  input [7:0] pixelByte,
  input       state,
  input [2:0] pixelBitIx,
  input [1:0] channelIx,
  input [2:0] bitPatternIx,
  input       regCtrl32bit,
  input       regCtrlRun,

  output      neoData
);

  reg [7:0] neoPatternLookup = 'd0;
  reg       neoDataB         = 'b0;
  reg [7:0] pixelColourValue = 'd0;



  always @(*) begin


    if (pixelColourValue[pixelBitIx]) begin
      neoPatternLookup = 8'b00011111;
    end else begin
      neoPatternLookup = 8'b00000011;
    end
  end


  always @(*) begin
    if (regCtrl32bit) begin


      pixelColourValue = {
        pixelByte[0], pixelByte[1], pixelByte[2], pixelByte[3], pixelByte[4], pixelByte[5], pixelByte[6], pixelByte[7]
      };

    end else begin



      case (channelIx)
        default: pixelColourValue = {2'b00,   pixelByte[3], 1'b0,  pixelByte[4], 1'b0,  pixelByte[5], 1'b0 };
        'd1:     pixelColourValue = {2'b00,   pixelByte[0], 1'b0,  pixelByte[1], 2'b00, pixelByte[2]       };
        'd2:     pixelColourValue = {4'b0000, pixelByte[6], 2'b00, pixelByte[7]                            };
      endcase
    end
  end


  always @(*) begin
    if (state == `ENUM_STATE_TRANSMIT && regCtrlRun) begin

      neoDataB = neoPatternLookup[bitPatternIx[2:0]];
    end else begin

      neoDataB = 'd0;
    end
  end
  
   
  assign neoData = neoDataB;
  
endmodule
module anton_neopixel_stream #(
  parameter  BUFFER_END  = `BUFFER_END_DEFAULT,
  localparam BUFFER_BITS = `CLOG2(BUFFER_END+1)
)(
  input [7:0] pixelByte,
  input       state,
  input [2:0] pixelBitIx,
  input [1:0] channelIx,
  input [2:0] bitPatternIx,
  input       regCtrl32bit,
  input       regCtrlRun,

  output      neoData
);


  reg [7:0] neoPatternLookup = 'd0;
  reg       neoDataB         = 'b0;
  reg [7:0] pixelColourValue = 'd0;



  always @(*) begin


    if (pixelColourValue[pixelBitIx]) begin
      neoPatternLookup = 8'b00011111;
    end else begin
      neoPatternLookup = 8'b00000011;
    end
  end


  always @(*) begin
    if (regCtrl32bit) begin


      pixelColourValue = {
        pixelByte[0], pixelByte[1], pixelByte[2], pixelByte[3], pixelByte[4], pixelByte[5], pixelByte[6], pixelByte[7]
      };

    end else begin



      case (channelIx)
        default: pixelColourValue = {2'b00,   pixelByte[3], 1'b0,  pixelByte[4], 1'b0,  pixelByte[5], 1'b0 };
        'd1:     pixelColourValue = {2'b00,   pixelByte[0], 1'b0,  pixelByte[1], 2'b00, pixelByte[2]       };
        'd2:     pixelColourValue = {4'b0000, pixelByte[6], 2'b00, pixelByte[7]                            };
      endcase
    end
  end


  always @(*) begin
    if (state == `ENUM_STATE_TRANSMIT && regCtrlRun) begin

      neoDataB = neoPatternLookup[bitPatternIx[2:0]];
    end else begin

      neoDataB = 'd0;
    end
  end
  
   
  assign neoData = neoDataB;
  
endmodule