These are chat archives for ulx3s/Lobby

17th
Feb 2019
this is a bit faster :)
emard
@emard
Feb 17 2019 10:54 UTC
ujprog note: supported targets are either -j sram or -j flash but NOT -j sdram sram = fpga internal config temporary active until power off flash = fpga spi config flash, reloaded at each power up
@reostat @daveshah1 multiboot on ECP5 is possible, my "tinyfpgasp" fork uses it, makefile script generates such image using ddtcmd.exe As far as I only this lattice diamond ddt tool can generate multiboot image and prjtrellis has not reverse engineered multiboot format to have ecppack support it. Lattice datasheet about multiboot is missing. There is something on golden image boot but completely wrong (doc full of typos at important HEX numbers and basically same wrong shit copy pasted from ECP3)
David Shah
@daveshah1
Feb 17 2019 11:00 UTC
It's much worse than the iCE40 though - afaik there is no way to trigger multiboot from fabric
instead you just have to pulse PROGRAMN to switch to the next image in sequence
emard
@emard
Feb 17 2019 11:03 UTC
Yes ULX3S v3.0.3 boards have PROGRAMN wired to some GPIO that way to trigger multiboot switch to next image. ALSO if you solder D28 (near OLED and JTAG header) than you will convert BTN0 function to trigger PROGRAMN
Oleg Stepanov
@reostat
Feb 17 2019 11:29 UTC
dammit, we need to start board's wiki page on github or something. I mean, the board has lots of peripherals and plenty of potential but as of now all information is scattered over various repos and answers in this channel
the wiki could contain pages like "here's how you communicate with memory", "here's how you do audio/ADC", "here's how you configure pullups/downs on GPIO" etc
for starters, it may contain just some basic info and links to various resources. as we progress we may also fill the repo with useful cores
that is, make wiki a one stop shop for documentation and resources on this board
Goran Mahovlic
@goran-mahovlic
Feb 17 2019 11:38 UTC
@reostat I completely agree with you - main problem is that we did not have time for doing it - even me 'insider' do not know lots of features :( Good thing would be that we all in Radiona agrees with you and we plan to do it before April! After small conference where we all would have much better understanding of this board...
Oleg Stepanov
@reostat
Feb 17 2019 11:39 UTC
happy to hear that. I can really see this board being a huge step forward
Goran Mahovlic
@goran-mahovlic
Feb 17 2019 11:44 UTC
We know that we (or anyone else) cannot sell this board if it does not have clear and easy understandable documentations. And that is not something emard should do. That's on us in Radiona and we need to rethink how users will go thru board experience!
emard
@emard
Feb 17 2019 11:46 UTC
I have updated ULX3S doc/MANUAL.md with D28 soldering and funtion note.
Oleg Stepanov
@reostat
Feb 17 2019 11:54 UTC
pls add note on USER_PROGRAMN and how it can be used for multiboot without diode soldering? I believe schematic says it's connected to FPGA's pin M4
Oleg Stepanov
@reostat
Feb 17 2019 12:07 UTC
also, your link points to the original TinyFPGA-Bootloader, not to your fork (https://github.com/emard/TinyFPGA-Bootloader)
emard
@emard
Feb 17 2019 12:07 UTC
Im not sure if I programmed it really, but bootloader application tinyfpgasp should after flashing send command to FPGA bootloader to toggle M4 and it will execute fresh uploaded image. Or just re-plug USB and it will do the job without D28
Oleg Stepanov
@reostat
Feb 17 2019 12:08 UTC
uhm, replugging USB would load the first boot image again, wouldn't it? the bootloader itself, that is
unless you use the bootloader to override the image with bootloader in FLASH - which kinda defeats the purpose )
sxpert
@sxpert
Feb 17 2019 14:14 UTC
it's a bird ! it's a plane ! no, it's an unfinished softcore !!!
image.png
Oleg Stepanov
@reostat
Feb 17 2019 14:16 UTC
sooner than later we're gonna have a whole gallery. the one above would go as "pooping bird"
Goran Mahovlic
@goran-mahovlic
Feb 17 2019 14:16 UTC
heehehe
Oleg Stepanov
@reostat
Feb 17 2019 14:16 UTC
or a pigeon, rather
sxpert
@sxpert
Feb 17 2019 14:28 UTC
heh
emard
@emard
Feb 17 2019 21:16 UTC
@reostat regarding bootloader: HI I forgot to say replugging to USB charger which is not PC and won't enumerate (you can use 2 cables and power for US1 optionally). If US2 can't see PC on otter side any longer, it will pull PROGRAMN to skip itsel fbootlaoder) and load user bitstream. Bootloader is somehow "smart"
emard
@emard
Feb 17 2019 21:39 UTC
@tobias we have our local user with apple laptop, can you tell me your e-mail if he can't install prjtrellis toochain so you can help him?
gojimmypi
@gojimmypi
Feb 17 2019 21:47 UTC
I've published my latest ramblings on my ULX3S (thanks @emard @daveshah1 @goran-mahovlic @reostat )
emard
@emard
Feb 17 2019 21:50 UTC
second quote is no longer true, tedious process is for SVF but ujprog -j flash file.bit should flash easily
gojimmypi
@gojimmypi
Feb 17 2019 21:57 UTC
updated! thanks
sxpert @sxpert bookmarks
emard
@emard
Feb 17 2019 22:28 UTC
I have also updated ulx3s-passthru source with new makefile and it builds with prjtrellis now
use "universal-make" directory, vhdl2vl does the job
gojimmypi
@gojimmypi
Feb 17 2019 23:00 UTC
@emard re vhdl2vl, this one? https://github.com/ldoolitt/vhd2vl
David Shah
@daveshah1
Feb 17 2019 23:00 UTC
Yeah, that's the one
emard
@emard
Feb 17 2019 23:16 UTC
dave, someone asked is there some chance to have serdes soon. I guess it's difficult as serdes is not only elementary silicon block but also partly in a encrypted IP core - am I right?
David Shah
@daveshah1
Feb 17 2019 23:17 UTC
No, there is no encrypted IP core
The cores that actually use it are encrypted but you don't need them if you start from scratch
It should otherwise work fine with nextpnr
whitequark started working on a PCIe core: https://github.com/whitequark/Yumewatari
emard
@emard
Feb 17 2019 23:20 UTC
I see, this is encouraging if serdes block can be used standalong! And I have another question, are ordinary differential (non-serdes) IO pins capable to handle pcie x1. i am thinking about PCIe ram expansion.
David Shah
@daveshah1
Feb 17 2019 23:21 UTC
No, PCIe runs at fixed data rates and a minimum of 2.5Gbps so has to use SERDES
You could run PCIe protocol on IO pins at lower rate but no other existing devices would work with it
emard
@emard
Feb 17 2019 23:25 UTC
I see, serdes speed is required for normal PCIe (or in some marginal case if someone finds or hacks PCIe card that canlower its protocol clock)
David Shah
@daveshah1
Feb 17 2019 23:27 UTC
I wouldn't expect any existing card to work at such a low rate
Oleg Stepanov
@reostat
Feb 17 2019 23:27 UTC
serdes was my request
emard
@emard
Feb 17 2019 23:28 UTC
OK no chance of PCIe for ULX3S :). What is about multiboot image support - is your research now enriched with more information of ECP5 boot "assembly instructions code" so we can do multiboot image from ecppack, without this annyong ddtcmd.exe?
Oleg Stepanov
@reostat
Feb 17 2019 23:29 UTC
having next revision (or call it the upscale version of current one... ULX3S-MEGA?) with LFE5UM-85 or even LFE5UM5G-85 and FT2232H with second channel wired to FPGA would be my dream-come-true :)
David Shah
@daveshah1
Feb 17 2019 23:29 UTC
emard: no, haven't looked at multiboot
Oleg Stepanov
@reostat
Feb 17 2019 23:31 UTC
as for multiboot, I still have no idea how to make the multiboot image (preferably with more than 2 configurations) and only a faint idea of how to trigger it (jerk USER_PROGRAMN low?). I guess I just need to read the sources of your fork of TynyFPGA-Bootloader but... there's too much sources to read on my plate already
I mean, for ice40 the process is clear: use icemulti to combine up to 4 images into 1, then use SB_WARMBOOT to switch between them
for ecp5, not so much clear
David Shah
@daveshah1
Feb 17 2019 23:33 UTC
Yeah, there is no equivalent to SB_WARMBOOT
emard
@emard
Feb 17 2019 23:33 UTC
yes ULX3S MG = Muchacho Galante edition, with FT2232 and serdes wired to HDMI or something.
Oleg Stepanov
@reostat
Feb 17 2019 23:33 UTC
I figured thus far :)
David Shah
@daveshah1
Feb 17 2019 23:34 UTC
Asserting PROGRAMN should move to the next image in sequence
Oleg Stepanov
@reostat
Feb 17 2019 23:34 UTC
between all 4 configs in cycle?
David Shah
@daveshah1
Feb 17 2019 23:34 UTC
Or however many you have
emard
@emard
Feb 17 2019 23:34 UTC
multiboot: i did some research and succeeded generating golden image (failsafe) from my python script but still multiboot mode I don't understand
Oleg Stepanov
@reostat
Feb 17 2019 23:35 UTC
and what are the offsets the images must be located at in flash? or does every image need to have a pointer to the next one in some format?
see, lots of questions (
emard
@emard
Feb 17 2019 23:36 UTC
You can have a bitstream that connects BTN0 to PROGRAMN or solder a D28 diode to experiment with multiboot
Oleg Stepanov
@reostat
Feb 17 2019 23:37 UTC
ok. so I have img1.bit, img2.bit and img3.bit. each one, say, wires USER_PROGRAMN to ~BTN_DOWN
what do I do with them next?
emard
@emard
Feb 17 2019 23:37 UTC
ECP5 so to say has a 16/32 bit CPU that manages multiboot. Its assembly is executed from last 256 bytes of SPI flash and I think golden/failsave images can be anywhere but for multiboot I'm not sure can it really be the same
we don't have proper documentation of this assembly instructions. Only reversenginnering from ddtcmd.exe can reveal something. Great problem is that ddtcmd.exe also patches primary bitstream somehow and then I'm stuck to follow what happens further and how user can make multibuoot from opensource
Oleg Stepanov
@reostat
Feb 17 2019 23:40 UTC
btw why are you guys up? isn't it past midnight in Europe? :)
emard
@emard
Feb 17 2019 23:40 UTC
we use GMT UTC time :)
David Shah
@daveshah1
Feb 17 2019 23:41 UTC
ditto
Oleg Stepanov
@reostat
Feb 17 2019 23:41 UTC
ok, ok, almost past midnight
David Shah
@daveshah1
Feb 17 2019 23:41 UTC
@emard do you have a ddtcmd multiboot image to hand that you can send?
emard
@emard
Feb 17 2019 23:42 UTC
yes of course I can come up with something, my tinyfpga bootloader fork makes them from makefile lemme check does it still compile to binary
Oleg Stepanov
@reostat
Feb 17 2019 23:42 UTC
@daveshah1 if you're goint to do what I think you're going to do then you need both the original images and the resulting multiboot one
David Shah
@daveshah1
Feb 17 2019 23:43 UTC
I first want to see what the patches are
emard
@emard
Feb 17 2019 23:45 UTC
dave: can you use my makefile from my patched tynyfpga bootloader the makefile has exact process of ddtcmd invocation and you will see that it patches primary bitstream somehow TinyFPGA-Bootloader/boards/ulx3s-v2.0-85f-sp$ make
Oleg Stepanov
@reostat
Feb 17 2019 23:47 UTC
another question is if the process is the same for only two images and for more than two images
emard
@emard
Feb 17 2019 23:48 UTC
I think this is main invocation that makes multiboot: LANG=C ${DDTCMD} -dev $(FPGADEVICE) -oft -advanced -format int -flashsize 128 -header -quad 4 \
-if $(PROJECT)/$(PROJECT)
$(PROJECT).bit \
-golden $(PROJECT)/$(PROJECT)$(PROJECT).bit \
-multi 1 -altfile $(PROJECT)/$(PROJECT)
$(PROJECT)_altfile.bit -address 0x200000 -next prim -of $@
altfile is actually initial copy of user's bitstream going to 0x200000 which can be overwritten and to which it skips on PROGRAMN pull down. ddtcmd fiddles something with temporary files during patching and erases them, stopping it in the middle of the process of linux could reveal something probably too
Oleg Stepanov
@reostat
Feb 17 2019 23:51 UTC
yeah, reading ECP5 docs I thought the same: altimage is the primary image, golden one loads only if altimage fails (or on trigger)
emard
@emard
Feb 17 2019 23:52 UTC
altimage can be same binary but must be a different copy (not symlink) because when ddtcmd patches primary it would (if symlinked) patch also the altimage and then multiboot won't work. I don't know more details apart that it appears so
golden image is loaded if primary is damaged. I don't know can we have multiboot without golden image. ddtcmd has no option to make it without golden.