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.

doubt regarding random no generation in verilog

Status
Not open for further replies.

sudhirkv

Advanced Member level 4
Joined
Dec 13, 2005
Messages
106
Helped
8
Reputation
16
Reaction score
1
Trophy points
1,298
Location
Chennai, India
Activity points
1,992
when i refered to verilog book, i can generate only signed random no. is there any possibilty to generate unsigned random no in verilog.
 

hi sudhir

check out the following
may be you get some idea
**broken link removed**
 

sudhirkv said:
when i refered to verilog book, i can generate only signed random no. is there any possibilty to generate unsigned random no in verilog.

Not really true:

reg [31:0] unsigned a_reg;

initial a_reg = $random;

Should get you that. It might be true that the $random generates signed number (I would doubt it as $random existed prior to V2K days, when the signed extensions to Verilog came mainstream).

But a pure $random is hardly useful, you need "constrained random", SystemVerilog provides all that!

HTH
Ajeetha, CVC
www.noveldv.com
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top