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 & $urandon - systemVerilong

Status
Not open for further replies.

anant

Member level 2
Joined
Sep 20, 2004
Messages
49
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
283
How to pass seed information to $random & $urandom so that test scenario can be reproduced.
 

function int unsigned $random [ (int seed ) ] ;
function int unsigned $urandom [ (int seed ) ] ;

The seed is an optional argument.

Use the same seed to generate the same sequence of random numbers every time.

A common practice is to use a plusarg at the command line and read it in the testbench ($value$plusargs) and use it as a seed for the random system tasks.
 

anant said:
How to pass seed information to $random & $urandom so that test scenario can be reproduced.

SystemVerilog LRM has a detailed section on random stability to which this question kind of belongs to. It dictates that implementations shall be random stable (under few conditions, see LRM for details). However the $random is not part of it, perhaps b'cos it is part of V2K as well. Also SV adds lot more powerful randomization via class, constraints.

Ajeetha, CVC
www.cvcblr.com
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top