Simulation of VHDL in xilinx from a C program?

Discussion in 'VHDL' started by jesse lackey, May 25, 2007.

  1. jesse lackey

    jesse lackey Guest

    My apologies if this is posted twice. The first one doesn't seem to
    have made it out.

    I'd like to be able to drive the simulator in ISE from a C program. I'm
    using Windows. Ideally, it would be a command-line C app I'd make in VC++.

    I have no idea if this is possible and looking around xilinx.com and
    google searches aren't turning much up.

    Large-scale designs must be tested this way; or so I think. Writing the
    testbench in VHDL would be a much bigger effort than in C, and I'd like
    to have the option anyway of doing it as a full Windows app with a gui
    to do a bunch of things. So the C program would set a bunch of inputs,
    drive a clock, watch the outputs.

    Now I figure as an alternative I could use C to generate a file of test
    vectors, and then have a VHDL testbench read this file, run the
    simulation, and write an output file. The C code could then check the
    output file. I'd rather not have it be this kludgey if possible.

    Any advice?

    Thanks!
    Jesse
     
    jesse lackey, May 25, 2007
    #1
    1. Advertising

  2. jesse lackey

    HT-Lab Guest

    "jesse lackey" <> wrote in message
    news:...
    > My apologies if this is posted twice. The first one doesn't seem to have
    > made it out.
    >
    > I'd like to be able to drive the simulator in ISE from a C program. I'm
    > using Windows. Ideally, it would be a command-line C app I'd make in
    > VC++.
    >
    > I have no idea if this is possible and looking around xilinx.com and
    > google searches aren't turning much up.
    >
    > Large-scale designs must be tested this way; or so I think. Writing the
    > testbench in VHDL would be a much bigger effort than in C, and I'd like to
    > have the option anyway of doing it as a full Windows app with a gui to do
    > a bunch of things. So the C program would set a bunch of inputs, drive a
    > clock, watch the outputs.
    >
    > Now I figure as an alternative I could use C to generate a file of test
    > vectors, and then have a VHDL testbench read this file, run the
    > simulation, and write an output file. The C code could then check the
    > output file. I'd rather not have it be this kludgey if possible.
    >
    > Any advice?
    >
    > Thanks!
    > Jesse


    I am not sure about the ISE simulator but perhaps you can get hold of the
    Xilinx Modelsim OEM version? In that case you can use Tcl to provide the
    stimulus (look up force/when/examine Tcl commands to name a few) and use
    sockets (same as a file in Tcl) to communicate with your C program.

    If you need speed than Tcl might not be the best solution, in that case you
    need to spend some money and either get Modelsim PE+SystemC, Modelsim
    SE+FLI or ActiveHDL+VHPI to provide a thin interface layer to your C
    program.

    Hans
    www.ht-lab.com
     
    HT-Lab, May 25, 2007
    #2
    1. Advertising

  3. jesse lackey wrote:

    > Now I figure as an alternative I could use C to generate a file of test
    > vectors, and then have a VHDL testbench read this file, run the
    > simulation, and write an output file. The C code could then check the
    > output file. I'd rather not have it be this kludgey if possible.


    The main disadvantage of this method is that you cannot write models that
    react on the outputs of your device under verification. A simple example is
    a processor model that must wait on an acknowledge before continuing a
    current bus cycle. So I definitely would not would go down this path.

    --
    Paul Uiterlinden
    www.aimvalley.nl
    e-mail addres: remove the not.
     
    Paul Uiterlinden, May 25, 2007
    #3
  4. > Any advice?

    Look at ghdl ( http://ghdl.free.fr). It is a VHDL Simulator using a compiler
    to produces an executable to simulate. The used compiler is the well known
    gcc. Since it is a compiler, you can link it with your own c functions. See
    an example at http://ghdl.free.fr/vhpidirect/ or read the manual.

    hth
    Günther Jehle
     
    Günther Jehle, May 25, 2007
    #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. ra
    Replies:
    0
    Views:
    1,398
  2. Replies:
    3
    Views:
    2,003
    Paul Hartke
    Mar 7, 2006
  3. nfirtaps
    Replies:
    1
    Views:
    1,470
    Mike Treseler
    Aug 31, 2006
  4. uvbaz
    Replies:
    2
    Views:
    1,136
    uvbaz
    Oct 27, 2006
  5. russ
    Replies:
    7
    Views:
    1,055
    aloque
    Mar 13, 2009
Loading...

Share This Page