1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en"
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
7 <title>geda:icarus_xilinx_hints
</title>
8 <meta name=
"generator" content=
"DokuWiki Release rc2007-05-24" />
9 <meta name=
"robots" content=
"index,follow" />
10 <meta name=
"date" content=
"2007-05-24T22:27:27-0400" />
11 <meta name=
"keywords" content=
"geda,icarus_xilinx_hints" />
12 <link rel=
"search" type=
"application/opensearchdescription+xml" href=
"http://geda.seul.org/wiki/lib/exe/opensearch.php" title=
"geda Wiki" />
13 <link rel=
"start" href=
"http://geda.seul.org/wiki/" />
14 <link rel=
"contents" href=
"http://geda.seul.org/wiki/geda:icarus_xilinx_hints?do=index" title=
"Index" />
15 <link rel=
"alternate" type=
"application/rss+xml" title=
"Recent Changes" href=
"http://geda.seul.org/wiki/feed.php" />
16 <link rel=
"alternate" type=
"application/rss+xml" title=
"Current Namespace" href=
"http://geda.seul.org/wiki/feed.php?mode=list&ns=geda" />
17 <link rel=
"alternate" type=
"text/html" title=
"Plain HTML" href=
"http://geda.seul.org/wiki/_export/xhtml/geda:icarus_xilinx_hints" />
18 <link rel=
"alternate" type=
"text/plain" title=
"Wiki Markup" href=
"http://geda.seul.org/wiki/_export/raw/geda:icarus_xilinx_hints" />
19 <link rel=
"stylesheet" media=
"all" type=
"text/css" href=
"lib/exe/css" />
20 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"lib/exe/001css" />
21 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"lib/exe/002css" />
24 <div class=
"dokuwiki export">
28 <h1><a name=
"xilinx_hints" id=
"xilinx_hints">Xilinx Hints
</a></h1>
30 <pre class=
"code">For those of you who wish to use Icarus Verilog, in combination with
31 the Xilinx back end (Foundation or Alliance), it can be done. I have
32 run some admittedly simple (
2300 equivalent gates) designs through this
33 setup, targeting a Spartan XCS10.
37 Older versions of Icarus Verilog (like
19990814) couldn
't synthesize
38 logic buried in procedural (flip-flop) assignment. Newer versions
39 (like
20000120) don
't have this limitation.
41 Procedural assignments have to be given one at a time, to be
42 "found
" by xnfsyn. Say
43 always @ (posedge Clk) Y = newY;
44 always @ (posedge Clk) Z = newZ;
46 always @ (posedge Clk) begin
51 Steve
's xnf.txt covers most buffer and pin constructs, but I had reason
52 to use a global clock net not connected to an input pin. The standard
53 Verilog for a buffer, combined with a declaration to turn that into a
55 buf BUFG( your_output_here, your_input_here );
56 $attribute(BUFG,
"XNF-LCA
",
"BUFG:O,I
")
58 I use post-processing on my .xnf files to add
"FAST
" attributes to
63 The -F switches are important. The following order seems to robustly
64 generate valid XNF files, and is used by
"verilog -X
":
65 -Fsynth -Fnodangle -Fxnfio
67 Generating .pcf files:
69 The ngdbuild step seems to lose pin placement information that ivl
70 puts in the XNF file. Use xnf2pcf to extract this information to
71 a .pcf file, which the Xilinx place-and-route software _will_ pay
72 attention to. Steve says he now makes that information available
73 in an NCF file, with -fncf=
<path
>, but I haven
't tested that.
75 Running the Xilinx back end:
77 You can presumably use the GUI, but that doesn
't fit in Makefiles :-).
78 Here is the command sequence in pseudo-shell-script:
79 ngdbuild -p $part $
1.xnf $
1.ngd
80 map -p $part -o map.ncd $
1.ngd
81 xnf2pcf
<$
1.xnf
>$
1.pcf # see above
82 par -w -ol
2 -d
0 map.ncd $
1.ncd $
1.pcf
83 bitgen_flags = -g ConfigRate:SLOW -g TdoPin:PULLNONE -g DonePin:PULLUP \
84 -g CRC:enable -g StartUpClk:CCLK -g SyncToDone:no \
85 -g DoneActive:C1 -g OutputsActive:C3 -g GSRInactive:C4 \
86 -g ReadClk:CCLK -g ReadCapture:enable -g ReadAbort:disable
87 bitgen $
1.ncd -l -w $bitgen_flags
89 The Xilinx software has diarrhea of the temp files (
14, not including
90 .xnf, .pcf, .ngd, .ncd, and .bit), so this sequence is best done in a
91 dedicated directory. Note in particular that map.ncd is a generic name.
93 I had reason to run this remotely (and transparently within a Makefile)
94 via ssh. I use the gmake rule
96 ssh -x -a -o
'BatchMode yes
' ${ALLIANCE_HOST} \
97 remote_alliance ${REMOTE_DIR} $(basename $@)
2>&1 < $
<
98 scp ${ALLIANCE_HOST}:${REMOTE_DIR}/$@ .
99 and the remote_alliance script (on ${ALLIANCE_HOST})
103 xnf2pcf
<$
2.xnf
>! $
2.pcf
106 There is now a
"Xilinx on Linux HOWTO
" at
107 http://www.polybus.com/xilinx_on_linux.html
108 I haven
't tried this yet, it looks interesting.
112 I use the XESS (http://www.xess.com/) XSP-
10 development board, which
113 uses the PC parallel (printer) port for downloading and interaction
114 with the host. They made an old version of their download program
115 public domain, posted it at
116 http://www.xess.com/FPGA/xstools.zip ,
117 and now there is a Linux port at
118 ftp://ftp.microux.com/pub/pilotscope/xstools.tar.gz .
120 The above hints are based on my experience with Foundation
1.5 on NT
121 (gack) and Alliance
2.1i on Solaris. Your mileage may vary. Good luck!
123 - Larry Doolittle
<LRDoolittle@lbl.gov
> August
19,
1999
124 updated February
1,
2000