trabucayre changed the topic of #openFPGALoader to: Universal utility for programming FPGA / Github: https://github.com/trabucayre/openFPGALoader/ Logs: https://libera.irclog.whitequark.org/openFPGALoader
<ysionneau> Hi, I'm writing a simple fpga programmer for my board, where the setup is like this host <usb> mcu <spi> fpga
<ysionneau> so I send usb frames to the mcu, to ask the mcu to send spi frames to fpga ...
<ysionneau> fpga is lattice ecp5 programmed as slave SPI
<ysionneau> so far I am able to send basic spi commands to the fpga and read idcode
<ysionneau> but I'm unsure if I parse correctly the bitstream...
<ysionneau> am I correct in my understanding that I should check 0xff00 then ASCII key/value table then 0x00ff then check for some 0xff then 0xffffbdb3, then skip again all 0xff untill it's != 0xff and start sending the raw data to SPI?
<ysionneau> basically the first data that I really send is 3b 00 00 00 e2 00 00 00 followed by idcode
<ysionneau> is that OK or did I miss something?
<ysionneau> because DONE never goes high and the read status returns 0xffffffff :p
* ysionneau is trying to make sense of ecp5 datasheet + his understanding of reading openFPGALoader code
cr1901_ has joined #openFPGALoader
cr1901 has quit [Ping timeout: 252 seconds]
cr1901_ is now known as cr1901
_whitelogger has joined #openFPGALoader
<trabucayre> ysionneau: most of this part is in latticeBitParser::parseHeader
<trabucayre> 0xff00 followed by 0xff
<trabucayre> sorry 0xff00 followed by ascii sequence
<trabucayre> followed by 0bb3bxFFFF
<trabucayre> s/0b/0x/g
<ysionneau> trabucayre: my C++ skills are not very good so I'm not sure I follow exactly the code, but yes I've found where in the code was the parsing done
<ysionneau> I'm searching for a confirmation of "where do the real bitstream payload start"
<ysionneau> because it seems I'm doind it wrong
<trabucayre> with 0xb3bxFFFF
<ysionneau> so I need to send this one?
<ysionneau> or send right after it?
<trabucayre> usually you sent the bitstream no?
<ysionneau> you mean I should send the entire .bit file and not skip anything?
<trabucayre> As far I know preamble is optional but rest of the bitstream is required to configure SRAM (directly or via the SPI Flash)
<ysionneau> sure, maybe I was not clear (english is not my native language)
<ysionneau> afaik there is a header followed by the payload to be sent by spi, and the frontier between payload and header was not clear to me, I didn't know from which point onward it was OK to send the data
<trabucayre> at least openFPGALoader sent 3 0xff 0xbd 0xb3
<trabucayre> not sure 0xff are relevant but 0xbdb3 is the preamble
<ysionneau> ok thanks
_whitelogger has joined #openFPGALoader