kmehall has quit [Remote host closed the connection]
kmehall has joined #amaranth-lang
bl0x_ has joined #amaranth-lang
bl0x has quit [Ping timeout: 256 seconds]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 268 seconds]
Degi_ is now known as Degi
bl0x has joined #amaranth-lang
bl0x_ has quit [Ping timeout: 256 seconds]
Xesxen_ is now known as Xesxen
Luke has quit [Quit: o/ 3w 6d 23h 59m 14s]
Luke has joined #amaranth-lang
Bluefoxicy has quit [Ping timeout: 260 seconds]
Bluefoxicy has joined #amaranth-lang
bl0x has quit [Ping timeout: 260 seconds]
bl0x has joined #amaranth-lang
<bl0x>
hi, is there any work currently being done to support Gowin FPGAs via yosys/nextpnr in Amaranth? If not, I could look into that.
<whitequark>
I don't think there is
<bl0x>
useful? I could test with a Tang Nano 9k.
<whitequark>
yep, sounds good
indy has quit [Ping timeout: 256 seconds]
sporniket has joined #amaranth-lang
<sporniket>
hello, at one point, I will have a project where I want a firmware stored on the Flash memory alongside the bitstream (for an ECP5 based board). I did not find any howto/cookbook about this use case (I searched through project treillis, and daplink ; googled for "ecp5 treillis user data file" and other expressions like that). Did someone knows how
<sporniket>
to do that, or am I on my own ?
<adamgreig[m]>
There's no particular thing you need to do, the ecp5 will boot from the start of the flash (or you can leave a jump command at start to make it look elsewhere and stuff), and once booted your gateware can take over the spi pins to access the flash for your firmware
<adamgreig[m]>
So long as the CPU knows what flash address to start from it should just work out fine
<adamgreig[m]>
You'll need USERMCLK inside the ecp5 to drive the spi clock pin, and using the spi port will disable background autoreconfiguration if you're using that (eg for the bitflip detection stuff)
<sporniket>
Ha, thanks for the tip about USERMCLK. And I was not clear enough : I would like to know how to store the firmware in the flash memory in the first place ?
sporniket has quit [Quit: Client closed]
<adamgreig[m]>
Oh, as in how to write it to the flash? However you write the bitstream should be fine, you can do two writes or glue the two binaries together into one big binary or whatever
<adamgreig[m]>
I use "ecpdap" which uses any cmsis-dap probe to talk to the ecp5 and program the spi flash connected to it, and you just give it a binary and a start address and it writes it, doesn't particularly care if it's a bitstream or firmware or what (well, if it's a bitstream it does detect that and can adjust idcode bits and so on, but anyway it works for firmware)
<adamgreig[m]>
AFAIK most tools like ecpprog and so on should do this ok?
<adamgreig[m]>
If the spi flash is directly attached to the ecp5 and the ecp5 is the only device on the JTAG scan chain, then you can set the ecp5 into spi passthrough and access the flash over JTAG, which is what those tools do
<adamgreig[m]>
Otherwise you need some other way to access the spi flash, like a separate pin header and some usb to spi widget ("spidap" can use a cmsis-dap probe for this), or an MCU on the board or something like that