-
Notifications
You must be signed in to change notification settings - Fork 212
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
Added AlhambraII and ULX3S boards #139
Added AlhambraII and ULX3S boards #139
Conversation
…ybe optimization, ULX3S Failing for some misconfiguration in Makefiles
Thank you very much for the contribution! 🎉
No problem! We will have a look. |
Let's check the Alhambra II first. In -> Seems like the board provides an external 12MHz clock. Maybe we should use that instead. We can still use the PLL and it's default configuration. |
seems like there is no HF_OSC primitive in the iCE40HX family; revert this if I am wrong ;D
Same thing with the RGB drive. But we can just use simple IOs for that 😉 By the way, I am referring to this Alhambra II setup: https://github.com/FPGAwars/Alhambra-II-FPGA/blob/master/doc/pinout/Alhambra%20II%20V1.0A%20-%20Pinout_v1.0_rev%202.pdf I am little bit confused about the |
Completely agree, I did pay attention enough, this board have external clock |
Yes, this is the right pinout document )I have it in paper!). This board have not RGB, but instead I configured in the .pcf three of the leds for just tested. PMOD there is not, but SPI yes! There is 2 SPI, one for general propose and the second one for FLASH memory! |
HI! I cleaned a bit the code regarding the PMOD and the USB. Did looks now better? |
Looks great! 👍
It is the same problem as with the As the board provides 8 on-board LEDs I propose the following:
I can take care of that. Furthermore, I would remove the SPI pin mapping for now as MinimalBoot does not provide this feature anyway.
|
Another thing I just realized is the amount of available block RAM. Is the Alhambra II board using the HX8K FPGA? In that case we have 16kB block RAM available in total. We need 4kB for the bootloader, so we could use 8kB for the IMEM and the remaining 4kB for the DMEM. edit I forget the block RAM requirements of the CPU register file... 😅 |
We have a bitstream! 🎉 I am not sure if you can access the workflow artifact. If not, here is the bitstream (rename from |
Yes 8K! |
Synthesis OK in my side! |
Could you test the bitstream on your Alhambra board? If everything works fine we can move on the ULX3S 👍 |
I can not do right now, I am not in my city, I will be back on the weekend, I am not sure I will manage to test on weekend, I will try, but for sure I can do on Monday during my boring remote work meetings! |
No need to rush 😉 So let's move on to the ULX3S board if you are ok with that. Btw, we are talking about this one https://radiona.org/ulx3s/, right? There are some minor things that need to be adapted in the makefiles (like memory components) but I can take care of it. I think the only thing that is really missing is a design top entity like |
I just push some fixes for the ULX3S board, I got stack with this error: |
Seems like my comment and your commit had a great timing 😄
I will have a look tomorrow. 👍 |
Just push that file! Yes, is this: https://radiona.org/ulx3s/ (My favourite board!). |
I suggest the following: Let's remove all ULX3S-related modification from this PR so that this is just "Adding AlhambraII Board". After this is merged, please fire another pull request with the ULX3S. Are you ok with this? I would take care of cleaning up this PR. Alternatively, we can keep on working on the ULX3S here and merge everything when that setup is also running. |
Well, as long as I can not test the boards until next week I would suggest to keep working in this PR, and next week when I test the two board merge everything. But is just an opinion, we do as you prefer, is your repo and I respect that, and thanks for ask my opinion, really appreciate! |
Hi!, The AlhambraII have two USB ports, but one is just for power, no data, If I remember good, with PicoRV32 I could connect throw serial, using the same USB port, and when flash the bit stream and boot the board, appears a second USB serial block device in the /dev directory. Anyway, I would start with a version that make blink one LED, and then go step forward to the UART connection. |
Good idea. The current Alhambra setup uses the bootloader, which shows a "heart beat" using the LED at GPIO output pin 0. If we still have problems making the first bitstream run, we could further simplify the setup by using the much simpler "minimal "SoC configuration: that SoC does not use the bootloader and boots a pre-installed LED blink program instead.
Fingers crossed! 😉
No worries! Take your time. |
AlhambraII seams working! The first led is blinking 16 times, like two pulses per second, and after that staying on, and appears another USB serial file "/dev/ttyUSB1", but UART stills refusing connection, I tried with 115200 and 9600. Anyway seams working! |
With ULX3S I had not the same results, no blinking any led, and didn't appears a extra USB serial file in my Linux. |
Awesome! 🎉
That is the heart beat blinking of the bootloader. The default Baud rate is 19200. If nothing appears in the terminal try a reset of the FPGA. Maybe we have switched the TX and RX signals... 🤔 Btw, did you use the bitstream from the project's workflow or did you generate it locally on your machine?
I will have a look again. |
Hi! |
I just test my environment, I can synthesize again, I can play again! I will try to switch TX and RX in AlhambraII and test the UART, tonight or tomorrow night, as soon as I get a bit of free time |
Please double check your computer's tty configuration. Seems like there are RX and TX LEDs on the Alhambra board. If you connect to the UART USB port, you should see the TX LED flashing when you type something into the terminal program - regardless of the FPGA content. |
Hi! Definitely you were right, I check the constrains file and the alhambraII datasheet and TX, RX was flipped (My fault, sorry). But, from last merge "master" to this branch is not appearing any more the UART block device, not with flipped constrains or fixed ones. |
👍
What do you mean? The UART is still listed in the synthesis flow so there should be no difference in the hardware. The available tty devices in your Linux device tree should not be impacted by this at all. It is the on-board FTDI chip that provides these USB devices and not the FPGA or it's programmed logic. |
I mean that before that merge was appearing a extra "tty" in the linux device tree (the programmer and another one), as happens also when you flash the Picorv32 SOC for AlhambraII, and after the merge (without changing anything) do not appears anymore... |
@stnolting I could manage to connect throw the serial to the AlhambraII board, the issue was in my environment, I forgot to give the right permission to the ttyUSB1 block device, now I can connect to the board and Putty report "connected successfully" but no anything more, if I do "echo -ne '\033[2J' > /dev/ttyUSB1" I can see the UART led blinking in the board. I will give a bit time to ULX3S, maybe working around I can take the same result... |
Hey there! Good to hear the UART connection is working! uart_txd_o => open, -- UART0 send data (NOT USED)
uart_rxd_i => AlhambraII_RX, -- UART0 receive data and add this line somewhere AlhambraII_TX <= AlhambraII_RX; |
Hi, no worries! I use to be busy too!
|
I have checked the Alhambra schematics again. As far as I understand, the FTDI UART interface looks like this:
If this is correct, then the current
|
Good news, at last, I managed to make the ULX3S works, I push some changes, hart led is blinking, (I reconnect temporally the 2th and the 3th led to the TX and RX just for see if works, I will delete this dirty code in the next push) UART is working!! |
Awesome news!! 👍 🎉 |
Hooray! 🎉 It would be great if you could test the bitstreams generated by the Implementation workflow here. If these bitstreams are working, then we can merge everything 👍 edit
Do not worry about that at all! The UART's RX and TX signal declarations are never really clear in most pin diagrams. You have a 50:50 chance of selecting the right wiring - and in my case I always take the wrong one first 😄 |
I just tested the bitstreams generated by the Implementation workflow, and are working! I think is ready for merge. |
Great! I will have a final look at all the changed files and will merge everything after that. 🚀
Thank you very much! It was also a pleasure for me. |
For the record, on Windows I recommend using MSYS2. Just install it, update, and then: pacman -S mingw-w64-x86_64-eda That provides several open source EDA tools, including GHDL, Yosys, nextpnr, etc.: https://packages.msys2.org/group/mingw-w64-x86_64-eda Alternatively, containers from https://hdl.github.io/containers/ can be used with Docker Desktop. Both approaches are used/showcased in the CI of this repo. |
Alhambra failing in the design, maybe optimization, ULX3S Failing for some misconfiguration in Makefiles.
I need help with ULX3S, I got this error:
ghdl -a --std=08 --work=ecp5 devices/ecp5/ecp5_components.vhd ghdl -a --std=08 --work=neorv32 ../../rtl/core/neorv32_package.vhd ../../rtl/core/neorv32_application_image.vhd devices/ice40/neorv32_imem.ice40up_spram.vhd devices/ice40/neorv32_dmem.ice40up_spram.vhd ../../rtl/core/neorv32_bootloader_image.vhd ../../rtl/core/neorv32_boot_rom.vhd ../../rtl/core/neorv32_bus_keeper.vhd ../../rtl/core/neorv32_busswitch.vhd ../../rtl/core/neorv32_cfs.vhd ../../rtl/core/neorv32_cpu.vhd ../../rtl/core/neorv32_cpu_alu.vhd ../../rtl/core/neorv32_cpu_bus.vhd ../../rtl/core/neorv32_cpu_control.vhd ../../rtl/core/neorv32_cpu_cp_fpu.vhd ../../rtl/core/neorv32_cpu_cp_muldiv.vhd ../../rtl/core/neorv32_cpu_cp_shifter.vhd ../../rtl/core/neorv32_cpu_decompressor.vhd ../../rtl/core/neorv32_cpu_regfile.vhd ../../rtl/core/neorv32_debug_dm.vhd ../../rtl/core/neorv32_debug_dtm.vhd ../../rtl/core/neorv32_fifo.vhd ../../rtl/core/neorv32_gpio.vhd ../../rtl/core/neorv32_icache.vhd ../../rtl/core/neorv32_mtime.vhd ../../rtl/core/neorv32_neoled.vhd ../../rtl/core/neorv32_pwm.vhd ../../rtl/core/neorv32_slink.vhd ../../rtl/core/neorv32_spi.vhd ../../rtl/core/neorv32_sysinfo.vhd ../../rtl/core/neorv32_top.vhd ../../rtl/core/neorv32_trng.vhd ../../rtl/core/neorv32_twi.vhd ../../rtl/core/neorv32_uart.vhd ../../rtl/core/neorv32_wdt.vhd ../../rtl/core/neorv32_wishbone.vhd ../../rtl/core/neorv32_xirq.vhd devices/ice40/neorv32_imem.ice40up_spram.vhd:45:9:error: cannot find resource library "ice40" devices/ice40/neorv32_imem.ice40up_spram.vhd:46:11:error: unit "components" not found in library "ice40" devices/ice40/neorv32_imem.ice40up_spram.vhd:66:34:error: entity 'neorv32_imem' was not analysed make[3]: *** [synthesis.mk:5: neorv32-obj08.cf] Error 1
Seams that is taking iCE40 VHDL setting files instead ECP5 files (as OrangeCrab does) I couldn't find where...