Friday, 2021-03-19

*** tpb has joined #litex00:00
*** lf has quit IRC00:44
*** lf has joined #litex00:44
*** rozpruwacz has quit IRC00:48
*** hansfbaier has joined #litex01:14
*** hansfbaier has quit IRC01:15
*** hansfbaier has joined #litex01:15
*** hansfbaier has quit IRC01:16
*** hansfbaier has joined #litex01:16
*** Degi_ has joined #litex02:42
*** Degi has quit IRC02:44
*** Degi_ is now known as Degi02:44
sajattack[m]lspci is supposed to show "Litex..." if the programming worked right?04:13
sajattack[m]Not Squirrel Research Acorn CLE-215+04:14
hansfbaiersajattack[m]: IIRC it shows something like 'Xilinx Memory Device'04:30
hansfbaiersajattack[m]: let me boot up my test PC..04:31
hansfbaiersajattack[m]: 02:00.0 Memory controller: Xilinx Corporation Device 702404:37
hansfbaiersajattack[m]: in the build dir then there are driver/kernel which contains the kernel module (which you have to insert) and driver/user there is a tool to access the kernel driver04:39
sajattack[m]Ok04:40
hansfbaiersajattack[m]: also, you might want to reboot the PC after flashin04:40
hansfbaiersajattack[m]: you can also use this script instead of rebooting: https://pastebin.com/QduqtS5C04:42
tpbTitle: #!/bin/bash# path to the xilinx device on your PC vvvvvvvvvvvvvvcd /sys/devi - Pastebin.com (at pastebin.com)04:42
hansfbaiersajattack[m]: of course all of that has to be run as root04:43
hansfbaiersajattack[m]: What JTAG do you use with the Xilinx? I only had success with FTDI FT223204:44
sajattack[m]Yeah I'm having bad luck with jlink04:47
hansfbaiersajattack[m]: This adapter is $7 (with shipping) and works like a charm: https://www.aliexpress.com/item/32817551273.html?spm=a2g0s.9042311.0.0.73c54c4dQG2rnK04:56
tpbTitle: NEW FT232H Multifunction High Speed USB to JTAG UART/ FIFO SPI/ I2C Module|uart usb|usb jtagusb uart - AliExpress (at www.aliexpress.com)04:56
sajattack[m]Yeah but shipping will take a month04:56
sajattack[m]I might see if the local electronics shop has ftdi cables04:56
hansfbaierwhich FPGA loader do you use? openocd?04:57
sajattack[m]Yes04:57
hansfbaierFT2232* also work very well04:58
hansfbaiersajattack[m]: they only have two interfaces instead of one and cost a bit more04:58
*** rozpruwacz has joined #litex05:40
*** kgugala_ has joined #litex05:48
*** kgugala has quit IRC05:50
*** hansfbaier has quit IRC05:53
*** Bertl_oO is now known as Bertl_zZ06:20
*** kgugala_ has quit IRC06:57
*** kgugala has joined #litex06:58
*** pftbest has joined #litex07:08
*** kgugala_ has joined #litex07:14
*** kgugala has quit IRC07:16
nats`hello, is there a recommended module to instantiate an i2c to drive a mdio interface ?08:48
zypmdio is not i2c08:51
*** frubbl has joined #litex08:52
zypthere's a mdio module in liteeth, but as far as I can see it just exposes the signals as register for software bitbanging: https://github.com/enjoy-digital/liteeth/blob/master/liteeth/phy/common.py#L3008:54
zypyeah, here's the software to drive it: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/libliteeth/mdio.c08:56
nats`I agree it's not but I always drived it with hardware i2c module09:01
nats`I'll take a look09:01
zypI find that hard to believe, i2c and mdio is incompatible both at the electrical and the protocol level09:03
nats`oO09:09
nats`uhhmm looking at the code I modified it "a little" :D09:14
nats`I could reuse my verilog code need to find a way to include it in the project09:17
zyphttps://m-labs.hk/migen/manual/fhdl.html#instance09:19
tpbTitle: The FHDL domain-specific language Migen 0.8.dev0 documentation (at m-labs.hk)09:19
frubblnats: https://github.com/enjoy-digital/litex/wiki/Reuse-A-Verilog-VHDL-nMigen-Core09:34
frubblnats: The nmigen example is superset of using verilog code09:35
nats`thanks I'm applying it09:44
nats`maybe a stupid question, but is there a documentation somewhere on how to choose the soc ?09:45
frubblnats: You mean the base class? Well I just looked at the code, what the features the different base classes have and picked the one that comes closest to what I need.09:57
nats`I mean using other soc like vexrisc or other (I'm a total beginner with this kind of workflow)09:59
frubblnats: You mean which processor core?10:02
frubblIf you want the smallest possible core (slow!) use serv10:04
frubblIf you want something space efficient which can run linux, use vexriscv10:04
frubblIf you want an embedded core for bare metal, choose picorv3210:05
frubblIf you want a PowerPC core, use microwatt10:05
frubblIf you want a very space efficient core which can run linux, use mor1kx (OpenRISC architecture)10:05
frubblIf you want a RISC-V core for embedded which is written in nmigen, use minerva10:06
frubblIf you want a super powerful RISCV core which runs linux choose Rocket10:07
frubblIf you are nostalgic and like obsolete FPGA vendor softcores, use lm3210:08
frubblnats: But most of the time you'd probably want vexriscv, that's why it is default10:10
nats`ah so SoCCore is a vexrisc ?10:13
nats`I'm browsing the source I'm lost sorry10:13
*** rozpruwacz1 has joined #litex10:18
frubblNo SocCore is the a base class other SoC s are built on. VexRiscV is the CPU core10:21
frubblIIRC10:21
frubblIt's quite a learning curve, that's for sure, but Python code is very well written and well worth the read10:23
frubbls/Python/the Python/10:23
frubblI learnt a ton readingĀ  _florent_'s code and I still do10:25
frubblnats` ^10:25
frubblIt's some of the best code I've ever seen10:27
nats`I'm diving in right now :)10:28
nats`uhhmm I think I found it " cpu_type                 = "vexriscv"," in soc_core.py10:30
nats`maybe it worth using an integration for an ide because it's a long dive when you use sublime text and grep :D10:32
frubblnats`, yes the cpu_type is an argument to the SoC10:39
frubblGreat you found it out!10:40
frubblway to go!10:42
nats`vscode is cool, just loading the code is enough to get the navigation through source10:43
*** RaivisR has quit IRC10:45
frubblnats` Yes it is awesome10:57
*** frubbl has quit IRC11:04
*** RaivisR has joined #litex11:42
*** kgugala_ has quit IRC12:54
*** kgugala has joined #litex12:54
*** rozpruwacz1 has quit IRC13:14
*** Bertl_zZ is now known as Bertl13:26
*** pepijndevos_ has joined #litex13:33
*** kgugala has quit IRC13:33
*** pepijndevos has quit IRC13:33
_florent_nats`: just for info, in the long term, I would like the SoCs to be only based on SoC or LiteXSoC (from soc.py) and completely remove soc_core.py and soc_sdram.py, but for retro-compatibility reasons, soc_code/soc_sdram are still there and mostly wrapping things around soc.py13:33
_florent_nats`: so the interesting parts are in soc.py13:34
_florent_Otherwise, VexRiscv is the default CPU (because probably the more polyvalent) but you can change it with --cpu-type on your target or cpu_type parameter on SoCCore13:36
acathla_florent_, shouldn't you write that somewhere, like directly in the files?13:37
_florent_acathla: That's in SoCSDRAM: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc_sdram.py#L9-L1213:38
_florent_that was also in SoCCore, but I remove it since we are still using SoCCore in the targets and was not sure it would be confusing or not13:39
acathlaok13:39
_florent_I'll add it back when all the targets will be adapted to use LiteXSoC13:39
_florent_and I'll then hide soc_core/soc_sdram somewhere in the codebase to still allow it to be used but not encourage it :)13:40
*** kgugala has joined #litex13:41
nats`_florent_, I'm making note about everything causing me trouble as a newcomer14:51
nats`maybe it can be helpful to indicate some documentation work or something like that14:51
keesjnats`: I am also using vscode and recently starting using devcontainers (docker stuff) I can now clone my repo and the docker container will build all I need (yosys from source) and then clone litex15:01
keesj(to be fair.. I also have tmux and vim and such installed and .. use the terminal a lot). for the flashing I still have some tools outside of the container but with lxserver I might be able to do additional magic15:04
keesjstuff keeps slowly changing and my personal progress is slow here.15:05
keesjthis week-end I hope to just get the default tinyfpga_bx working with the risc core. it currently is not working for me but I don't know why.15:07
*** keesj has quit IRC16:35
*** keesj has joined #litex16:48
keesjso the address where the bios is storred in the flash of the BX is a bit .. weird it at the end of the program partition while the programming tools so flashing it is not trivial unless I am missing something16:55
keesjthis is the layout https://pastebin.com/tzf1q65Y  "default" the "user image" if the bitstream , I modified the code to store the bios in the userdata and flashed that that that .. works but I wonder how this was intented to work. perhaps I am missing a step where the bios gets appended to the bitstream16:58
tpbTitle: [ { "boardmeta": { "name": "TinyFPGA BX", "fpga": "ice40lp - Pastebin.com (at pastebin.com)16:58
keesjwhere would something like this happen?16:59
keesj(I am in the bios so.. reached week-end goal)17:00
*** kgugala has quit IRC17:11
*** kgugala has joined #litex17:12
*** peeps[zen] is now known as peepsalot19:13
*** rozpruwacz has quit IRC19:37
*** rozpruwacz has joined #litex19:41
*** peepsalot has quit IRC20:06
*** peepsalot has joined #litex21:02
*** rozpruwacz1 has joined #litex21:10
*** HoloIRCUser has joined #litex21:47
*** pftbest has quit IRC21:51
*** pftbest has joined #litex21:51
*** RaivisR_ has joined #litex22:11
*** RaivisR has quit IRC22:13
*** peepsalot has quit IRC22:18
*** pftbest has quit IRC22:21
*** hansfbaier has joined #litex22:40
*** pftbest has joined #litex22:41
*** pftbest has quit IRC22:46
*** rozpruwacz1 has quit IRC22:53

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