Added ROM based LED patterns

This commit is contained in:
2022-03-30 12:47:42 +03:00
parent fa29e9f3f6
commit c59b02b186
95 changed files with 13813 additions and 13354 deletions
+14 -4
View File
@@ -1,14 +1,24 @@
module spectrum(
input CLOCK_50,
output reg[7:0] LED
output wire[7:0] LED
);
reg[27:0] counter;
reg[2:0] address;
wire[7:0] mem_data;
rom0 rom(
.address(address),
.clock(CLOCK_50),
.q(mem_data)
);
reg[20:0] counter;
always @(posedge CLOCK_50)
begin
counter <= counter + 1;
LED <= counter[27:21];
counter = counter + 1;
if (counter == 0)
address = address + 1;
end
assign LED = mem_data;
endmodule