Solved

Tcl/Tk scripting for VHDL models

Posted on 2004-10-26
676 Views
Last Modified: 2013-12-10
Hello,
     I need one or two examples in tcl/tk scripting for testing vhdl model.The model can be a halfadder,multiplexer or any small sequential circuits.Can anyone help me.
0
Question by:bcsinnovations
    3 Comments
     
    LVL 9

    Expert Comment

    by:lombardp
    As far as I know, usually a VHDL model is tested through a VHDL test bench, and test is performed through a simulation tool that can be controlled using tcl/tk scripts.

    Could you explain better what do you exactly need?

    0
     

    Author Comment

    by:bcsinnovations
    I am working with Modelsim and using test benchs for testing.I am following structural modelling technique.So whenever I make small changes in the VHDL Coding in lower level modules,I have to recompile all the files right from that lower module to the toplevel module and load the toplevel testbench and verify my output as waveforms.Is there any way to perform all these actions(compiling from lower module to top module,loading) by writing a tcl/tk script so that it will command  modelsim to do all actions mentioned above.
    I think I have explained you better.
    0
     
    LVL 9

    Accepted Solution

    by:
    Ok, first of all you have to execute a simulation. In the wave window, after you configured everything, save the format of the window and signals in "wave.do" file (it is the fastest way to write the wave.do file).

    Create a macro file "mymacro.do" containing:

    quit -sim
    vcom file1.vhd
    vcom file2.vhd
    vcom file3.vhd
    vcom top.vhd
    vcom testbench.vhd
    vsim work.testbench
    view wave
    do wave.do
    run -all


    Then in Modelsim console execute the macro with the following command:

    do mymacro.do


    Maybe you would need to customize further the script...
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    A little history Back in 1997 when I built my first custom computer using the revolutionary Gateway website I didn’t have much to choose from except for the CPU. The race between computer manufacturers was held back by processor manufacturers. They…
    Introduction: When a connection to the internet is established, there always exists a modem between the connected device and the ISP (Internet Service Provider). The Operating System (OS) on your PC controls the modem which communicates with the …
    This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
    Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now