Walter,
Based on my reading of cablelist.txt from xc3prog, I believe the Nexys-4 is
set up the same way as the Digilent HS-2 dongle with a different product
id. I've gotten the HS2 to work, and I'm including the patch for that. You
should be able to use it with the Nexys4 with "cable DigilentHS2
pid=0x6010".
Let me know if it works.
Alex
2017-05-09 10:34 GMT-07:00 Walter F.J. Mueller <w.f.j.muel...@gsi.de>:
> Hi,
>
> I saw a thread from September 2014 entitled
> "Digilent Nexys-4 xilinx board FT2232".
> Question was whether urjtag can be used to program the new
> Digilent boards with a FTDI 2232 JTAG/UART interface.
>
> I couldn't see a success story, but a message posted by
> Steve Tell with a clear description of the board logic
> (which is always hidden in the Digilent schematics).
>
> Almost 3 years later, also after svf support was added to
> vivado, here again the question:
>
> Did somebody succeed to program a Nexys4, Basys3 or alike
> with urjtag, and if yes, with which settings ?
>
>
> With best regards, Walter
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> UrJTAG-development mailing list
> UrJTAG-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/urjtag-development
>
From e4d1646f43581214418fd2807f0383d1653f2fa9 Mon Sep 17 00:00:00 2001
From: Alex Papazoglou <papaz...@gmail.com>
Date: Mon, 15 May 2017 14:04:24 -0700
Subject: [PATCH] Add support for Digilent HS2 USB dongle.
Signed-off-by: Alex Papazoglou <papaz...@gmail.com>
---
urjtag/src/tap/cable/ft2232.c | 61 +++++++++++++++++++++++++++++
urjtag/src/tap/cable/generic_usbconn_list.h | 1 +
urjtag/src/tap/cable_list.h | 1 +
3 files changed, 63 insertions(+)
diff --git a/urjtag/src/tap/cable/ft2232.c b/urjtag/src/tap/cable/ft2232.c
index 53e9445f..9fcef9bb 100644
--- a/urjtag/src/tap/cable/ft2232.c
+++ b/urjtag/src/tap/cable/ft2232.c
@@ -1103,6 +1103,47 @@ ft2232_digilenths1_init (urj_cable_t *cable)
return URJ_STATUS_OK;
}
+static int
+ft2232_digilenths2_init (urj_cable_t *cable)
+{
+ params_t *params = cable->params;
+ urj_tap_cable_cx_cmd_root_t *cmd_root = ¶ms->cmd_root;
+
+ if (urj_tap_usbconn_open (cable->link.usb) != URJ_STATUS_OK)
+ return URJ_STATUS_FAIL;
+
+ /* safe default values (from xc3prog source) */
+ params->low_byte_value = 0xe8;
+ params->low_byte_dir = 0xeb;
+
+ /* Set Data Bits Low Byte
+ TCK = 0, TMS = 1, TDI = 0 */
+ urj_tap_cable_cx_cmd_queue (cmd_root, 0);
+ urj_tap_cable_cx_cmd_push (cmd_root, SET_BITS_LOW);
+ urj_tap_cable_cx_cmd_push (cmd_root,
+ params->low_byte_value | BITMASK_TMS);
+ urj_tap_cable_cx_cmd_push (cmd_root,
+ params->low_byte_dir | BITMASK_TCK
+ | BITMASK_TDI | BITMASK_TMS);
+
+ /* Set Data Bits High Byte */
+ params->high_byte_value = 0;
+ params->high_byte_dir = 0x60;
+ urj_tap_cable_cx_cmd_push (cmd_root, SET_BITS_HIGH);
+ urj_tap_cable_cx_cmd_push (cmd_root, params->high_byte_value);
+ urj_tap_cable_cx_cmd_push (cmd_root, params->high_byte_dir);
+
+ ft2232_set_frequency (cable, FT2232_MAX_TCK_FREQ);
+
+ params->bit_trst = -1; /* not used */
+ params->bit_reset = -1; /* not used */
+
+ params->last_tdo_valid = 0;
+ params->signals = 0;
+
+ return URJ_STATUS_OK;
+}
+
static void
ft2232_generic_done (urj_cable_t *cable)
{
@@ -2621,6 +2662,26 @@ const urj_cable_driver_t urj_tap_cable_ft2232_digilenths1_driver = {
};
URJ_DECLARE_FTDX_CABLE(0x0403, 0x6010, "-mpsse", "DigilentHS1", digilenths1)
+const urj_cable_driver_t urj_tap_cable_ft2232_digilenths2_driver = {
+ "DigilentHS2",
+ N_("Digilent HS2 Adapter"),
+ URJ_CABLE_DEVICE_USB,
+ { .usb = ft2232_connect, },
+ urj_tap_cable_generic_disconnect,
+ ft2232_cable_free,
+ ft2232_digilenths2_init,
+ ft2232_generic_done,
+ ft2232_set_frequency,
+ ft2232_clock,
+ ft2232_get_tdo,
+ ft2232_transfer,
+ ft2232_set_signal,
+ urj_tap_cable_generic_get_signal,
+ ft2232_flush,
+ ftdx_usbcable_help
+};
+URJ_DECLARE_FTDX_CABLE(0x0403, 0x6014, "-mpsse", "DigilentHS2", digilenths2)
+
/*
Local Variables:
mode:C
diff --git a/urjtag/src/tap/cable/generic_usbconn_list.h b/urjtag/src/tap/cable/generic_usbconn_list.h
index 20c51582..61d55fbe 100644
--- a/urjtag/src/tap/cable/generic_usbconn_list.h
+++ b/urjtag/src/tap/cable/generic_usbconn_list.h
@@ -62,6 +62,7 @@ _URJ_USB_FTDX(usbjtagrs232)
_URJ_USB_FTDX(usbscarab2)
_URJ_USB_FTDX(usbtojtagif)
_URJ_USB_FTDX(digilenths1)
+_URJ_USB_FTDX(digilenths2)
#endif
#ifdef ENABLE_CABLE_USBBLASTER
_URJ_USB_FTDX(usbblaster)
diff --git a/urjtag/src/tap/cable_list.h b/urjtag/src/tap/cable_list.h
index c2f73bb7..2a573bd7 100644
--- a/urjtag/src/tap/cable_list.h
+++ b/urjtag/src/tap/cable_list.h
@@ -62,6 +62,7 @@ _URJ_CABLE(ft2232_usbjtagrs232)
_URJ_CABLE(ft2232_usbscarab2)
_URJ_CABLE(ft2232_usbtojtagif)
_URJ_CABLE(ft2232_digilenths1)
+_URJ_CABLE(ft2232_digilenths2)
#endif
#ifdef ENABLE_CABLE_GPIO
_URJ_CABLE(gpio)
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
UrJTAG-development mailing list
UrJTAG-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/urjtag-development