Skip to content

Commit

Permalink
ISE backend: add support for specifying the JTAG chain index
Browse files Browse the repository at this point in the history
  • Loading branch information
codepainters authored and olofk committed Feb 16, 2022
1 parent 3f6747e commit 3765a8c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
17 changes: 9 additions & 8 deletions doc/edam/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ yosys_synth_options List of String Options for Yosys Synthesis
ise
~~~

================ ===================== ===========
Field Name Type Description
================ ===================== ===========
family String FPGA family e.g. *spartan6*, *virtex5*
device String Device identifier e.g. *xc6slx45*
package String Device package e.g. *csg324*
speed String Device speed grade e.g. *-2*
================ ===================== ===========
================== ===================== ===========
Field Name Type Description
================== ===================== ===========
family String FPGA family e.g. *spartan6*, *virtex5*
device String Device identifier e.g. *xc6slx45*
package String Device package e.g. *csg324*
speed String Device speed grade e.g. *-2*
board_device_index String Specifies the FPGA's device number in the JTAG chain, starting at 1.
================== ===================== ===========

isim
~~~~
Expand Down
11 changes: 9 additions & 2 deletions edalize/ise.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ class Ise(Edatool):
setMode -bscan
setCable -port auto
addDevice -p 1 -file {bit_file}
program -p 1
identify
assignFile -p {board_device_index} -file {bit_file}
program -p {board_device_index}
saveCDF -file {cdf_file}
quit
"""
Expand Down Expand Up @@ -88,6 +89,11 @@ def get_doc(cls, api_ver):
"type": "String",
"desc": "FPGA speed grade (e.g. -2)",
},
{
"name": "board_device_index",
"type": "String",
"desc": "Specifies the FPGA's device number in the JTAG chain, starting at 1",
},
],
}

Expand Down Expand Up @@ -191,6 +197,7 @@ def _write_pgm_file(self, pgm_file_name):
pgm_file=pgm_file_name,
bit_file=os.path.join(self.work_root, self.toplevel + ".bit"),
cdf_file=os.path.join(self.work_root, self.toplevel + ".cdf"),
board_device_index=self.tool_options.get("board_device_index", "1"),
)
)
pgm_file.close()

0 comments on commit 3765a8c

Please sign in to comment.