Command line for fuse (behavioral sim), for ISE WebPack 9.2/

S

sdaau

Guest
Hi all,

First, sorry for the double post - it's been a while, and I first tried t
post through fpgacentral.com, forgetting that it does *NOT* apparentl
forward the message to usenet:

http://www.fpgacentral.com/group/fpga/command-line-fuse-behavioral-sim-ise-webpack-9-2-xtclsh-1129531/

... so, now I'm trying again through fpgarelated.com, as it has worked fo
me with usenet in the past ... so here is the message:

**********

I'm still using ISE WebPack 9.2, and I'd like to use "Simulate Behaviora
Model" from the command line:

% process run "Simulate Behavioral Model"
ERROR:TclTasksC - ERROR:TclTasksCrocess_064 - process run : Unknow
process "Simulate Behavioral Model".
Type [help project get_processes] for more information.
I can then enter "get_processes" in the Tcl Shell:

% project get_processes
{Synthesize - XST} {Check Syntax} {Generate Post-Synthesis Simulatio
Model} {Implement Design} Translate {Generate Post-Translate Simulatio
Model} Map {Generate Post-Map Static Timing} {Generate Post-Map Simulatio
Model} {Place & Route} {Generate Post-Place & Route Static Timing
{Generate Primetime Netlist} {Generate Post-Place & Route Simulation Model
{Generate IBIS Model} {Back-annotate Pin Locations} {Generate Programmin
File}

... to obtain what commands would be executable in a xtclsh script vi
'process run'. Unfortunately, I do not see "Simulate Behavioral Model" o
"Simulate Post-Place & Route Model" in there, so I assume 'fuse' needs t
be called separately.

So, I've looked through

http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/devref.pdf
http://www.xilinx.com/itp/xilinx10/books/docs/dev/dev.pdf
http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/plugin_ism.pdf
http://www.demandperipherals.com/docs/CmdLineFPGA.pdf

... and I simply cannot find anywhere how to obtain the correct 'fuse
command for what would correspond to "Simulate Behavioral Model" o
"Simulate Post-Place & Route Model" GUI items in ISE WebPack.

And unfortunately, when I run say "Simulate Behavioral Model", only th
following is displayed in the Console:

Running Fuse ...
Compiling project file "./mytest_tbw_beh__vlog.prj"
...
Building mytest_tbw_isim_beh.exe
Running ISim simulation engine ...
... but unfortunately, no actual command line arguments (and nothing in lo
files either, say by `grep -r 'fuse' .` in the project directory).

Does anyone have an idea (or reference to) what do the fuse command line
look like for "Simulate Behavioral Model" and "Simulate Post-Place & Rout
Model" respectively?

Thanks,
Cheers!


---------------------------------------
Posted through http://www.FPGARelated.com
 
sdaau wrote:
Does anyone have an idea (or reference to) what do the
fuse command lines look like for "Simulate Behavioral Model"
and "Simulate Post-Place & Route Model" respectively?
If "tb.exe" is the name of the generated ISIM executable,
command line options can be listed at the command prompt with:
tb -h

IIRC the only ISIM docs with 9.2 were the tool help files,
although the newer ISIM manuals should also be of help.
ISIM doc pointers:
http://www.xilinx.com/support/answers/30942.htm


Below are the files I use to do a RTL compile and run
with ISIM 9.2 :

<isim_comp.bat> compiles project
<isim_rtl.prj> list of project files for ISIM

<isim_run.bat> runs simulation executable
<isim_run.tcl> simulation commands

Note, these files don't check for tool error return codes.

Brian

---------------------------
<isim_comp.bat>

::
:: set environment path variables for core & target
::
set YC=%YARD_HOME%\HDL\cores\yard-1a
set YV=%YARD_SIM_TARGET%

::
:: this needs work to automatically compile
:: using a local file list for each target
::
:: just uses ISIM prj file for now
::
:: ISIM splatters run directory with temp files,
:: should move this to its' own isim_run directory
::
fuse -prj isim_rtl.prj -work work=work.isim -o tb.exe -top
testbench

---------------------------
<isim_rtl.prj>

vhdl work "$YC/y1_config.vhd"
vhdl work "$YC/y1_constants.vhd"
vhdl work "$YC/y1a_comps.vhd"
vhdl work "$YC/y1_probe_pkg.vhd"
vhdl work "$YC/pw2_rom.vhd"
vhdl work "$YC/flip.vhd"
vhdl work "$YC/ffb.vhd"
vhdl work "$YC/bitcnt.vhd"
vhdl work "$YC/rstack.vhd"
vhdl work "$YC/rf.vhd"
vhdl work "$YC/y1_probe.vhd"
vhdl work "$YC/y1_core.vhd"

vhdl work "$YV/stub_uart_tx.vhd"
vhdl work "$YV/stub_uart_rx.vhd"
vhdl work "$YV/rom_dat.vhd"
vhdl work "$YV/rtl_mem.vhd"
vhdl work "$YV/evb.vhd"
vhdl work "$YV/evb_tb.vhd"

---------------------------
<isim_run.bat>

::
:: run the ISIM generated executable
::
tb -tclbatch isim_run.tcl > isim_sim.out

---------------------------
<isim_run.tcl>

run 20000 ns
quit

---------------------------
 
Hi Brian,

Thanks a lot for your answer!

If "tb.exe" is the name of the generated ISIM executable,
command line options can be listed at the command prompt with:
tb -h
Thanks for the tip! However, my problem lies elsewhere, so hope I ca
clarify it better this time :)

Namely: while I was working through the ISE GUI, I always assumed that
should always run first "XST - Synthesize", and only then I could ru
"Simulate Behavioral Model" ... Likewise, after that I should likewise ru
"Implement Design" (all stages) first before "Simulate Post-Place & Rout
Model".

However, after trying a bit on the command line, I realized that `xst
actually generates an .ngc netlist file (I guess, the "RTL schematic")
however, when we call `fuse` to generate an ISIM .exe, as in:

::
fuse -prj isim_rtl.prj -work work=work.isim -o tb.exe -top
testbench
... `fuse`, in fact, demands only the list of source files in the .prj fil
(as also illustrated in your code) - it does not require a compiled `ngc
file beforehand at all! This leads me to believe, that a `fuse` comman
like the above is what corresponds to "Simulate Behavioral Model" in th
ISE GUI (and of course, in the GUI, you can just add files to your projec
- and then go directly to "Simulate Behavioral Model", without doing 'XST
Synthesize' beforehand).

So, if the above `fuse` command corresponds to "Simulate Behavioral Model
- what would be the `fuse` command corresponding to "Simulate Post-Place
Route Model"? I'm guessing, first a 'compiled' ""Native Generic Database
.ngd file (netlist?) is needed, as output of `xst` -> `ngdbuild` -> `map
-> `par` pipeline; but I don't see `fuse` options that accept this kind o
file as an argument?

The only thing stated i
http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/plugin_ism.pd
is "It is also possible to instruct the simulator to use the correct timin
delays from the SDF file.", but this is an option for the simulato
executable, not for `fuse` itself... and still, the place & route .ngd fil
figures nowhere; I'm not sure if this .sdf file replaces it?

Or maybe - `fuse` is supposed to read .ngd files automatically, in th
directory where the source files are located ?!

Well, hope I can get some comments back on this,
Thanks - and cheers!


---------------------------------------
Posted through http://www.FPGARelated.com
 
sdaau wrote:
So, if the above `fuse` command corresponds to "Simulate Behavioral Model"

Note that Fuse does not _run_ the simulation, it just builds a stand
alone
executable, which then must be run to produce simulation results.

- what would be the `fuse` command corresponding to
"Simulate Post-Place & Route Model"?
I've never done that with ISIM, so I can't provide a specific
example.

In general, Netgen produces a structural VHDL/Verilog model from the
implementation files, which is then simulated along with an .sdf file
to backannotate routing delays.

See "design flow" figures 2-2 and 2-9 of:
http://www.xilinx.com/itp/xilinx92/books/docs/dev/dev.pdf

So, from your original post:
Running Fuse ...
Compiling project file "./mytest_tbw_beh__vlog.prj"
...
Building mytest_tbw_isim_beh.exe
Running ISim simulation engine ...

The "compiling" bit gives you the name of the ISIM project file;
so if you look at this same log, but for a post P&R simulation run,
you should find another .prj file that'll give you the structural
source file being compiled for the post P&R simulation.

See pages 49-51 of UG660 11v3
"Running a Timing Simulation of a Verilog Design From the Command
Line"
http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/plugin_ism.pdf

UG682 is a good ISIM intro:
http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/ug682.pdf

HTH,
Brian
 
Hi Brian,

Thanks again for the prompt answer!

In general, Netgen produces a structural VHDL/Verilog model from the
implementation files, which is then simulated along with an .sdf file
to backannotate routing delays.
Thanks for that - `netgen` was the key to my misunderstanding... For th
benefit of noobs elsewhere :) , I shall quote
"Command Line Tools User Guide"
http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/devref.pdf:

The flow type that NetGen runs is based on the input design file
(NGC, NGD, or NCD). The following table shows the output file
types, based on the input design files: ... When performing
timing simulation, you must specify the type of netlist you want
to create: Verilog or VHDL. In addition to the specified netlist,
NetGen also creates an SDF file as output. The output Verilog and
VHDL netlists contain the functionality of the design and the SDF
file contains the timing information for the design.
By the way, I experimented a bit with querying process IDs in Linux, an
could capture most of the command lines issued by ISE when runnin
particular commands. So, given that the reference point is after "Cleanu
Project Files":

* Executing "Simulate Behavioral Model" runs, simply, through the `fuse` -
`_isim.exe` flow:

fuse -ise /media/testsynthdir/design-twb.ise -intstyle ise -incrementa
-lib unisims_ver -lib xilinxcorelib_ver -o XMyTopLevel_twb_isim_beh.ex
-prj XMyTopLevel_twb_beh.prj -top XMyTopLevel_twb -top glbl

./XMyTopLevel_twb_isim_beh.exe -intstyle ise -ipchost localhost -ipcpor
56480

... where ..._beh.prj contains all respective source files, plus glbl.v i
Verilog is used, as in:
----
vhdl work "../XMyTopLevel.vhd"
vhdl work "../XMyTopLevel_twb.vhd"
...
verilog work "/path/to/Xilinx92i/verilog/src/glbl.v"
----

* Executing "Simulate Post-Place & Route Model", goes through the `xst` -
`xst` -> `map` -> `par` -> `trce` -> `netgen` -> `fuse` -> `_isim.exe
sequence:

xst -ise /media/testsynthdir/design-twb.ise -intstyle ise -if
XMyTopLevel.xst -ofn XMyTopLevel.syr

xst -ifn /media/testsynthdir/XMyTopLevel.xst -ofn ofnNtrc -is
/media/testsynthdir/design-twb.ise -XstNtrc
ngdbuild -ise /media/testsynthdir/design-twb.ise -intstyle ise -dd _ngo -n
timestamp -i -p xc3s50a-tq144-5 XMyTopLevel.ngc XMyTopLevel.ngd

map -ise /media/testsynthdir/design-twb.ise -intstyle ise -
xc3s50a-tq144-5 -cm area -pr b -k 4 -c 100 -o XMyTopLevel_map.nc
XMyTopLevel.ngd XMyTopLevel.pcf

par -ise /media/testsynthdir/design-twb.ise -w -intstyle ise -ol std -t
XMyTopLevel_map.ncd XMyTopLevel.ncd XMyTopLevel.pcf

trce -ise /media/testsynthdir/design-twb.ise -intstyle ise -e 3 -s 5 -xm
XMyTopLevel XMyTopLevel.ncd -o XMyTopLevel.twr XMyTopLevel.pcf

netgen -ise /media/testsynthdir/design-twb.ise -intstyle ise -s 5 -pc
XMyTopLevel.pcf -rpw 100 -tpw 0 -ar Structure -tm XMyTopLeve
-insert_pp_buffers false -w -dir netgen/par -ofmt vhdl -sim XMyTopLevel.nc
XMyTopLevel_timesim.vhd

fuse -ise /media/testsynthdir/design-twb.ise -intstyle ise -incrementa
-lib unisims_ver -o XMyTopLevel_twb_isim_par.exe -pr
XMyTopLevel_twb_par.prj -top XMyTopLevel_twb

./XMyTopLevel_twb_isim_par.exe -sdfma
/UUT/=netgen/par/XMyTopLevel_timesim.sdf -sdfroot /UUT -intstyle is
-ipchost localhost -ipcport 37824

... where ..._par.prj contains only entries for the workbench, and
_timesim.vhd:
----
vhdl work "netgen/par/XMyTopLevel_timesim.vhd"
vhdl work "../XMyTopLevel_rdwr_tbw.vhd"
----


So, in brief, I guess it could be said: for behavioral simulation, `fuse
can simply operate on the source files directly, to generate an _isim.exe
for post-place and route simulation, `fuse` needs a timing model (and th
_isim.exe will need an .sdf file) generated previously by `netgen` (whic
operates on netlist/design files previously obtained by `map` & `par`...)

Note also that:
* `fuse` may call `vhpcomp` which in turn may call `g++`
* funnily enough, I couldn't obtain a command line for "Cleanup Projec
Files" :)


Hope this is close to the correct understanding, else I'd love to hear a
correction,
Cheers!







---------------------------------------
Posted through http://www.FPGARelated.com
 
On Tue, 15 Mar 2011 08:17:21 -0500
"sdaau" <sd@n_o_s_p_a_m.n_o_s_p_a_m.imi.aau.dk> wrote:

By the way, I experimented a bit with querying process IDs in Linux,
and could capture most of the command lines issued by ISE when running
particular commands. So, given that the reference point is after
"Cleanup Project Files":
If you want something more reliable, try "strace -e trace=process -o
somefile -ff mycommand", it will run "mycommand" and dump into
"somefile.<pid>" all the forks, execs, and exits done by the command
and all its children (there will be a separate file for the syscalls
done by each process). You now guarantee to capture every command line.

Chris
 
Hi Chris,

Thanks for your response!

If you want something more reliable, try "strace -e trace=process -o
somefile -ff mycommand", it will run "mycommand" and dump into
"somefile.<pid>" all the forks, execs, and exits done by the command
and all its children (there will be a separate file for the syscalls
done by each process). You now guarantee to capture every command line.
I used ps/pstree as outlined i
http://stackoverflow.com/questions/5213973/walking-a-process-tree/5311362#531136
... I thought of strace - but I was not aware of the hint you outline
above; so in the end I dropped strace...

Awesome tip in any case - thanks,
Cheers!



---------------------------------------
Posted through http://www.FPGARelated.com
 

Welcome to EDABoard.com

Sponsor

Back
Top