`timescale 1ns / 1ps `default_nettype none `ifdef SYNTHESIS `define FPATH(X) `"X`" `else /* ! SYNTHESIS */ `define FPATH(X) `"../../data/X`" `endif /* ! SYNTHESIS */ module image_sprite #( parameter WIDTH=256, HEIGHT=256) ( input wire pixel_clk_in, input wire rst_in, input wire [10:0] x_in, hcount_in, input wire [9:0] y_in, vcount_in, output logic [7:0] red_out, output logic [7:0] green_out, output logic [7:0] blue_out ); // calculate rom address logic [$clog2(WIDTH*HEIGHT)-1:0] image_addr; assign image_addr = (hcount_in - x_in) + ((vcount_in - y_in) * WIDTH); logic in_sprite; assign in_sprite = ((hcount_in >= x_in && hcount_in < (x_in + WIDTH)) && (vcount_in >= y_in && vcount_in < (y_in + HEIGHT))); // Modify the module below to use your BRAMs! assign red_out = in_sprite ? 8'hF0 : 0; assign green_out = in_sprite ? 8'hF0 : 0; assign blue_out = in_sprite ? 8'hF0 : 0; endmodule `default_nettype none