Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

About random data generation using verilog language

Status
Not open for further replies.

sycolegend

Newbie level 5
Joined
Nov 18, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,337
Hi all,

My design needs a huge number of random data. I have used $random to generate random data. But these data is all the same when I restart the simulation. Can any body telll me how to generate pure random data in verilog.

Thx in advance
 

If you are using Cadence, there is a cell called "rand_bit_stream" inside the library name "ahdlLib". You can use that to generate random data.

If you are not talking about Cadence, maybe the follow code might help you

Code:
integer iseed;
bit = abs($random(iseed)) & 1;

hope this helps!
 

    sycolegend

    Points: 2
    Helpful Answer Positive Rating
If you want different seed need to be used, please try this.

reg [31:0] data ;
initial
data = $random();

<your loop>
data = $random(data) ;

this logic will change your seed for each iteration.

regards,
sakthi.
 

    sycolegend

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top