How to save line in VHDL?

Discussion in 'VHDL' started by magik, Jun 26, 2005.

  1. magik

    magik Guest

    Another problem:

    I have one part of the data inside my procedure and those data I want to
    save into one line in OUTFILE .
    The other part is in main process (where this procedure is calling).
    How can I save both parts in one line?
    VHDL doesn't have pointers to strings ect...

    Is it possible to put data from procedure into a string and add to line in
    the main process?

    Paul
     
    magik, Jun 26, 2005
    #1
    1. Advertising

  2. magik

    Ajeetha Guest

    Hi Paul,
    Don't clearly understand your exact issue, but it looks like
    with concatenation you should be able to do this. Can you show a sample
    piece of code? Idea would be, to pass the part of data inside your
    procedure to the calling process and then concatenate that with the
    main data and print.

    HTH
    Aji
    http://www.noveldv.com
     
    Ajeetha, Jun 26, 2005
    #2
    1. Advertising

  3. magik

    magik Guest

    The procedure reads data from 8-bit vector (in real it is more complicated
    and takes about 200lines of code so it will be not very nice if I paste 2
    times the same code into main process - that's why I decided for procedure)

    In the main process I have 2 inputs A and B and depending from them I want
    to save data from procedure in one of two places is my out file:


    ---------------------------------
    | A | B | data A | data B |
    | 1 | | a2 12 32 | | <-- when A is pressed
    | | 1 | | 34 aa 45 | <-- when B is pressed
    (data in columns "dataA/B" is from procedure)

    If I will not find any good solution, I will have to decide what is better:

    1 copy procedure into 2 places in main process
    or
    2. copy logic from main process into the procedure...

    (the second will take less lines)


    Paul
     
    magik, Jun 26, 2005
    #3
  4. magik

    info_ Guest

    magik wrote:
    > Another problem:
    >
    > I have one part of the data inside my procedure and those data I want to
    > save into one line in OUTFILE .
    > The other part is in main process (where this procedure is calling).
    > How can I save both parts in one line?


    You're unclear.
    Maybe you didn't realize that you can write to a shared buffer (line)
    and that no Cr is appended until you writeline ?

    > VHDL doesn't have pointers to strings ect...


    Yes ! VHDL does. (what do you think type "line" is ?)

    I think it's a good idea you dig a bit more in the language.
    Good investment if I may suggest :)
    Hint : you could start with the line type.


    Bert Cuzeau.
     
    info_, Jun 26, 2005
    #4
    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. Hugo
    Replies:
    10
    Views:
    1,368
    Matt Humphrey
    Oct 18, 2004
  2. kaushikshome
    Replies:
    4
    Views:
    806
    kaushikshome
    Sep 10, 2006
  3. afd
    Replies:
    1
    Views:
    8,491
    Colin Paul Gloster
    Mar 23, 2007
  4. scad
    Replies:
    23
    Views:
    1,205
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    431
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page