24 lines
330 B
Verilog
24 lines
330 B
Verilog
module spectrum(
|
|
input CLOCK_50,
|
|
output wire[7:0] LED
|
|
);
|
|
|
|
reg[13:0] address;
|
|
wire[7:0] mem_data;
|
|
|
|
rom0 rom(
|
|
.address(address),
|
|
.clock(CLOCK_50),
|
|
.q(mem_data)
|
|
);
|
|
|
|
reg[21:0] counter;
|
|
always @(posedge CLOCK_50)
|
|
begin
|
|
counter <= counter + 1;
|
|
if (counter == 0)
|
|
address <= address + 1;
|
|
end
|
|
assign LED = mem_data;
|
|
|
|
endmodule |