Wednesday, 2020-09-23

*** tpb has joined #litex00:00
*** CarlFK has joined #litex00:05
*** CarlFK has quit IRC02:07
*** _whitelogger has quit IRC02:27
*** disasm[m] has quit IRC02:27
*** _whitelogger has joined #litex02:33
*** disasm[m] has joined #litex02:33
*** _whitelogger has quit IRC02:35
*** _whitelogger has joined #litex02:41
*** jaseg has quit IRC02:45
*** jaseg has joined #litex02:47
*** FFY00 has quit IRC02:50
*** FFY00 has joined #litex02:50
*** Degi has quit IRC02:59
*** Degi has joined #litex03:00
*** CarlFK has joined #litex03:37
*** _whitelogger has quit IRC04:06
*** _whitelogger has joined #litex04:08
*** m4ssi has joined #litex08:18
ranzbakI'm struggeling with Litevideo code, and I can't really find documentation using Google, is there documentation available how to build a RGB -> video pipeline -> DDR3 ram -> VGA out?09:11
*** jaseg has quit IRC09:22
*** jaseg has joined #litex09:24
acathlaHow do I know which part of a litex design is taking which amount of LC, BRAM, etc?10:05
zypcompare the numbers with a given part disabled or enabled?10:09
acathlazyp, that's a solution but a bit limited as some blocks can't be enabled alone10:16
zypthe problem is that the whole hierarchy of migen modules reduces into a single verilog module10:26
zypexternal cores like the cpus and so on will still be their own modules, so they'll show up in the statistics10:26
acathlaIf I can output a verilog for a module, like an uart+phy, how can I synthetise it to know the LC usage?10:29
zypI guess you could pull out part of the design, turn it into a standalone verilog module and then put it back in as an external module10:29
acathlaIs that normal that a simple UART+UARTPhy takes 564 LC?10:34
daveshahI think high UART resource usage has previously been caused by the FIFOs not mapping to BRAM10:35
daveshahYou could reduce the FIFO depth from 16 to 1/2 and see if that reduces resource usage10:35
lkclhmmm, when generating the ls180 ASIC verilog i'm getting GPIO tristates being declared as inputs, SDRAM address as output reg and many other oddities11:00
lkcloutput reg [12:0] sdram_a11:00
lkclSDRAM address pins are not outputs!11:01
daveshah> SDRAM address pins are not outputs11:02
daveshahreally?11:02
lkclerr...11:04
lkcloutputs from a _chip_ i wouldn't have expected them to be11:05
lkcloutputs from the *peripheral* i would expect them to be11:05
daveshahhuh?11:06
daveshahthey are outputs from the SoC and inputs to the SDRAM11:06
lkcloutputs from the SoC... *smack* yes of course11:06
lkcldoh11:06
lkclthis still leaves GPIOTristate as being declared as input11:07
daveshahyeah, not sure about that one11:07
lkcl    input wire [11:0] gpio_io,11:07
lkclthings that are "inout" that work successfully are SDRAM and SDMMC11:07
daveshahime, unexpected inputs with litex are usually when the pin is accidentally unused11:08
daveshahHas the tristate logic been generated correctly?11:08
lkcl1 sec let me check11:08
lkclassign main_gpio_pads[0] = main_gpio_tstriple0_oe ? main_gpio_tstriple0_o : 1'bz;11:08
lkclassign main_gpio_tstriple0_i = main_gpio_pads[0];11:09
lkclyes that looks like tristate.11:09
lkclit looks exactly like sdcard_cmd11:09
lkcllitesdcard phy does this:11:10
lkcl        # Cmd11:10
lkcl        self.specials += SDRTristate(11:10
lkclGPIOTristate uses TSTriple11:12
lkclwhere SDRTristate uses Tristate11:13
lkcland TSTriple has get_tristate which returns Tristate11:14
lkclso i'm not seeing anything obvious that would cause gpio pins to be declared input where sdcard_cmd is correctly inout11:14
lkcl_florent_, any ideas?11:16
lkclahh i have a clue11:19
lkclSDRTristate11:19
lkcl    def iter_expressions(self):11:19
lkcl        yield self, "io",  SPECIAL_INOUT11:19
lkclngggh that's likely it.11:20
lkclmigen Specials detects that back in Special.list_io11:20
lkclurrr i have a horrible-hack idea, but it would make a mess of the CSRs...11:23
lkcluse SDRTristate for GPIO :)11:23
lkclarg arg i'm going to have to hack something together, a hybrid combination of GPIOTristate and SDCard CMD11:25
acathladaveshah, from 8 to 16 bytes fifo, it's an increase of 33 LC11:39
acathlaand 2 ICESTORM_RAM to 311:40
somloso here's something a bit weird: 64-bit rocketchip based LiteX SoC running a stock linux kernel (with drivers for litex gateware as the only modification)13:58
somloI went with some silly low number for "timebase-frequency" in the DTS: e.g., 100000013:58
somlorecently, I decided to make that number reflect the *real* clock speed I'm using on the nexys4ddr: 7500000013:59
somloand as a result, I can barely type on the tty, and running `date` will advance by a second about every minute or so...13:59
somloso I am wondering if I need to tell linux about some custom HZ related configuration -- this ring any bells to anyone?14:00
sorearthe timebase-frequency in the DTS needs to match the rate at which mtime/mtimecmp are incremented14:11
*** jaseg has quit IRC14:19
*** jaseg has joined #litex14:21
somlosorear: thanks -- that makes me think there should probably be another DT variable besides timebase-frequency that indicates the main sys_clock, and/or some sort of relationship between it and timebase-frequency15:04
somloat least now I know the basic idea of what I'm looking for (back-story is that the current litesdcard driver proposed by antmicro uses timebase-frequency in lieu of the overall system clock when computing the divider for clocking the sdcard)15:06
somloand now I suspect that timebase-frequency should *not* be assumed to be the same thing as the overall SoC clock generator, but something *based* on that that's internal to the CPU15:07
*** proteusguy has quit IRC15:11
somloso, according to https://github.com/torvalds/linux/blob/master/Documentation/devicetree/booting-without-of.rst#L94015:17
tpbTitle: linux/booting-without-of.rst at master · torvalds/linux · GitHub (at github.com)15:17
somloa cpu could also have a `clock-frequency` cell, which would be the more appropriate thing to use to refer to the raw clock frequency15:18
somlobut even more appropriate would be to use a `bus-frequency` cell in the soc node: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/booting-without-of.rst#L104315:19
tpbTitle: linux/booting-without-of.rst at master · torvalds/linux · GitHub (at github.com)15:19
somlo_florent_: what do you think, the "75MHz" of a litex SoC on nexys4ddr, should that go under the CPU node as `clock-frequency`, under the soc node as `bus-frequency`, or more likely *both* ?15:21
somloit should definitely *not* be the cpu node's `timebase-frequency`, as my experience shows :)15:21
somlo_florent_: we're talking about the `CONFIG_CLOCK_FREQUENCY` in generated/soc.h, to be precise15:23
*** proteusguy has joined #litex15:23
*** m4ssi has quit IRC16:04
Findesomlo: here's how it's done for ariane's dts: https://github.com/openhwgroup/cva6/blob/master/bootrom/ariane.dts16:42
tpbTitle: cva6/ariane.dts at master · openhwgroup/cva6 · GitHub (at github.com)16:42
FindeCPU0 has clock-frequency and cpus has timebase-frequency16:43
Findeand uart has its own clock-frequency16:43
somloFinde: thanks! At this point, the remaining question is whether the LiteX `CONFIG_CLOCK_FREQUENCY` value should become clock-frequency on (each of the) CPU(s) or bus-frequency on the SoC node, or both17:09
somloand once that's decided, I can modify the litesdcard driver proposed here [*] to grab it from the appropriate location in DT (because we've established that using timebase-frequency is wrong)17:12
somlo[*] https://github.com/litex-hub/linux/commit/7ee130ea590f30b89f3621b82ca54cd343aa5dd917:12
tpbTitle: litex_mmc: Update to the DMA-based version of the core · litex-hub/linux@7ee130e · GitHub (at github.com)17:12
somlospecifically, here: https://github.com/litex-hub/linux/blob/wip/litex-vexriscv--linux5.0_sd_card_dma/drivers/mmc/host/litex_mmc.c#L51517:15
tpbTitle: linux/litex_mmc.c at wip/litex-vexriscv--linux5.0_sd_card_dma · litex-hub/linux · GitHub (at github.com)17:15
*** conmega has quit IRC19:10
*** conmega has joined #litex19:10
*** peeves57 has joined #litex20:09
st-gourichon-fidHi everyone.  Is it normal that https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/serv/irq.h is empty? Could it mean "not done", or "SERV does not support interrupts"?   That prevents us from running C code on the softcore from this gist provided by _florent_  https://gist.github.com/enjoy-digital/82ed88b77ef0b1e3e91b0592e44eaa1420:46
tpbTitle: litex/irq.h at master · enjoy-digital/litex · GitHub (at github.com)20:46
FindeI didn't think that serv had interrupts20:48
*** flammit has quit IRC20:50
*** Claude has quit IRC20:50
st-gourichon-fidFinde, mmh, SERV's github does mention "irq" though not a lot.20:50
*** alanvgreen has quit IRC20:50
*** Claude has joined #litex20:50
*** futarisIRCcloud has quit IRC20:51
*** alanvgreen has joined #litex20:51
*** tannewt has quit IRC20:51
*** tucanae47 has quit IRC20:51
*** bubble_buster has quit IRC20:51
*** key2 has quit IRC20:51
st-gourichon-fidWe tried to just remove mentions in C code, but crt0 does mention interrupts.  I guess it's because few people actually use SERV so the path has to be somehow cleared up... ?20:52
*** tucanae47 has joined #litex20:52
*** key2 has joined #litex20:52
*** flammit has joined #litex20:52
*** tannewt has joined #litex20:52
*** futarisIRCcloud has joined #litex20:53
*** bubble_buster has joined #litex20:53
Finde"SERV only implement the bits required for ecall, ebreak, misalignment and timer interrupts"20:54
Findefrom its manual20:54
st-gourichon-fidMfmfmf, indeed https://serv.readthedocs.io/en/latest/#serv-csr21:06
tpbTitle: SERV user manual SERV documentation (at serv.readthedocs.io)21:06
*** carlomaragno has quit IRC22:50
*** guan has quit IRC22:50
*** pdp7 has quit IRC22:50
*** mithro has quit IRC22:50
*** daveshah has quit IRC22:50
*** sorear has quit IRC22:50
*** Claude has quit IRC22:50
*** _florent_ has quit IRC22:50
*** key2 has quit IRC22:50
*** alanvgreen has quit IRC22:50
*** tucanae47 has quit IRC22:50
*** tannewt has quit IRC22:51
*** flammit has quit IRC22:51
*** carlomaragno has joined #litex22:51
*** guan has joined #litex22:51
*** daveshah has joined #litex22:51
*** sorear has joined #litex22:52
*** alanvgreen has joined #litex22:52
*** futarisIRCcloud has quit IRC22:52
*** y2kbugger has quit IRC22:53
*** tannewt has joined #litex22:53
*** Claude has joined #litex22:53
*** rohitksingh has quit IRC22:53
*** key2 has joined #litex22:53
*** _florent_ has joined #litex22:54
*** pdp7 has joined #litex22:54
*** y2kbugger has joined #litex22:54
*** mithro has joined #litex22:54
*** futarisIRCcloud has joined #litex22:54
*** tucanae47 has joined #litex22:54
*** rohitksingh has joined #litex22:56
*** flammit has joined #litex22:57
*** bubble_buster has quit IRC22:57
*** bubble_buster has joined #litex23:01
*** lf has quit IRC23:22
*** lf has joined #litex23:23
*** CarlFK has quit IRC23:46

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