_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://libera.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
TMM_ is now known as TMM
TMM is now known as TMM_
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #litex
<sajattack[m]> Did the cle215 carrier board ever come to fruition?
<zyp> maybe stuck on part availability like everything else?
<sajattack[m]> probably :P
<_florent_> sajattack[m]: we still have to finish the validation of the ECP5 <-> Artix7 link and ECP5/Ethernet PHY are not available currently, so even if fully validated it would not be possible to produce it.
xenador77 has quit [Remote host closed the connection]
FabM has joined #litex
FabM has quit [Changing host]
FabM has joined #litex
<pepijndevos[m]> welp I know too little about JTAG. Trying to program the colorlight board with some FT2232 thingy but not having much luck
<tnt> pepijndevos[m]: openfpgaloader should handle pretty much all of it right ?
<pepijndevos[m]> yea but I'm getting weird errors and I think it's maybe an electronic problem
<pepijndevos[m]> I get inconsistent IDCODE readouts
<pepijndevos[m]> JTAG init failed with: Unknown device with IDCODE: 0xe8244003 (manufacturer: 0x001 (), part: 0x41 vers: 0xe
<tnt> what speed are you using ?
<pepijndevos[m]> I tried --freq 1000 with little difference
<pepijndevos[m]> one time it randomly worked. Most of the time it gets the manufacturer right...
<tnt> you can try --invert-read-edge but if it doesn't work even at 1 MHz, not sure it would help
<pepijndevos[m]> yea no change
<pepijndevos[m]> $ openFPGALoader --cable ft2232 --freq 100 --invert-read-edge --detect
<pepijndevos[m]> Jtag frequency : requested 100.00Hz -> real 100.00Hz
<pepijndevos[m]> JTAG init failed with: Unknown device with IDCODE: 0xe0891043 (manufacturer: 0x021 (lattice), part: 0x04 vers: 0xe
<pepijndevos[m]> and uh... JTAG is a clocked protocol yea? So it's not like UART where you can get garbage if the oscillators is running wrong or whatever
<tnt> yes
<pepijndevos[m]> and... if I have the wiring wrong it wouldn't work at all right...
<tnt> heh ... that I'm not sure.
<tnt> seems unlikely but maybe some random thing on tdi/tms would still read something on tdo
<pepijndevos[m]> I have the Colorlight 5A-75B V8.0 and the way I have it hooked up now is that TCK/TMS/TDI/TDO go to the header, ground to the other header, and 5V to the main power input. So it gets 3.3v from there, not from the FTDI thing, which I've left disconnected.
<pepijndevos[m]> I guess I'll double-check all the wires and maybe try giving it an external power supply
<gatecat> 0xe8244003 still kinda looks a bit like an ecp5 idcode but shifted or a bit corrupted or something
<tnt> does the fpga need to be held in reset ? Can't remember ...
<pepijndevos[m]> yea, it reports that it's a latice device half of the time, which made me think it's like a slightly wrong frequency.
<gatecat> could be something like a bad clock signal causing double clocking
<gatecat> you could try like a 100r series resistor on tck, close to the ftdi
<gatecat> I think I've also seen like 1k pulldown on tck used to try and prevent this
<pepijndevos[m]> time to move it to the lab for some close inspection I guess
<pepijndevos[m]> hmmmm TDO looks wonky when it's connected to the JTAG
<pepijndevos[m]> There also shouldn't be any confusion over TDI/TDO like RX/TX right?
<tnt> Depends how your jtag adapter is labelled ...
<tnt> pin 18 should be connected to the FPGA TDO.
<pepijndevos[m]> are any of these pins supposed to bidirectional? because there is some output on TDO when disconnected
<tnt> no
<tnt> Aren't you wired backward ?
<pepijndevos[m]> > Note that the pinout below only works for V6.1 and V7.0 boards. V8.0 board has a different pinout, check the corresponding board page.
<pepijndevos[m]> if I'm getting output on the TDO pin of the FTDI thing, that seems extremely wrong??
<tnt> well tbh, at the beginning it's not surprising because during init/config the ftdi tends to go random stuff since it's not _only_ a jtag chip ...
<tnt> and the fpga only drives TDO actively in some states of the jtag FSM ans is HiZ at other times.
<tnt> although during the whole shifting it should be active (and TMS=0 means it should stay in that state).
<tnt> I only ever used glasgow with those boards and it has jtag pinout autodetect ...
<pepijndevos[m]> well what makes me say that is the little blips you get when you hook up the SDO make it look like it's not an high impedence input
<pepijndevos[m]> wait, I have a glsgow
<key2> have you connected the VCC to your cable ?
<key2> I've seen this kind of behavior when the FTDI's VCCIO pin is fed from the VCC of the target board
<pepijndevos[m]> no only ground, I'm powering it externally now
<pepijndevos[m]> or do I need to connect the 3.3v together?
<pepijndevos[m]> ok how do i use glasgow to do jtag
<key2> I don't know your cable. but I know that if the vccio of the FTDI is not powered, it will not output on the other pins what you want
<pepijndevos[m]> ive managed to use glasgow as tnt suggested
zjason` is now known as zjason
<pepijndevos[m]> hurraaay!! I'm now connected to etherbone with wishbone tool
<pepijndevos[m]> is there a --kernel equivalent to wishbone-tool?
<pepijndevos[m]> do I pass load-name and load-address?
<pepijndevos[m]> no luck so far
<pepijndevos[m]> so wishbone-tool doesn't have a --kernel option and load-name doesn't seem to do anything... and litex_term doesn't seem to have any way to connect to a remote bus
<pepijndevos[m]> wat... so I can tell wishbone-tool to host a wishbone server, and then I can pass "crossover" to litex_term which... seems to make it really slow. And still not load the kernel :(((
<_florent_> pepijndevos[m]: what are you trying to do? If you want to load a binary over etherbone:
<_florent_> litex_server --udp
<_florent_> litex_term crossover --kernel=firmware.bin --safe
<_florent_> with a crossover uart
<pepijndevos[m]> heyyyyy!!! that did the trick
<pepijndevos[m]> lol this board doesn't seem to have a reset button configured.
<_florent_> but since you are using Etherbone, you could set with_rst to Trye
<_florent_> True
<pepijndevos[m]> ah yea
<pepijndevos[m]> another future problem is how to program the stuff to flash. I'm now using glasgow with the svd file that loads the bios into ram. I have no idea how I'd get the bios and eventually also the kernel into flash.
<_florent_> you can look at icebreaker/fomu targets for BIOS XiP from Flash
<_florent_> regarding Flash programmation, pretty sure OpenFPGALoader supports it (otherwise probably ecpprog: https://github.com/gregdavill/ecpprog)
<pepijndevos[m]> yea problem is my usb JTAG thingy seems broken so I'm using glasgow and that seems to have its own whole thing
FabM has quit [Quit: Leaving]
<pepijndevos[m]> <_florent_> "you can look at icebreaker/..." <- hmmm by the sounds of it maybe I'm asking the wrong question. All I want to do is... you know, run standalone. I suspect running from SDRAM is a lot faster and the ice40 only run from flash because limited BRAM. So actually maybe what I want is to load the kernel into SDRAM at startup? But it still has to be stored somewhere...
<_florent_> pepijndevos[m]: ok, for this, it you still want to use the BIOS and make it jump to your firmware in Flash, you can just add a ROM_BOOT_ADDRESS constant to your SoC pointing to the based address of the firmware in Flash.
<pepijndevos[m]> Basically, I don't know what I want. What does a typical deployment scenario look like on a board with plenty of space?
<pepijndevos[m]> <_florent_> "https://github.com/litex-hub/..."; <- actually I'm not sure I completely understand where the divide happens here. There is only one PHY, one MAC, and the MAC gets memory mapped *and* is used by the hardware IP stack?
genpaku has quit [Ping timeout: 276 seconds]
genpaku has joined #litex
xenador77 has joined #litex
<_florent_> pepijndevos[m]: For standalone operation you can have Bitstream in flash + BIOS + firmware (with ROM_BOOT_ADDRESS specified in the SoC definition)
<_florent_> pepijndevos[m]: This will load the bistream, execute the BIOS and jump to your firmware
<_florent_> pepijndevos[m]: for the Hybrid MAC, things are happening here: https://github.com/enjoy-digital/liteeth/blob/master/liteeth/mac/__init__.py#L82-L167
<pepijndevos[m]> Ah I see
absurdfatalism has joined #litex
<tpw_rules> (hi)
<absurdfatalism> Hello folks I wanted to ask about video/vga timings from this core
<absurdfatalism> IIUC, under += sync, as in inferring a FF
<absurdfatalism> There is this expression
<absurdfatalism> If(hcounter == 0, hactive.eq(1)),
<absurdfatalism> Which IIUC means active is HIGH a cycle delayed from hcounter==0
<absurdfatalism> I come here wanting to confirm that since in testing a 640x480 design
<absurdfatalism> I see active=1 when x=1,2,..640
<absurdfatalism> As opposed to what I would have expected
<absurdfatalism> active=1 for x=0...639
<absurdfatalism> A off by one cycle kind of thing?
<absurdfatalism> (I was looking to detect start of from x==0 y==0 and active==1 but was never seeing it!)