reading hex file-URGENTTT !!
Hey, Im not familiar with vhdl code and need an immediate help.
i need to build a test bench that reads a combined victor of two bits and hex numbers, here's an example:
reading the victor: 0 0 F0A...3C 0BB...D1 FFF...0F AA0...A0
|Reset (single bit)
| --- |EN (single bit)
| --- |
| --- | - |Ms(128 hex digits)
| --- | - | ------------ |Hs(64 hex digits)
| --- | - | ------------ | ------------ |Ss(32 hex digits)
| --- | - | ------------ | ------------ | ----------- |Ts (16 hex digits)
0 - 0 - F0A...3C - 0BB...D1 - FFF...0F - AA0...A0
i heard about library textio but still don't know hoe to use its functions and what parameters
I will really appreciate if some one can write me a relevant code or help me with that, this is urgent for my project in the university
(sorry about my bad english level)
THANKS IN ADVANCE
Sorry, I don't have time to write code custom to your project cuz I'm struggling through my own code atm, but I have some stuff that can help you...
jeez, of course the tabbed formatting gets all screwed up
not sure why my most recent comment disappeared, but change the file extension on the test bench to .vhd, and the others to .hex. this code reads in a 16-bit hex number from each right and left files (represents right and left audio), combines them using a string, and spits them out into output.hex.
note that each read/write takes 5ns, so set your clock and execution time according.
okay. i had to upload everything as text files because it doesn't all .vhd files. so, after you download the files, change filereader_tb to .vhd extension, and change the other three files to .hex extension.
what this code does is open up two seperate text files containing 16-bit hex values, combines them into 1 string (32 bits), and spits it out into output.hex. note that each read/write in my test bench requires 5ns, so make sure you run it for the appropriate amount of time.
is a website with good reference for textio and other vhdl in general
urgent, but no response?
|All times are GMT. The time now is 09:42 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.