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.

Verilog! Use $readmem for decimal values

Status
Not open for further replies.

UFK

Member level 3
Joined
Mar 8, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Pakistan
Activity points
1,728
Hi

Can anyone please help me read decimal values from a text file using readmem.
I tried using $readmemh for hex values but it cannot read negative values. Can someone please help me read values (both positive and negative) in either hex or decimal format from text file?

Thanks in advance
 

$readmemh is not a very good function. Try using $fread instead. Works better, can read decimal or hex numbers and has a syntax similar to C programming.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top