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

Discussion in 'VHDL' started by shrutisunder, Mar 11, 2009.

  1. shrutisunder

    shrutisunder

    Joined:
    Mar 11, 2009
    Messages:
    1
    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!!
    shrutisunder, Mar 11, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Krish
    Replies:
    1
    Views:
    1,064
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Oct 20, 2005
  2. flamesrock
    Replies:
    8
    Views:
    438
    Hendrik van Rooyen
    Nov 24, 2006
  3. afd
    Replies:
    1
    Views:
    8,274
    Colin Paul Gloster
    Mar 23, 2007
  4. Mmcolli00 Mom
    Replies:
    2
    Views:
    187
    Mmcolli00 Mom
    Jan 27, 2009
  5. Alex Dowad
    Replies:
    4
    Views:
    258
    Michel Demazure
    May 1, 2010
Loading...

Share This Page