1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./style.css" />
6 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./design.css" />
7 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"./print.css" />
9 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
13 <h1 id=
"xilinxhints">Xilinx Hints
</h1>
15 <pre class=
"code">For those of you who wish to use Icarus Verilog, in combination with
16 the Xilinx back end (Foundation or Alliance), it can be done. I have
17 run some admittedly simple (
2300 equivalent gates) designs through this
18 setup, targeting a Spartan XCS10.
22 Older versions of Icarus Verilog (like
19990814) couldn
't synthesize
23 logic buried in procedural (flip-flop) assignment. Newer versions
24 (like
20000120) don
't have this limitation.
26 Procedural assignments have to be given one at a time, to be
27 "found
" by xnfsyn. Say
28 always @ (posedge Clk) Y = newY;
29 always @ (posedge Clk) Z = newZ;
31 always @ (posedge Clk) begin
36 Steve
's xnf.txt covers most buffer and pin constructs, but I had reason
37 to use a global clock net not connected to an input pin. The standard
38 Verilog for a buffer, combined with a declaration to turn that into a
40 buf BUFG( your_output_here, your_input_here );
41 $attribute(BUFG,
"XNF-LCA
",
"BUFG:O,I
")
43 I use post-processing on my .xnf files to add
"FAST
" attributes to
48 The -F switches are important. The following order seems to robustly
49 generate valid XNF files, and is used by
"verilog -X
":
50 -Fsynth -Fnodangle -Fxnfio
52 Generating .pcf files:
54 The ngdbuild step seems to lose pin placement information that ivl
55 puts in the XNF file. Use xnf2pcf to extract this information to
56 a .pcf file, which the Xilinx place-and-route software _will_ pay
57 attention to. Steve says he now makes that information available
58 in an NCF file, with -fncf=
<path
>, but I haven
't tested that.
60 Running the Xilinx back end:
62 You can presumably use the GUI, but that doesn
't fit in Makefiles :-).
63 Here is the command sequence in pseudo-shell-script:
64 ngdbuild -p $part $
1.xnf $
1.ngd
65 map -p $part -o map.ncd $
1.ngd
66 xnf2pcf
<$
1.xnf
>$
1.pcf # see above
67 par -w -ol
2 -d
0 map.ncd $
1.ncd $
1.pcf
68 bitgen_flags = -g ConfigRate:SLOW -g TdoPin:PULLNONE -g DonePin:PULLUP \
69 -g CRC:enable -g StartUpClk:CCLK -g SyncToDone:no \
70 -g DoneActive:C1 -g OutputsActive:C3 -g GSRInactive:C4 \
71 -g ReadClk:CCLK -g ReadCapture:enable -g ReadAbort:disable
72 bitgen $
1.ncd -l -w $bitgen_flags
74 The Xilinx software has diarrhea of the temp files (
14, not including
75 .xnf, .pcf, .ngd, .ncd, and .bit), so this sequence is best done in a
76 dedicated directory. Note in particular that map.ncd is a generic name.
78 I had reason to run this remotely (and transparently within a Makefile)
79 via ssh. I use the gmake rule
81 ssh -x -a -o
'BatchMode yes
' ${ALLIANCE_HOST} \
82 remote_alliance ${REMOTE_DIR} $(basename $@)
2>&1 < $
<
83 scp ${ALLIANCE_HOST}:${REMOTE_DIR}/$@ .
84 and the remote_alliance script (on ${ALLIANCE_HOST})
88 xnf2pcf
<$
2.xnf
>! $
2.pcf
91 There is now a
"Xilinx on Linux HOWTO
" at
92 http://www.polybus.com/xilinx_on_linux.html
93 I haven
't tried this yet, it looks interesting.
97 I use the XESS (http://www.xess.com/) XSP-
10 development board, which
98 uses the PC parallel (printer) port for downloading and interaction
99 with the host. They made an old version of their download program
100 public domain, posted it at
101 http://www.xess.com/FPGA/xstools.zip ,
102 and now there is a Linux port at
103 ftp://ftp.microux.com/pub/pilotscope/xstools.tar.gz .
105 The above hints are based on my experience with Foundation
1.5 on NT
106 (gack) and Alliance
2.1i on Solaris. Your mileage may vary. Good luck!
108 - Larry Doolittle
<LRDoolittle@lbl.gov
> August
19,
1999
109 updated February
1,
2000</pre>