aboutsummaryrefslogtreecommitdiff
path: root/src/pld/virtex2.c
diff options
context:
space:
mode:
authorRobert Jordens <jordens@gmail.com>2015-07-02 23:15:53 -0600
committerSpencer Oliver <spen@spen-soft.co.uk>2015-08-06 13:14:01 +0100
commit2d99a0defa8fde13d4f421d54dbb6246b908303d (patch)
treec1d7fa13a10341bdfbb04de06ead846b0eb95946 /src/pld/virtex2.c
parent76586814a58106c43549feea7a1e4ba16eee9c27 (diff)
downloadriscv-openocd-2d99a0defa8fde13d4f421d54dbb6246b908303d.zip
riscv-openocd-2d99a0defa8fde13d4f421d54dbb6246b908303d.tar.gz
riscv-openocd-2d99a0defa8fde13d4f421d54dbb6246b908303d.tar.bz2
cpld/virtex2: allow JSTART to be disabled
This adds an option to disable the use of the JSTART instruction when loading bitstreams to xilinx fpgas. JSTART apparently prevents configuration if the startup clock is not set to the jtag clock in the bitstream. xc3sprog is omitting JSTART for all devices. Problems with loading a bitstream that does not have StartupClk:JTAGClk are described here: http://www.xilinx.com/support/answers/56151.html Change-Id: I8137c0bae05a8c3c6f8e2611869f70a770d1651d Signed-off-by: Robert Jordens <jordens@gmail.com> Reviewed-on: http://openocd.zylin.com/2860 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/pld/virtex2.c')
-rw-r--r--src/pld/virtex2.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c
index b600561..82eb788 100644
--- a/src/pld/virtex2.c
+++ b/src/pld/virtex2.c
@@ -159,13 +159,15 @@ static int virtex2_load(struct pld_device *pld_device, const char *filename)
jtag_add_tlr();
- virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */
+ if (!(virtex2_info->no_jstart))
+ virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */
jtag_add_runtest(13, TAP_IDLE);
- virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
- virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
- virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */
+ virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
+ virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
+ if (!(virtex2_info->no_jstart))
+ virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */
jtag_add_runtest(13, TAP_IDLE);
- virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
+ virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
jtag_execute_queue();
return ERROR_OK;
@@ -212,6 +214,10 @@ PLD_DEVICE_COMMAND_HANDLER(virtex2_pld_device_command)
virtex2_info = malloc(sizeof(struct virtex2_pld_device));
virtex2_info->tap = tap;
+ virtex2_info->no_jstart = 0;
+ if (CMD_ARGC >= 3)
+ COMMAND_PARSE_NUMBER(int, CMD_ARGV[2], virtex2_info->no_jstart);
+
pld->driver_priv = virtex2_info;
return ERROR_OK;