Friday, 2023-08-11

*** jn <jn!~quassel@user/jn/x-3390946> has quit IRC01:19
*** jn <jn!> has joined #libre-soc01:20
*** jn <jn!> has quit IRC01:20
*** jn <jn!~quassel@user/jn/x-3390946> has joined #libre-soc01:20
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC02:53
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC09:05
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc09:05
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC09:19
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc09:19
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC09:26
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc09:26
*** octavius <octavius!> has joined #libre-soc09:55
octaviuscesar, have you pushed changes the changes to add the Nexys Video fpga?10:30
openpowerbot[irc] <cesar[m]1> Not yet, I'll do it this weekend, I hope.10:34
openpowerbot[irc] <cesar[m]1> octavius: Do you have a Nexys Video Board?10:40
octaviusI don't, but markos_ does10:41
openpowerbot[irc] <cesar[m]1> Ok, I'll ping you and markos_ when I'm ready to try a Blinky.10:59
markos_we're building the environment now :)10:59
openpowerbot[irc] <cesar[m]1> I'll push what I have. One moment.11:02
openpowerbot[irc] <cesar[m]1> OK, try this:11:33
openpowerbot[irc] <cesar[m]1> markos_ and octavius:11:33
openpowerbot[irc] <cesar[m]1> git remote add cesar
openpowerbot[irc] <cesar[m]1> git fetch cesar11:34
openpowerbot[irc] <cesar[m]1> git checkout add-nexys-video-support11:34
openpowerbot[irc] <cesar[m]1> (cd into nmigen-boards first)11:35
markos_I was building the hello_world.bin for arty_a7, do I need to change this for nexys_video?11:37
markos_ie, python3 src/ arty_a7 hello_world.bin11:37
markos_or do I need to rebuild anything?11:38
openpowerbot[irc] <cesar[m]1> First, try Blinky.11:38
openpowerbot[irc] <cesar[m]1> python3 nmigen_boards/nexys_video.py11:39
markos_Using Libftdi,11:41
markos_No JTAG Chain found11:41
markos_nexys video is connected, I can see ttyUSB0/ttyUSB111:41
markos_connected through PROG usb port11:41
markos_do I need to set any particular jumpers?11:41
openpowerbot[irc] <cesar[m]1> Possibly, or maybe some configuration needed on xc3sprog.11:49
openpowerbot[irc] <cesar[m]1> Will look into it this evening. Going off to work. Maybe lkcl and octavius can figure it out, in the meantime.11:50
openpowerbot[irc] <cesar[m]1> Good luck!11:53
openpowerbot[irc] <cesar[m]1> Sorry I couldn't stay longer.11:55
openpowerbot[irc] <cesar[m]1> Always exciting to bring up a new board.11:57
octaviusThanks for your help cesar, we're continuing to debug12:01
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC12:21
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc12:22
markos_the BUSY led is blinking slowly meaning it's waiting for "configuration medium to be plugged in", and apparently connecting to the PROG usb port means it can be programmed at any time12:44
markos_ie no special jumper settings12:44
markos_however I cannot get it detected by xc3sprog12:44
markos_I may try other methods, usb stick or sdcard to upload the .bit file12:45
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC13:27
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc13:28
openpowerbot[irc] <programmerjake> you could try getting a newer version of xc3sprog...14:35
markos_tried latest debian, same result14:53
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC15:14
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc15:15
openpowerbot[irc] <programmerjake> hmm...maybe someone's tried this before and wrote nice docs on how to get it to work?15:17
openpowerbot[irc] <sadoon[m]1> Ahh been a little busy, my truck is not starting so I was diagnosing exactly why so I don't get ripped off, apparently fuel pump15:26
openpowerbot[irc] <sadoon[m]1> All the packages that were failing to build also fail to build with -msoft-float , it's because the actual system was built for 128-bit long doubles and it uses these libraries during the build process15:27
openpowerbot[irc] <sadoon[m]1> When you pass soft-float, it complains that things like /usr/bin/ld: /lib/powerpc64le-linux-gnu/ uses hard float, libcommon.a(libcommon_a-gettime.o) uses soft float15:28
openpowerbot[irc] <sadoon[m]1> Weird how gentoo had no issues but I could only assume it was because gentoo builds things in the correct order and installs them before moving to the next in the dependency cycle15:29
openpowerbot[irc] <programmerjake> why i recommended using ibm 128-bit floats for long double, since sw used to use that, unlike 64-bit long double15:29
openpowerbot[irc] <programmerjake> since ibm 128-bit floats *are* always softfloats15:29
openpowerbot[irc] <sadoon[m]1> but that's not the default for POWER right?15:30
openpowerbot[irc] <sadoon[m]1> it uses IEEE15:30
openpowerbot[irc] <programmerjake> it's the default for powerpc64 BE15:30
openpowerbot[irc] <sadoon[m]1> Ah15:30
openpowerbot[irc] <programmerjake> and powerpc15:30
openpowerbot[irc] <sadoon[m]1> It's worth a shot so nothing complains anymore yeah?15:30
openpowerbot[irc] <sadoon[m]1> But we'd be deviating from the standard15:30
openpowerbot[irc] <programmerjake> yes, but 64-bit long double is an even bigger deviation15:31
openpowerbot[irc] <sadoon[m]1> Or one other option is15:31
openpowerbot[irc] <sadoon[m]1> To build without hard float at all15:31
openpowerbot[irc] <sadoon[m]1> In which case it'll probably just go fine but be slow15:31
openpowerbot[irc] <sadoon[m]1> And given that libre-soc has no FP yet, sounds alright?15:32
openpowerbot[irc] <programmerjake> seems much less likely to work cuz I bet there's a bunch of asm that assumes fp is available15:32
lkclmarkos_, you need to use udev rules to grant permission.15:32
lkclthis is "normal"15:32
lkclthere are a number of examples online and also in the wiki and in the devscripts.15:32
openpowerbot[irc] <sadoon[m]1> programmerjake: I'll try it in a different chroot15:32
openpowerbot[irc] <programmerjake> libre-soc has no fp now but will soon15:32
openpowerbot[irc] <sadoon[m]1> Actually now that I think of it15:33
markos_I do have permission, I call this as root15:33
openpowerbot[irc] <sadoon[m]1> This error is on gpg15:33
openpowerbot[irc] <sadoon[m]1> because libc has hard float15:33
openpowerbot[irc] <sadoon[m]1> If I fix whatever is causing libc to fail15:33
markos_this is not a permissions problem15:33
lkclmarkos: hmmmm15:33
openpowerbot[irc] <programmerjake> so imo if it runs on microwatt that's good enough for now, luke can verify if that's ok15:33
markos_I tried calling from inside the libresoc chroot and on the host15:33
markos_xc3sprog on the host is the newest debian and it still fails to detect anything on the jtag chain15:34
lkclmarkos_, use commit 99e7de20aa8323712e5f70ff74d2079d5fb45bc715:34
lkclyes that will fail15:34
openpowerbot[irc] <programmerjake> did you try sudo?15:34
lkclyou absolutely must use the git version.15:34
lkclit is in the devscripts15:34
lkclplease please for goodness sake *look in the devscripts for tools*.15:34
lkcli have been through this already and done the actual work15:34
lkclit works15:35
lkclbut if you do not use the devscripts you are *guaranteed* to run into exactly the same problems that i had to solve15:35
markos_you're not listening15:35
markos_I am root15:35
openpowerbot[irc] <sadoon[m]1> Ah ha, libc fails because /tmp/tmpkcii1i4w/test.c:1:10: fatal error: ndbm.h: No such file or directory15:35
lkclit doesn't matter that you are root15:35
lkclit's that the version *in debian* does not have the correct recognition of the USB IDs15:35
openpowerbot[irc] <sadoon[m]1> This is very stupid of me15:35
markos_since when15:35
markos_in any case, both versions behave the same15:36
lkclare you using  commit 99e7de20aa8323712e5f70ff74d2079d5fb45bc7 or close to it?15:36
markos_I am on HEAD, so 99e7de20aa8323712e5f70ff74d2079d5fb45bc715:37
lkcland... ahh... hang on... is this an xc200t or an xc100t?15:37
lkclbecause they will have *different* JTAG IDs15:37
lkclwhich will be *unrecognised* by the tools - all tools - unless someone has done the work to get them to be recognised15:37
lkclnotice this commit15:38
lkclcommit 8b6c78d7bb30bb0eeae26eb93d80f8241acd7e2715:38
lkclAuthor: Sergey Kostanbaev <>15:38
lkclDate:   Sun Dec 30 17:28:15 2018 +030015:38
lkcl    Add support for XC7A50T15:38
markos_well, devlist.txt shows 03636093      6    0x09 XC7A200T15:38
lkclthat will give you an idea of what went into adding an FPGA15:38
lkclgive me a minute to get mine out the cupboard15:38
markos_03631093      6    0x09 XA7A100T15:38
openpowerbot[irc] <programmerjake> is the one recommended by the dev scripts15:38
openpowerbot[irc] <programmerjake> s/scripts/docs/15:39
lkclsorry i thought you were using the Arty A7 100t15:39
lkclwhich "just works"15:40
markos_it's the digilent nexys video which apparently not many people are working on despite it having 200k LUTs, I found very little stuff online15:40
markos_apart from the proprietary stuff from digilent that is15:40
openpowerbot[irc] <programmerjake> maybe you just need to add the usb id to xc3sprog and recompile and it'll work?15:42
markos_it is already there in the debian version15:43
markos_and it still doesn't detect15:43
openpowerbot[irc] <programmerjake> maybe add the fpga's id instead?15:44
lkcl03636093      6 0x0009 XC7A200T15:44
lkclxc3sprog -D15:44
lkcl---> devlist.txt15:44
lkcl---> cablelist.txt15:44
markos_already done that15:44
markos_they're already there15:44
markos_that's what I've been saying15:45
markos_support is presumably there, but it's not15:45
lkclwhat commands are you running?15:45
markos_xc3sprog -c {nexys4,ftdi,ft232h,xpc} -j, and then tried -L but same result in all15:46
lkclxc3sprog -v -j -c nexys415:46
lkclUsing devlist.txt15:46
lkclUsing cablelist.txt15:46
lkclCable nexys4 type ftdi VID 0x0403 PID 0x6010 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 6015:46
lkclUsing Libftdi, Using JTAG frequency   6.000 MHz from undivided clock15:46
lkclNo JTAG Chain found15:46
lkclUSB transactions: Write 5 read 2 retries 015:46
markos_Cable nexys4 type ftdi VID 0x0403 PID 0x6010 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 6015:46
lkclyep one sec let me get the arty a715:47
markos_moment, brb15:47
openpowerbot[irc] <programmerjake> maybe set the jtag frequency to 400khz, 6mhz seems high15:49
lkclCable nexys4 type ftdi VID 0x0403 PID 0x6010 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 6015:51
lkclUsing Libftdi, Using JTAG frequency   6.000 MHz from undivided clock15:51
lkclJTAG chainpos: 0 Device IDCODE = 0x13631093     Desc: XA7A100T15:51
lkclJTAG loc.:   0  IDCODE: 0x13631093  Desc:                       XA7A100T Rev: A  IR length:  615:51
lkclUSB transactions: Write 6 read 3 retries 015:51
openpowerbot[irc] <programmerjake> so, to set to 400khz use -J40000015:54
lkclmarkos_, try adapting this instead;15:54
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC15:54
lkclthe arty a7-100t is detected perfectly15:54
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc15:56
markos_I tried setting it down to 100kHz even, same result16:03
markos_I'm guessing there is probably something else on the board that needs to be configured for flashing via usb16:04
lkclyou'll need to drop down to OpenOCD or enable raw JTAG logging to see what is going on16:05
lkclthe fact that there are 5 commands sent and 2 responses is a good sign16:05
lkclnotice how on the Arty A7-100t there are "write 6 read 3"16:05
openpowerbot[irc] <programmerjake> are you programming the fpga directly or trying to program the flash chip attached to the fpga?16:05
lkclreplacing the FTDI firmware would be an extremely bad idea, don't even consider it16:06
lkclif you screw it up the only recovery is the pin-header on the PCB connected directly to the *FTDI's* own JTAG port16:06
openpowerbot[irc] <programmerjake> back when I wrote my rv32i core i couldn't get programming the flash chip to work, but could program the fpga16:06
markos_I'm connected to the PROG usb port, which is supposedly exactly for this purpose16:07
markos_according to the documentation at least16:07
lkclmarkos_, what jacob is talking about is *reprogramming the FTDI USB-UART's firmware*16:07
openpowerbot[irc] <programmerjake> uuh, *NO*16:08
lkclnot: *USING* the FTDI USB-UART's firmware to perform the task of programming the FPGA16:08
openpowerbot[irc] <programmerjake> i'm saying program the fpga's configuration ram, not the flash chip attached to the fpga16:09
lkclahhh.... yeah.16:09
lkclthere's *another* command for that.16:09
lkclit's installed by the devscripts16:09
lkcli can't remember what it is called, but it works 100% successfully and is in the ls2 documentation16:10
lkclit's used to upload data directly into the QSPI attached to the Digilent Arty A7-100t16:10
lkclwhich... you'll need to look at the nexys-video schematics to know if that's the same and/or even possible16:11
markos_nevermind, I'll investigate16:12
lkcli must apologise here, markos_ - i was planning to have the time and energy to do this work of getting the nexys-video up and running long before you got to it16:12
markos_no worries16:13
lkclbut try using the openocd command i sent in the link above16:13
markos_it's an opportunity for me, always wanted to play with fpgas16:13
lkcl(adapted for XC7200T instead of XC750T)16:13
openpowerbot[irc] <programmerjake> according to
openpowerbot[irc] <programmerjake> you need the fpga bitstream that forwards spi messages to the fpga-attached flash to program that, so don't use the -I option since it may not have that bitstream16:14
lkclnggggh yes programmerjake that sounds about right.16:14
lkcland i believe it's part of that.... whatever-it-was-i-used, for arty-a7-100t, back at the time16:15
lkcli can't rembember *any* of this stuff16:15
markos_I'm not using the -I option, just -j to detect the chain16:16
lkclopenocd -f digilent-hs1.cfg -f xilinx-xc7.cfg -c "transport select jtag;init; pld load 0 /Users/cdepaula/projects/fusesoc/symbiflow/build/carlosedp_demo_chiselblinky_0/artya7-35t-oss-symbiflow/Toplevel.bit; exit"16:16
lkcldon't attempt to load16:17
lkcljust scan16:17
lkcland enable "verbose logging" in openocd.16:17
lkclthat will give you the JTAG IDs (etc.)16:17
lkclwhich you can then double-check in xc3sprog16:17
lkclbut *get the right version of openocd*. it's a fragmented goddamn mess16:17
openpowerbot[irc] <programmerjake> lkcl: when you get a chance, can you review comment 15-16?16:18
openpowerbot[irc] <programmerjake> thx!16:19
markos_# openocd -f /usr/share/openocd/scripts/board/digilent_nexys_video.cfg  -c "transport select jtag;init; exit"16:19
markos_Open On-Chip Debugger 0.12.016:19
markos_Licensed under GNU GPL v216:19
markos_For bug reports, read16:19
markos_Warn : Transport "jtag" was already selected16:19
markos_Info : clock speed 30000 kHz16:20
markos_Info : JTAG tap: xc7.tap tap/device found: 0x13636093 (mfg: 0x049 (Xilinx), part: 0x3636, ver: 0x1)16:20
markos_so, it can see the device at leat16:20
markos_openocd has a config file for the nexys_video thankfully16:20
markos_so apparently I have to use channel 116:21
markos_for fpga16:21
markos_as Jacob said, channel 0 is for DPTI16:21
markos_(or DSTI as it turns out)16:21
openpowerbot[irc] <programmerjake> (well, icr mentioning anything about channels...)16:23
openpowerbot[irc] <programmerjake> well, gtg, ttyl16:24
lkclmarkos_, ah! notice it says ***1***363609316:24
lkcland you can see this in xc3sprog devices.txt...16:25
lkcl03636093      6 0x0009 XC7A200T16:25
markos_I'll rebuild16:25
lkclthat's a ZERO16:25
markos_good catch16:25
lkclno you do not need to rebuild16:25
lkcljust edit devices.txt16:25
lkclget xc3sprog to dump devices.txt16:25
lkclthen run in the same directory16:25
markos_it's devlist.txt16:25
lkclat least i assume that's the way it works16:25
openpowerbot[irc] <programmerjake> that's compiled into the program, it doesn't read it at runtime unless you pass the right options16:26
lkclthese kinds of things you absolutely absolutely have to pay attention to - even just 1 bit16:26
lkclprogrammerjake: ahhh sigh16:26
lkclerrr which you can do16:26
lkclnope. not seeing an option for it16:27
lkclyep - rebuild16:27
lkclopenocd has the option to "mask"16:27
lkclso you can look for specific bitpatterns and ignore others16:27
lkcllooks like xc3sprog can't do that16:28
openpowerbot[irc] <programmerjake> oh, looks like i'm wrong:
openpowerbot[irc] <programmerjake> though there is a compiled-in version16:29
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC16:51
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc16:52
openpowerbot[irc] <sadoon[m]1> Just verified the libc issue is *not* specific to sffs, it fails to build normally as well16:59
openpowerbot[irc] <sadoon[m]1> Seems to be a missing dependency or something16:59
markos_dev.idcode = idcode & 0x0fffffff;17:04
markos_I changed the idcode for the xc7a200t and it would still appear as 03636093 instead of 0x1363609317:05
markos_it's doing that everywhere, I wonder what is the reason behind it17:06
markos_still nothing :(17:11
markos_changed that to 0x1fffffff and now the id is correct in devlist dump, but still it doesn't get detected17:12
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC17:20
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc17:20
markos_ok, so I tried flashing from usb, the BUSY led is flashing rapidly which according to the docs indicates that the usb stick is not detected/formatted properly (it's vfat) or the bitstream is not compatible with the fpga (I copied the top.bit file)17:23
markos_I need to investigate more about this17:24
markos_ffs xc3sprog, here's python3-ftdi:17:36
markos_# i2cscan.py17:36
markos_Available interfaces:17:36
markos_  ftdi://ftdi:2232:210276B3E32B/1   (Digilent USB Device)17:36
markos_  ftdi://ftdi:2232:210276B3E32B/2   (Digilent USB Device)17:36
markos_so I'm pretty certain now that it's not the device's fault, but x3csprog's17:39
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc20:02
gnucodelkcl: I was looking through the libre-SOC dev mailing list, and I saw your pdf RFC document for some new Power extensions...  You are a really effective communicator!20:03
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC20:21
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc20:22
*** octavius <octavius!> has quit IRC20:59
openpowerbot[irc] <programmerjake> so, lkcl, can i start working on the FPSCR classes since we agree everything but splitting FPSCR into 3 parts is out of scope?21:06
openpowerbot[irc] <programmerjake> in particular speculative execution & stuff is out of scope21:15
*** Gooberpatrol66 <Gooberpatrol66!~Gooberpat@user/gooberpatrol66> has quit IRC23:27

Generated by 2.17.1 by Marius Gedminas - find it at!