Forum Discussion
Altera_Forum
Honored Contributor
13 years agoIn theory, you need to change your lfsr_out to the range of 0 to 1 (1 not included) and then scale it by (limit + 1). In your 8-bit case:
wire [15:0] temp = lfsr_out * 16'd201; wire [7:0] result = temp [15:8]; lfsr_out is the output of your LFSR and result is what you are looking for.