envyh123
Newbie level 3
- Joined
- Mar 25, 2015
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 30
I dont want to generate it using LFSR, i want to use $random function of verilog to generate a random 8 bit data stream. I have generated random integer from 0 to 255 using the following code.
Can anyone suggest methods to convert this into 8 bits
My code :
Can anyone suggest methods to convert this into 8 bits
My code :
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 initial begin integer num; repeat(100) @(posedge clock) begin #2; num<=$urandom_range(255,0); end end
Last edited by a moderator: