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.

[SOLVED] File read values exceed integer range in VHDL - How to handle?

Status
Not open for further replies.

vaisram

Member level 1
Joined
Dec 2, 2010
Messages
32
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Activity points
1,469
I am developing a test benchf wher i need to read a set of values from a file and pass the values to the DUT. Now some of the values in the file exceed the integer range of (2^31) - 1 range (eg value 2382568613). How do i now read these values from the file?
 

Unsigned/signed types can have as many bits as you want, so can exceed the integer range. The easiest way to read them would be to store the values as hex (or octal or binary) and read them into unsigned via std_logic_vectors with the std_logic_textio package.

Otherwise you could write a string_to_unsigned function that could read the values in character by character.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top