Skip to content
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

orbtrace : add support for the 1bitsquared icebreaker fpga board #49

Closed
TomKeddie opened this issue Jan 10, 2021 · 10 comments
Closed

orbtrace : add support for the 1bitsquared icebreaker fpga board #49

TomKeddie opened this issue Jan 10, 2021 · 10 comments

Comments

@TomKeddie
Copy link

TomKeddie commented Jan 10, 2021

The icebreaker has a ICE40UP5K-SG48 on it, seems like a good candidate for a port. Would probably have to leave off sump or reduce the number of pins in the analyser.

My first pass at pin assignment looks like this, but I need to move to the other FT2232 port.

# Trace signals PMOD1A 1-4, 10
set_io traceDin[0]              4  
set_io traceDin[1]              2
set_io traceDin[2]             47
set_io traceDin[3]             45
set_io traceClk                44

# SPI connection to PC

# FT2232H pin 40
set_io spitx            18    # SPI MISO
# FT2232H pin 39
set_io spirx            9     # SPI MOSI
# FT2232H pin 38
set_io spiclk           6     # SPI CLK
# FT2232H pin 41
set_io rstIn            19     # SPI CS pin of FT2232H

# Oscillator clock for FPGA PLL
set_io clkIn        35    # connected to 12MHz xtal

# LEDs (G & RGB)
set_io sync_led        37
set_io txOvf_led       39
set_io txInd_led       40
set_io heartbeat_led   41
@TomKeddie
Copy link
Author

@1bitsquared wrote.

@TomKeddie you will get best results using just SPI streaming on the first FTDI interface ... you then don't need to solder any jumpers. The secondary parallel FIFO interface does not support the faster mode so you don't get much of a speed increase using the FIFO vs SPI.

I would implement it using the high speed SPI interface that @tnt developed for the LED matrix data streaming https://github.com/smunaut/ice40-playground/tree/master/cores/spi_slave

(the second FTDI FIFO interface does not support asynchronous? mode... not sure which one of the two modes, but it is the faster one that it does not support)
We could not do that on the first interface because of the requirement to support the proprietary lattice FPGA tools out of the box and some of them just assume that the programming interface is on the first interface of the FTDI chip.

@TomKeddie
Copy link
Author

Note that SB_PLL40_CORE is not supported on ICE40UP5K so we might need a new toplevel or at least some restructuring.

@mubes
Copy link
Collaborator

mubes commented Jan 10, 2021 via email

@mubes
Copy link
Collaborator

mubes commented Jan 10, 2021

I have re-added the SPI code. Simply change the two makefiles to reference it rather than the UART code. This is largely untested although it is working on light loads. Good luck! See 17dfc77

@TomKeddie
Copy link
Author

@mubes thanks. I'll probably start simple and generate a pr with the thing building and support for the 3 fpga targets in a clean manner. As I mentioned on discord my availability is all over the place, I tend to work in bursts, but I'll probably take weeks to look at this not days.

@mubes
Copy link
Collaborator

mubes commented Jan 10, 2021 via email

@TomKeddie
Copy link
Author

Thanks Dave, if you can add the pin defs and the target that would make sure the style fits your intention. My biggest concern would be doing a bunch of work that doesn't fit your intentions and thus needing to redo it.

Yes, baby steps are the go - I'll get the uart interface going on icebreaker and then we'll have something to put in a PR to talk about. Given the low clock rate it seems like the icebreaker might not be a great place to land but lets see how we go. Perhaps I can move to an ecp5 board next.

@mubes
Copy link
Collaborator

mubes commented Jan 15, 2021

Tom, 17c2b0c should now give you a reasonably strong springboard to start from. I've added some ifdefs etc for the ICEBREAKER so hopefully it'll just be filling in the blanks :-) Good luck.

@TomKeddie
Copy link
Author

@mubes I think we're done here? am ready to close this if you are?

@mubes
Copy link
Collaborator

mubes commented Feb 2, 2021

By all means...had meant to drop you a note to ask you :-) Thanks for all the help. Good result!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants