Including Verilog parameter file in VHDL design

Discussion in 'VHDL' started by ALuPin@web.de, Feb 6, 2007.

  1. Guest

    Hi newsgroup,

    I am trying to write a VHDL wrapper for a Verilog IP core which
    includes
    a "params.v" file:


    `define DDR2_MODE
    `define ROW_WIDTH 13
    `define COL_WIDTH 10
    `define COL_WIDTH_EQ_10 TRUE
    ....

    These parameters are used to define the port widths etc. of the IP
    core.

    How can I take over the parameter file into my VHDL wrapper ?
    Do I have to generate a second VHDL parameter file ?

    Thank you for your opinion.

    Rgds
    Andre
    , Feb 6, 2007
    #1
    1. Advertising

  2. Hi Andre

    "" <> writes:
    > I am trying to write a VHDL wrapper for a Verilog IP core which
    > includes a "params.v" file:
    >
    > ...
    >
    > How can I take over the parameter file into my VHDL wrapper ?
    > Do I have to generate a second VHDL parameter file ?


    Several options:

    1. Do you really have to have a VHDL wrapper? Depending on the amount
    of glue logic, the easiest way would be to whip up a Verilog
    wrapper and include "params.v" there. It sounds like you will end
    up with a mixed language environment anyway.

    2. At least one tool I know of can output the interface description of
    a compiled design in XML format. You can get really fancy and write
    an XSLT script to generate a VHDL wrapper :^)

    Or use something like Perl's XML::Simple.

    3. Maybe your tools support something like "cc -E" in C-world, which
    gives you the preprocessed output of a processed file. Then you
    could use these macros (not parameters in Verilog jargon!) in your
    VHDL file.

    4. Roll your own (limited) Verilog preprocessor in your favorite
    scripting language.

    Regards,
    Marcus

    --
    note that "property" can also be used as syntaxtic sugar to reference
    a property, breaking the clean design of verilog; [...]

    -- Michael McNamara
    (http://www.veripool.com/verilog-mode_news.html)
    Marcus Harnisch, Feb 8, 2007
    #2
    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. walala
    Replies:
    3
    Views:
    5,637
    walala
    Aug 30, 2003
  2. Akshaye
    Replies:
    1
    Views:
    712
    Hemant Gupta
    Feb 9, 2004
  3. botao

    mixed Verilog/VHDL design

    botao, Jul 7, 2004, in forum: VHDL
    Replies:
    6
    Views:
    7,250
    Eric Smith
    Jul 8, 2004
  4. rizaldo1
    Replies:
    0
    Views:
    1,114
    rizaldo1
    Jul 3, 2008
  5. federico aglietti

    Including Verilog parameter in VHDL

    federico aglietti, Apr 9, 2010, in forum: VHDL
    Replies:
    1
    Views:
    1,545
    HT-Lab
    Apr 9, 2010
Loading...

Share This Page