Friday, 2020-03-27

*** tpb has joined #litex00:00
sajattack[m]pdp7: maybe something is wrong with your formatting?00:02
sajattack[m]I used gparted, it provides sensible defaults for fat1600:03
sajattack[m]also make sure to properly eject the card00:03
pdp7looks like i missing rootfs.cpio on this new card :)00:10
pdp7darn same results, nothing after liftoff00:25
pdp7https://github.com/litex-hub/linux-on-litex-vexriscv/issues/123#issuecomment-60475317500:25
tpbTitle: Test SDCard boot with OrangeCrab · Issue #123 · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)00:25
*** CarlFK has joined #litex00:46
*** Degi has quit IRC02:03
*** Degi has joined #litex02:04
sajattack[m]any gotcha's with the fsm module? I don't see the fsm I made showing up in my design02:10
sajattack[m]is it because I named it self.fsm instead of self.submodules.fsm?02:12
sajattack[m]I think that was it02:13
sajattack[m]now quartus fails to compile my design completely because it says I have multiple constant drivers02:14
sajattack[m]I thought if there were multiple drivers it took the one furthest down the file02:14
sajattack[m]oh is it because some of them are sync and some of them are comb?02:16
*** gregdavill has quit IRC02:49
*** gregdavill has joined #litex02:49
*** gregdavill has quit IRC02:53
*** gregdavill has joined #litex02:53
sajattack[m]inside a state machine, what is the difference between `NextValue(foo, 1)` and `foo.eq(1)`?03:18
gregdavillThe FSM module is a bit tricky before you know how it works.04:41
gregdavillEverything inside `fsm.act` is combinational logic.04:41
sajattack[m]yep04:42
gregdavill`NextValue()` and `NextState()` are special and operate in synchronously04:43
gregdavill*operate synchronously04:43
sajattack[m]ok04:43
gregdavillSo in migen terms `foo.eq(1)` is a comb statement, `NextValue(foo, 1)` is a sync statement.04:44
sajattack[m]yeah ok I think I should be using eq04:44
gregdavillA trap I've fallen into is that `foo.eq(foo + 1)` will not work, because it creates a combinational loop.04:45
sajattack[m]thanks04:45
sajattack[m]mhm04:45
sajattack[m]with tristates, am I correct that i is the input sensed value, o is the value to output, and oe is whether the pin is o or i?04:52
sajattack[m]or rather a gate between o and i04:53
*** CarlFK has quit IRC05:06
*** CarlFK has joined #litex06:24
_florent_sajattack[m]: yes that's correct for the Tristate, set oe to 1 to use it as output06:35
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/gpio.py#L3506:35
tpbTitle: litex/gpio.py at master · enjoy-digital/litex · GitHub (at github.com)06:35
keesjgregdavill: on your example foo.eq(foo +1) I think it should normaly work (at least it doen in VHDL) but the thing to remember is that in such case there are twoo foo's , the input foo and the output foo and that the output foo will not be updated until en the of the statment e.g. doing 10 times foo.eq(foo +1) would in the end result in foo.eq(foo +1)06:45
keesjthat is at least how I understand it06:45
keesjgregdavill: also .. did you ever look at my orange crab drc ? https://github.com/keesj/orange_crab_drc06:46
tpbTitle: GitHub - keesj/orange_crab_drc: Script to perform some drc tests on the orange crab fpga board (at github.com)06:46
gregdavillin migen if I type self.comb += foo.eq(foo + 1). It locks-up the simulator, rightly so. The isn't a way you can create a loop like that in combinational logic.06:48
gregdavillkeesj: I did! I'm already using this script, which covers all my needs: https://github.com/gregdavill/OrangeCrab/blob/master/lib/kicad-length-matching-checks/length_match.py06:50
tpbTitle: OrangeCrab/length_match.py at master · gregdavill/OrangeCrab · GitHub (at github.com)06:50
keesjthanks . I will have a look at your script06:52
gregdavillThe one I'm using pulls net groups out of the KiCad project itself, so it's very easy to configure. But it runs in a separate terminal window, and it's not an Action Plugin.06:53
keesjthe default lenght matching was taking the full trace lenght including the terminaor resistors06:53
gregdavillYep, there are changes I made so it's now only checking distance of traces between two ICs.06:54
keesjI borrowed the litex syntax. https://github.com/keesj/orange_crab_drc/blob/master/orange_crab_drc_action.py#L1806:55
tpbTitle: orange_crab_drc/orange_crab_drc_action.py at master · keesj/orange_crab_drc · GitHub (at github.com)06:55
keesjI was/am working on a ddr interposer06:56
keesjanyway.. I will have a good look at your script06:59
gregdavillThe pad2pad_track_distance code is pretty cool, looks a bit better than mine performance wise.07:01
gregdavillI ended up coding a messy tree structure based on track segments corresponding to a net, I then do a recursive search on this tree until I find a segment that connects to the target chip.07:03
keesjStill.. quite slow. but .. in my search for a ddr3 layout.. I only found olimex and you doing stuff07:03
keesj(in kicad)07:03
keesjthat is not my code https://github.com/MitjaNemec/Kicad_action_plugins/tree/master/pad2pad_track_distance07:05
tpbTitle: Kicad_action_plugins/pad2pad_track_distance at master · MitjaNemec/Kicad_action_plugins · GitHub (at github.com)07:05
keesjI was also thinking it might be cool to try and push things further e.g. from the migen/litex code generate a netlist07:07
dkozelpdp7: Hope you enjoyed it08:37
dkozelI got a bit enthusiastic and don't think I matched the explanation to the audience.08:42
*** scanakci has quit IRC08:51
_florent_dkozel: hi, about litepcie, you should see something in dmesg when loading the kernel module, that's strange.09:25
dkozelHi _florent_09:30
dkozelI'm just settling down to try things again09:30
dkozelDo you have any ideas why I had to add to kernel header includes to the main.c?09:30
_florent_not sure, i'm going to prepare a repository with all the files, this way i will also do some checks.09:34
dkozelOther than the kernel module is there anything I do to check that the gateware is appropriately loaded and running09:39
dkozelPCI device id is different for my FPGA09:47
dkozel10ee:702409:47
dkozelMuch better09:49
dkozel[ 4564.845337] BUG: unable to handle page fault for address: ffffa3ac403fc00009:49
dkozel[ 4564.845340] #PF: supervisor read access in kernel mode09:49
dkozel[ 4564.845341] #PF: error_code(0x0000) - not-present page09:49
dkozelhttps://pastebin.com/xKqZNb7h09:52
tpbTitle: [ 4564.845200] litepcie [Probing device] [ 4564.845215] litepcie 0000:03:00.0: - Pastebin.com (at pastebin.com)09:52
_florent_dkozel: i just created https://github.com/enjoy-digital/litepcie_aller_test09:55
tpbTitle: GitHub - enjoy-digital/litepcie_aller_test: Test with LitePCIe and Numato Aller board. (at github.com)09:55
dkozelThanks will switch to that09:57
_florent_With the current LiteX design, the device should be 10eee:7021, so i think the Numato bitstream is still loaded09:57
dkozelOk, Vivado does think it programmed the FPGA09:58
dkozelHmm, can we get a mask file from LiteX/Migen to use Vivado to verify the loaded bitstream?09:59
dkozelyes, found the migen opts10:02
dkozelMy build environment for the kernel module is clearly different from yours, paths don't match10:13
_florent_since you are probably just loading the bistream, you can only do a reset of the host computer, not a power on/power off otherwise the FPGA will reload the bitstream from SPI Flash10:13
_florent_dkozel: which paths for example?10:14
dkozelah, and the host isn't reenumerating the PCIe device with the new bitstream10:14
dkozelhome/dkozel/src/litepcie_aller_test/software/kernel/csr.h:12:10: fatal error: hw/common.h: No such file or directory10:14
dkozel   12 | #include <hw/common.h>10:14
dkozeland the soc, mem, csr.h files needing to be in kernel/generated/ or the kernel/ directories10:15
_florent_the bistream i prepared should already put the header at the right location: https://github.com/enjoy-digital/litepcie_aller_test/blob/master/aller.py#L15210:19
tpbTitle: litepcie_aller_test/aller.py at master · enjoy-digital/litepcie_aller_test · GitHub (at github.com)10:19
_florent_also, here we have different header files for the CPU running in the FPGA and for the Host that will interfact with the FPGA over PCIe10:20
_florent_the headers in generated directlry are for the CPU10:20
dkozelOk. I'm going to clean all directories, restart (kernel mod cannot be removed because it's in use) and rebuild. Back in 10 minutes10:25
_florent_ok10:26
dkozelBitstream is building into the directory ./soc_pciesoc_aller/10:47
dkozelso the generated files don't get written into the ./software directory10:47
dkozelI can easily copy over files, is that correct?10:48
_florent_with the aller.py target i provided, the header that are used by the kernel should automatically be generated to software/kernel10:59
_florent_https://github.com/enjoy-digital/litepcie_aller_test/blob/master/aller.py#L152-L15811:00
tpbTitle: litepcie_aller_test/aller.py at master · enjoy-digital/litepcie_aller_test · GitHub (at github.com)11:00
dkozelAh. Just noticed that it does generate them twice, cool11:01
dkozelthe two kernel headers are still missing from main.c11:01
dkozelI am on 5.6.0rc6 so maybe things have moved?11:02
dkozelAnd the kernel module is loaded and detects the board!11:20
dkozelAnd the user program works11:21
dkozel3.20 Gbps DMA works11:22
_florent_nice!11:27
dkozelThanks!11:29
_florent_so now if you want to generate a dumy stream on the DMA RX receive it on the computer, you can add this to the gateware: https://github.com/enjoy-digital/netv2/blob/master/netv2.py#L203-L20911:29
tpbTitle: netv2/netv2.py at master · enjoy-digital/netv2 · GitHub (at github.com)11:29
_florent_and then do litepcie_test record dump.bin 0x1000 for example11:30
dkozelOk, that's useful11:30
dkozelis there a CPU on the current bitstream? I think the default SoC does include one? I didn't pay attention to the build log11:31
*** _whitelogger has quit IRC11:36
_florent_dkozel: yes you should have a CPU and DDR3 controller, you can verify it's working correctly by doing litepcie_util uart_test11:38
_florent_you should see the LiteX bios and DDR3 initialization11:38
*** _whitelogger has joined #litex11:38
dkozelSplended, works11:39
dkozelI really like this ecosystem. Lots to learn!11:39
dkozelMemspeed Writes: 253Mbps Reads: 320Mbps11:40
*** rohitksingh has quit IRC11:42
_florent_cool, that's the speed tested from the CPU, the actual speed with DMAs is a lot higher (probably around 10Gbps on Aller with a 100MHz sys_clk)11:44
dkozelthe netv has Gen2 x4 for it's PCI interface right?11:46
dkozelhttps://github.com/enjoy-digital/netv2/blob/master/netv2.py#L16011:46
tpbTitle: netv2/netv2.py at master · enjoy-digital/netv2 · GitHub (at github.com)11:46
dkozelOr not11:46
_florent_ i could do the change to use PCIe Gen2 X4 on the Aller, but first wanted to validate with PCIe Gen2 X111:57
dkozelAbsolutely makes sense12:01
dkozelI'm reading through the various wishbone-tool and other utility documentation now and trying things12:02
_florent_with https://github.com/litex-hub/litex-boards/commit/89dd00d3a233cd6fc56cbe7fa4760e7d84c9c43212:09
tpbTitle: platforms/aller: rename pcie to pcie_x4 (for consistency with others … · litex-hub/litex-boards@89dd00d · GitHub (at github.com)12:09
_florent_and https://github.com/enjoy-digital/litepcie_aller_test/commit/993e05ef32a65c064e953ac169668a342c5f9fb612:09
tpbTitle: target/software: add pcie_x4 support and use it as default. · enjoy-digital/litepcie_aller_test@993e05e · GitHub (at github.com)12:09
_florent_you should now have PCIe gen2 X4 :)12:10
*** gregdavill has quit IRC12:14
dkozellol12:19
dkozeltoo easy, can't work :P12:19
dkozellitex.build.generic_platform.ConstraintError: Resource not found: pcie_x4:None12:20
dkozelah12:21
dkozelwalk before running. aka update both repos12:21
dkozelBitstream built but I need to finish a few things before rebooting the host :D12:35
dkozelThanks, will jump back in this evening on this12:35
*** tcal has quit IRC13:26
*** CarlFK has quit IRC14:37
*** CarlFK has joined #litex15:00
*** tcal has joined #litex15:01
*** _franck_9 has joined #litex15:08
*** _franck_ has quit IRC15:11
*** _franck_9 is now known as _franck_16:04
pdp7anyone successfully used an SD card with LiteX?  If so, what brand and model?  I16:37
dkozelHmm. Not sure how I loaded that one image successfully earlier.16:42
dkozel_florent_: How do you reboot/reset your computer without powering down the PCIe bus? I seem to be losing the image with `telinit 6`16:43
somlopdp7: hit-and-miss with LiteSDCard, pretty solid with SPI-mode SDCard -- 32 and 64 GB sandisk models17:12
pdp7ah, so maybe I should be going to bigger cards like 32GB.  I was thinking the opposite, trying to find smaller, older cards17:13
somlopdp7: I specifically got a 2GB card to test with LiteSDCard, and it didn't work :) The 64GB sandisk worked, the 32GB one did not17:14
somlothey all work solidly with SPI-mode "spisdcard", been using the 32GB ones for the last week or so17:14
somlohowever -- I made a dos partition table, and added a 1GB fat16 partition table (with fdisk)17:15
somlospi-mode sdcard boot only works with fat1617:15
somloso most of the card is unused, and 1GB is "plenty space for everyone" :D17:16
somlodisclaimer: I'm using litex with 64bit Rocket, so I'm only exercising this branch of spisdcardboot(): https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/boot.c#L52217:18
tpbTitle: litex/boot.c at master · enjoy-digital/litex · GitHub (at github.com)17:18
pdp7somlo: does the sandisk  show that it is from a particular product line?  i could order one from amazon.17:31
pdp7somlo: oh, and what commands did you use?17:32
pdp7I used fdisk to make a 100MB partitition with FAT16 (used partition type 6)17:32
pdp7and i then did "mkfs.vfat"17:32
somlopdp7: https://imgur.com/7w6Nlc017:59
tpbTitle: Imgur: The magic of the Internet (at imgur.com)17:59
pdp7Thanks18:07
somlopdp7: also, https://pastebin.com/rWi6SpgU18:07
tpbTitle: # fdisk /dev/sdb Welcome to fdisk (util-linux 2.33.2). Changes will remain i - Pastebin.com (at pastebin.com)18:07
pdp7somlo: thanks18:28
pdp7somlo: the photo was of 32GB, but you said the 64GB worked?18:28
somloyeah, I'm looking for the amazon link of the 64 I ordered three weeks ago, stand by...18:30
somlopdp7: it was from officedepot: https://www.officedepot.com/a/products/9950594/SanDisk-Ultra-PLUS-microSD-Card-64GB/18:34
pdp7thanks18:34
*** HoloIRCUser has joined #litex18:50
*** HoloIRCUser1 has quit IRC18:52
*** rohitksingh has joined #litex19:21
*** CarlFK has quit IRC19:32
*** HoloIRCUser1 has joined #litex21:02
*** HoloIRCUser has quit IRC21:02
*** CarlFK has joined #litex21:28
*** HoloIRCUser has joined #litex21:41
*** HoloIRCUser1 has quit IRC21:44
*** HoloIRCUser has quit IRC21:48
*** gregdavill has joined #litex23:27
*** FFY00 has joined #litex23:57
mithroFFY00: Humans are bad at remembering and doing things reliably -- machines are great at that23:58
FFY00sure23:58
FFY00but unless you have machines writing your tests to make sure they cover every base, you shouldn't have automated releases on test passes23:59

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!