data/full_repos/permissive/175316557/sprite.v
 line:42: before: "."
1: b'%Warning-WIDTHCONCAT: data/full_repos/permissive/175316557/sprite.v:203: Unsized numbers/parameters not allowed in concatenations.\n                                                                       : ... In instance sprite_draw.s_data.gsc\nassign mem_offset_x = {7-get_x,2\'b00};\n                        ^\n                      ... Use "/* verilator lint_off WIDTHCONCAT */" and lint_on around source to disable this message.\n%Warning-WIDTHCONCAT: data/full_repos/permissive/175316557/sprite.v:203: Unsized numbers/parameters not allowed in replications.\n                                                                       : ... In instance sprite_draw.s_data.gsc\nassign mem_offset_x = {7-get_x,2\'b00};\n                              ^\n%Warning-WIDTH: data/full_repos/permissive/175316557/sprite.v:89: Operator ADD expects 8 bits on the RHS, but RHS\'s SEL generates 3 bits.\n                                                                : ... In instance sprite_draw.s_data\nassign x_out = x_anchor + pixel_loc[2:0];\n                        ^\n%Warning-WIDTH: data/full_repos/permissive/175316557/sprite.v:90: Operator ADD expects 7 bits on the RHS, but RHS\'s SEL generates 3 bits.\n                                                                : ... In instance sprite_draw.s_data\nassign y_out = y_anchor + pixel_loc[5:3];\n                        ^\n%Error: data/full_repos/permissive/175316557/sprite.v:26: Cannot find file containing module: \'vga_adapter\'\nvga_adapter VGA(\n^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/175316557,data/full_repos/permissive/175316557/vga_adapter\n             data/full_repos/permissive/175316557,data/full_repos/permissive/175316557/vga_adapter.v\n             data/full_repos/permissive/175316557,data/full_repos/permissive/175316557/vga_adapter.sv\n             vga_adapter\n             vga_adapter.v\n             vga_adapter.sv\n             obj_dir/vga_adapter\n             obj_dir/vga_adapter.v\n             obj_dir/vga_adapter.sv\n%Error: Exiting due to 1 error(s), 4 warning(s)\n'
module get_sprite_color (
        get_x,
        get_y,
        sprite_id,
        color_data
    );
	 
	 
input [2:0] get_x;
input [2:0] get_y;
input [3:0] sprite_id;
output reg [17:0] color_data;

wire [6:0] mem_offset;
assign mem_offset = {sprite_id, get_y};
reg [31:0] mem [0:127];

wire [31:0] mem_row;
assign mem_row = mem[mem_offset];

wire [4:0] mem_offset_x;
assign mem_offset_x = {7-get_x,2'b00};

wire [3:0] color_id;
assign color_id = mem_row[mem_offset_x +: 4];

always @(*)
begin
    case (color_id)
        4'h0: color_data = 18'b00_0000_00_0000_00_0000;
        4'h1: color_data = 18'b00_0100_00_0010_00_0100;
        4'h2: color_data = 18'b00_0111_00_0101_00_1011;
        4'h3: color_data = 18'b00_0011_00_0001_00_0011;
        4'h4: color_data = 18'b00_1110_00_0111_00_1100;
        4'h5: color_data = 18'b00_0100_00_0010_00_0011;
        4'h6: color_data = 18'b00_1111_00_1000_00_0100;
        4'h7: color_data = 18'b00_1001_00_0011_00_0001;
        4'h8: color_data = 18'b00_1010_00_0010_00_0100;
        4'h9: color_data = 18'b00_0011_00_0001_00_0010;
        4'hA: color_data = 18'b00_0101_00_0111_00_1111;
        4'hB: color_data = 18'b00_0011_00_0011_00_0111;
        4'hC: color_data = 18'b00_1111_00_1111_00_1110;
		  4'hD: color_data = 18'b00_0111_00_1110_00_1110;
        4'hE: color_data = 18'b00_0010_00_0010_00_0011;
        4'hF: color_data = 18'b000010000000001111;
        default: color_data = 18'b000100_000000_000000;
    endcase
end

initial begin
    $readmemb("sprites.mem", mem);
end

endmodule
module get_sprite_color (
        get_x,
        get_y,
        sprite_id,
        color_data
    );

	 
	 
input [2:0] get_x;
input [2:0] get_y;
input [3:0] sprite_id;
output reg [17:0] color_data;

wire [6:0] mem_offset;
assign mem_offset = {sprite_id, get_y};
reg [31:0] mem [0:127];

wire [31:0] mem_row;
assign mem_row = mem[mem_offset];

wire [4:0] mem_offset_x;
assign mem_offset_x = {7-get_x,2'b00};

wire [3:0] color_id;
assign color_id = mem_row[mem_offset_x +: 4];

always @(*)
begin
    case (color_id)
        4'h0: color_data = 18'b00_0000_00_0000_00_0000;
        4'h1: color_data = 18'b00_0100_00_0010_00_0100;
        4'h2: color_data = 18'b00_0111_00_0101_00_1011;
        4'h3: color_data = 18'b00_0011_00_0001_00_0011;
        4'h4: color_data = 18'b00_1110_00_0111_00_1100;
        4'h5: color_data = 18'b00_0100_00_0010_00_0011;
        4'h6: color_data = 18'b00_1111_00_1000_00_0100;
        4'h7: color_data = 18'b00_1001_00_0011_00_0001;
        4'h8: color_data = 18'b00_1010_00_0010_00_0100;
        4'h9: color_data = 18'b00_0011_00_0001_00_0010;
        4'hA: color_data = 18'b00_0101_00_0111_00_1111;
        4'hB: color_data = 18'b00_0011_00_0011_00_0111;
        4'hC: color_data = 18'b00_1111_00_1111_00_1110;
		  4'hD: color_data = 18'b00_0111_00_1110_00_1110;
        4'hE: color_data = 18'b00_0010_00_0010_00_0011;
        4'hF: color_data = 18'b000010000000001111;
        default: color_data = 18'b000100_000000_000000;
    endcase
end

initial begin
    $readmemb("sprites.mem", mem);
end

endmodule