Forum Discussion

AShar42's avatar
AShar42
Icon for New Contributor rankNew Contributor
7 years ago

My code is making a random LED generator using LSFR. But, I want to turn on only one LED at a time, but my program is randomly generating 1-3 LED at a time.

module Memorygame #(parameter BITS = 5) (clk, rst_n, out); input clk; input rst_n; output reg [3:0] out; reg [3:0] out_next; integer count=0; reg clk_1hz; always @ (posedge clk) begin // sl...