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.

random pulse generator verilog

Status
Not open for further replies.

jiang

Advanced Member level 4
Full Member level 1
Joined
Dec 31, 1999
Messages
111
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
Taiwan
Activity points
855
verilog random

Hi guys,

In verilog we can get the random number by system task $random(seed).
If I don't give a seed, does verilog simulator use system time as the seed
or still simulation time as the seed?
If verilog simulator doesn't use system time as the seed, how do I use
system time as the seed or how do I guarantee to have a real random
numbers?

Best Regards,
Jiang
 

andy2000a

Advanced Member level 2
Advanced Member level 2
Joined
Jul 18, 2001
Messages
597
Helped
14
Reputation
28
Reaction score
8
Trophy points
1,298
Activity points
5,298
verilog $random

please see I2C APR protocol or Plug_&_Play speci
have LFSR + XOR for random number ..
 

jiang

Advanced Member level 4
Full Member level 1
Joined
Dec 31, 1999
Messages
111
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
Taiwan
Activity points
855
$random verilog

andy2000a said:
please see I2C APR protocol or Plug_&_Play speci
have LFSR + XOR for random number ..

I mean that I write the testbench which needs to do some random task,
not hardware.
LFSR + XOR is a pseudo-random number generator. It still has order.
 

j2cheng

Junior Member level 1
Junior Member level 1
Joined
Nov 4, 2001
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
26
random verilog

I think any random number generated by software will use timer to be its seed. Only hardware can pick up noise as its seed.

j2cheng
 

Laplace

Advanced Member level 4
Full Member level 1
Joined
Feb 26, 2002
Messages
103
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
659
verilog random number

You can do it with PLI functions. If you search the forum you can find the PLI documents and explanations about writing C code for generating random numbers.

If you are desining an FPGA and using @ltera, you can use the its internal PLL's noise to generate random number inside FPGA.
 

skynet

Member level 5
Member level 5
Joined
Apr 18, 2002
Messages
80
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
638
random in verilog

Hi jiang,

In verilog, there is no such true random number, it is a pseudorandom number where the sequence is fixed. If you want to get different random number then you need to change the seed each time you perform simulation.

rgds,
SkyNet
 

walkon

Junior Member level 1
Junior Member level 1
Joined
Oct 21, 2004
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
165
verilog random seed

How about generate random number with LSFR?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top