-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crosslink NX support #3
Comments
@gregdavill Should I send a PR adding the codes that David listed at enjoy-digital/litex#618 (comment)? The output that I pasted in enjoy-digital/litex#618 (comment) shows my incorrect code -- I added the code for LICCL-40-ES, but describe it in text as "LICCL-40". I would fix that and add the other codes. If you'd rather fix everything in this issue in one go, that makes sense too. |
I have branch where I'm pushing changes to: https://github.com/gregdavill/ecpprog/tree/nx_support It has some changes but I'm still yet to test with a LiteX bitstream, waiting on a licence file for Radiant. |
Let me know if I can assist in any way -- I have the NX eval board with LICCL-40-ES, and Radiant 2.0. (I installed Radiant 2.1 first before realizing that it won't generate a bitstream for NX parts.) I think I just had to make an account with Lattice to get a license -- no fee. |
I found the slowing the JTAG/SPI clock allowed ecpprog to verify flash content. It also solve several other weird problems. |
Interesting, thanks for poking around with that. |
It could well be a limitation of the JTAG/SPI bridge on the NX. Maybe on non-ES parts it will be better? I am now curious about why programming takes ~1 minute per MB. |
With the following patch to sample using the negedge, programming and verification seems reliable for me: diff --git a/ecpprog/jtag_tap.c b/ecpprog/jtag_tap.c
index 9aa1608..400c228 100644
--- a/ecpprog/jtag_tap.c
+++ b/ecpprog/jtag_tap.c
@@ -203,7 +203,7 @@ static void jtag_shift_bytes(
- data[0] = MC_DATA_OUT | MC_DATA_IN | MC_DATA_LSB | MC_DATA_OCN;
+ data[0] = MC_DATA_OUT | MC_DATA_IN | MC_DATA_LSB | MC_DATA_OCN | MC_DATA_ICN;
data[1] = (byte_count - 1);
data[2] = (byte_count - 1) >> 8;
memcpy(data + 3, input_data, byte_count);
|
Thanks for looking into this @daveshah1! This is useful info. |
I've tried the patch you've suggested It seems to work in conjunction with |
Has anyone been able to get "LSC_REFRESH" working? With a board powered up on my bench, I can press PROGRAMN, and see it re-configure itself from FLASH. My understanding is that "LSC_REFRESH" is supposed to also do this, but I can't seem to get it work. I'd like to boot into the bitstream that we just loaded into FLASH, without the requirement of power cycling. |
Not sure if this is related: with the LIFCL-40-EVN board, I was not able to get LSC_REFRESH to work. There was another weirdnesses too - the PROGRAMN button put the device into a state where it was waiting (presumably for JTAG) and I had to power cycle the board to get it to read Flash at all.I reported to Lattice and they told me it was a problem with this particular product (though I was unclear whether it was the board or the early silicon). I have been working around it by programming to flash, and then reprogramming the bitstream in SRAM, at which point the configuration phase completes and the bitstream starts running. |
Thanks! That sounds similar to what I'm seeing. (I'm also using the LIFCL-40-EVN for these tests). It's probably worth implementing the FLASH->SRAM sequence you've mentioned if we detect an NX-ES part. |
@tcal-x scripted this for us, but a command line switch to "double program" might be useful for others, especially people new to the board. fwiw, in my use cases, I have been using ecpprog to program other content to the flash too (mostly risc-v programs). Automatically uploading the same content into SRAM would be unhelpful (!) |
I've merged the basic NX support that was in the Feel free to open up issues if there are features that aren't working exactly right with NX support. |
There will soon be LiteX support for the Crosslink/Certus NX. enjoy-digital/litex#618
It would be nice to extend ecpprog to support these chips. This shouldn't bee too difficult as the JTAG engine on these parts is quite similar. Additionally the Crosslink-NX Eval board already features an FTDI connection.
Two issues have been identified:
The text was updated successfully, but these errors were encountered: