getting constant from an external file

Discussion in 'VHDL' started by Serkan, May 10, 2010.

  1. Serkan

    Serkan Guest

    Dear Veterans,

    I have some constant integers that I want to assign different values
    for each synthesis using an external file.
    Is there any example or link? It will be very much appreciated.
    Thanks.

    Serkan

    PS: please do not just offer "use generic statement or package or tcl
    script", I need example.
     
    Serkan, May 10, 2010
    #1
    1. Advertising

  2. Serkan

    Serkan Guest

    Please ignore the post
    I was able to do it using package.
    Comments other than package usage are welcome

    Serkan



    On May 10, 3:33 pm, Serkan <> wrote:
    > Dear Veterans,
    >
    > I have some constant integers that I want to assign  different values
    > for each synthesis using an external file.
    > Is there any example or link? It will be very much appreciated.
    > Thanks.
    >
    > Serkan
    >
    > PS: please do not just offer  "use generic statement or package or tcl
    > script", I need example.
     
    Serkan, May 10, 2010
    #2
    1. Advertising

  3. Serkan

    Andy Guest

    Most tools allow setting the value of top level generics. This can be
    done by command line or gui in different tools.

    You must define a default value for the generic on the top level
    entity, and that value will be used if not overridden either by the
    tool or by a yet-higher-level (e.g. wrapper, etc.) architecture.

    Andy
     
    Andy, May 10, 2010
    #3
  4. Serkan

    rickman Guest

    On May 10, 1:16 pm, Andy <> wrote:
    > Most tools allow setting the value of top level generics. This can be
    > done by command line or gui in different tools.
    >
    > You must define a default value for the generic on the top level
    > entity, and that value will be used if not overridden either by the
    > tool or by a yet-higher-level (e.g. wrapper, etc.) architecture.
    >
    > Andy


    I used top level generics in the Active-HDL simulator, but I could not
    find a way to set the top level generics in the Lattice synthesis
    tools. So I always had to make sure the top level generic was set
    correctly in the file when building the chip.

    Rick
     
    rickman, May 13, 2010
    #4
  5. Serkan

    whygee Guest

    Hi all,

    rickman wrote:
    > On May 10, 1:16 pm, Andy <> wrote:
    >> Most tools allow setting the value of top level generics. This can be
    >> done by command line or gui in different tools.

    It's amusing that this thread has stuck in my mind,
    I couldn't find an option in GHDL to do this.

    > I used top level generics in the Active-HDL simulator, but I could not
    > find a way to set the top level generics in the Lattice synthesis
    > tools. So I always had to make sure the top level generic was set
    > correctly in the file when building the chip.
    >
    > Rick


    I just wrote this tonight :
    http://ygdes.com/GHDL/ghdl_env/
    it's specific to GHDL but it's damn handy,
    the generics can be set from the
    host system's environment variables :)

    yg
    --
    http://ygdes.com / http://yasep.org
     
    whygee, May 16, 2010
    #5
    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. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,136
  2. Martin Magnusson
    Replies:
    2
    Views:
    537
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    594
    Tim Roberts
    Nov 23, 2006
  4. Replies:
    4
    Views:
    359
    Keith Thompson
    Dec 14, 2006
  5. Replies:
    13
    Views:
    13,036
    Kai-Uwe Bux
    Jan 22, 2007
Loading...

Share This Page