How to read 10 values at a time from a text file out of 50 values in VHDL

Joined
Mar 11, 2009
Messages
1
Reaction score
0
Heya...

I have a text file which has 50 integers. All i want to do is access the first 10 values, add them up and then the next 10 values, add them up again and so on...finally i wil have 5 values that are the sums. I would like to know how i can access only a few values out of all from a text file in VHDL. I thought of 2 ways to do it:

1. Either i can directly read only 10 values at a time instead of the whole file till the end of file is reached..but i dunno how to do it..i need help witht the coding part

2. I can write all the 50 values in an array and then write loops to access the values.. I need help here too to write the values from the file into an array/memory of some sort....

Please Help me out here...


Cheers!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top