Directories in script

Discussion in 'VHDL' started by ALuPin@web.de, Sep 12, 2005.

  1. Guest

    Hi,

    I am working with ispLEVER 5.0 and Modelsim 6.0c

    When performing functional simulation in Modelsim I use the following
    ..do-script.
    The problem: If I want someone else to use the script there is always
    the problem that it is fixed to certain directories.
    Is there some possibility to make it global ?


    vlib work
    set SRC_DIR1
    "h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl/ddr_wbridge_complex"
    set SRC_DIR2 "h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl"
    set SRC_DIR3 "h:/eda/lattice/dvi/dvi_pc_top/image_ddrmem_wbridge"
    vcom ${SRC_DIR2}/ddr_sdram_package.vhd
    vcom ${SRC_DIR2}/mt46v16m16.vhd
    vcom ${SRC_DIR2}/pll_ddr.vhd
    vcom ${SRC_DIR2}/ddr_datapath.vhd
    vcom ${SRC_DIR2}/ddr_controller.vhd
    vcom ${SRC_DIR2}/ddr_sdram_ctrl.vhd
    vcom ${SRC_DIR3}/fifo1_wddr.vhd
    vcom ${SRC_DIR3}/fifo2_wddr.vhd
    vcom ${SRC_DIR3}/image_ddrmem_wbridge.vhd
    vcom ${SRC_DIR1}/ddr_wbridge_complex.vhd
    vcom ${SRC_DIR1}/tb_ddr_wbridge_complex.vhd
    vsim tb_ddr_wbridge_complex
    do Simulationsplot_functional.do
    run 100us -all
    configure wave -signalnamewidth 1
    set StdArithNoWarnings 1
    set IgnoreWarning 1

    Rgds
    André
     
    , Sep 12, 2005
    #1
    1. Advertising

  2. wrote:

    > When performing functional simulation in Modelsim I use the following
    > .do-script.
    > The problem: If I want someone else to use the script there is always
    > the problem that it is fixed to certain directories.


    Have the script reference an environment variable
    instead of a local constant for SRC_DIR1, SRC_DIR2 and SRC_DIR3.
    Of course both you and someone else will have to
    set these variables in your .bashrc or control panel.

    -- Mike Treseler
     
    Mike Treseler, Sep 12, 2005
    #2
    1. Advertising

  3. Klaus Falser Guest

    In article <>,
    says...
    > Hi,
    >
    > I am working with ispLEVER 5.0 and Modelsim 6.0c
    >
    > When performing functional simulation in Modelsim I use the following
    > .do-script.
    > The problem: If I want someone else to use the script there is always
    > the problem that it is fixed to certain directories.
    > Is there some possibility to make it global ?
    >
    >
    > vlib work
    > set SRC_DIR1
    > "h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl/ddr_wbridge_complex"
    > set SRC_DIR2 "h:/eda/lattice/dvi/dvi_pc_top/ddr_sdram_ctrl"
    > set SRC_DIR3 "h:/eda/lattice/dvi/dvi_pc_top/image_ddrmem_wbridge"
    > vcom ${SRC_DIR2}/ddr_sdram_package.vhd
    > vcom ${SRC_DIR2}/mt46v16m16.vhd
    > vcom ${SRC_DIR2}/pll_ddr.vhd
    > vcom ${SRC_DIR2}/ddr_datapath.vhd
    > vcom ${SRC_DIR2}/ddr_controller.vhd
    > vcom ${SRC_DIR2}/ddr_sdram_ctrl.vhd
    > vcom ${SRC_DIR3}/fifo1_wddr.vhd
    > vcom ${SRC_DIR3}/fifo2_wddr.vhd
    > vcom ${SRC_DIR3}/image_ddrmem_wbridge.vhd
    > vcom ${SRC_DIR1}/ddr_wbridge_complex.vhd
    > vcom ${SRC_DIR1}/tb_ddr_wbridge_complex.vhd
    > vsim tb_ddr_wbridge_complex
    > do Simulationsplot_functional.do
    > run 100us -all
    > configure wave -signalnamewidth 1
    > set StdArithNoWarnings 1
    > set IgnoreWarning 1
    >
    > Rgds
    > André
    >
    >

    I would split the task and create a makefile for compiling
    and updating the work library. This depends on the source
    directory, but you could use a relative pathes like
    .../../src/ddr_sdram_ctrl.vhd
    Once the library is up to date, you can start your simulation
    with another script, which does not depend on the source location
    anymore.

    Best regards
    Klaus
     
    Klaus Falser, Sep 13, 2005
    #3
  4. Klaus Falser wrote:

    > I would split the task and create a makefile for compiling
    > and updating the work library.


    Very good point.

    Using emacs vhdl-mode you can define a
    set of source directories and vhdl-mode
    will scan them for you, find all the .vhd files
    and generate the Makefile you need to compile
    all the design units in the right order
    by just saying "make"
    or "make.exe" on the command line.
    This can save you time because make keeps
    track of file dates and only compiles
    sources that need it.

    Of course you can also create the Makefile
    in an editor, but it might be easier
    to load emacs than it is to learn make.

    -- Mike Treseler
     
    Mike Treseler, Sep 14, 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. Joel Finkel
    Replies:
    0
    Views:
    499
    Joel Finkel
    Sep 12, 2003
  2. Jeffry van de Vuurst
    Replies:
    2
    Views:
    539
    Jeffry van de Vuurst
    Jul 30, 2003
  3. =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=

    Multiple bin-directories with virtual directories?

    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    832
    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=
    Nov 9, 2004
  4. Paul F
    Replies:
    4
    Views:
    642
    Mark Fitzpatrick
    Jun 25, 2008
  5. Adam Petrie
    Replies:
    8
    Views:
    319
    Adam Petrie
    Oct 11, 2004
Loading...

Share This Page