Thursday, 2022-06-09

*** tpb <[email protected]> has joined #litex00:00
jevinskie[m]I found the same experience to be exhilarating :)00:44
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has quit IRC (Ping timeout: 260 seconds)03:04
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has joined #litex03:04
*** Degi <[email protected]> has quit IRC (Ping timeout: 246 seconds)03:06
*** Degi <[email protected]> has joined #litex03:09
*** genpaku <[email protected]> has quit IRC (Ping timeout: 272 seconds)08:11
*** genpaku <[email protected]> has joined #litex08:12
*** davebee <[email protected]> has joined #litex08:32
davebeeLitex uses a gcc cross-compiler : I'm using litex/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14 so you need to build your C code using eg litex/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc08:52
davebeeI'm building my application code using scons, so I set the toolchain to point to the programs in the bin directory.08:54
davebeeI have a question on the vexriscv. Not sure if this is the right place to ask it. I had an error caused by a misaligned data read. This causes an exception. How should this be handled? Simply detecting it and calling a software break would be enough, but I'm not sure I can tell that what exception source is for this error.08:56
davebeeIt is encoded in the mcause register. Sorry for the noise.09:43
*** betocool <[email protected]> has joined #litex12:20
betocoolHey all, I have a question (or push in the right direction!) about the litedram module. My goal is to implement the neorv32 processor with my own customisations and the wishbone interface to the SDRAM on a Cyclone IV De0Nano. I found a project which does all that, but the SDRAM module is discontinued as IP block in Quartus.12:40
betocoolI was able to generate a .v file by creating a new yaml file with the IS42S16160 module just for fun. Had to change a few things on the gen.py file to get that running but it seems to have worked, because it generated a litedram_core.v file and did not complain.12:43
betocoolBut I'm confused about the settings on the Yaml file, because the dictionary for other DRAM chips offers Wishbone, AXI, native and FIFO user ports. How do I tell the "gen.py" file that I really only need wishbone? I could not find those settings in the other build parameters.12:45
*** davebee <[email protected]> has quit IRC (Quit: Leaving)12:46
betocoolI'm still getting my head around how all goes together. It'll take me a while, but I'm sure I'll get there. As for the motivation why? Well... I would just like to mix and match, that's all!12:48
betocoolAlso... what's the point of the UART setting in the config file?12:59
*** FabM <FabM!~FabM@2a03:d604:103:600:4708:c2ef:ac29:74ff> has joined #litex13:19
*** betocool <[email protected]> has quit IRC (Quit: Client closed)14:11
*** genpaku <[email protected]> has quit IRC (Remote host closed the connection)17:29
*** genpaku <[email protected]> has joined #litex17:32
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)17:34
*** genpaku <[email protected]> has quit IRC (Quit: leaving)17:47
*** genpaku <[email protected]> has joined #litex17:48
*** Johnsel <[email protected]> has joined #litex21:15
*** subthreshold <subthreshold!~subthresh@2607:fb90:8e27:5039:559e:1ac0:61f6:62fc> has joined #litex22:55
subthresholdHi, it's been a while! I just wanted to ask a quick question - the way the LiteDRAM memory controller is designed, it doesn't operate in terms of DFI "frequency" ratios right?22:58
subthresholdNamely, all the timing controllers seem to be operating off the JEDEC nck specification, which means that it's counting in terms of clock domain of the DRAM?22:58
subthresholdWhere as in a DFI system, the MC could potentially be operating at 1/2 or 1/4 speed of the DRAM domain.22:59
johnsel92[m]afaik (and that is not a lot) the pll to DRAM clock derivation happens automagically22:59
johnsel92[m]there are option to run the DRAM in SDR or DDR modes23:00
johnsel92[m]maybe the example implementations for the platform/boards show you how to do what you want23:01
johnsel92[m]https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/alchitry_au.py23:02
johnsel92[m]specifically #38-47 and #61-7123:03
johnsel92[m]                module        = AS4C128M16(sys_clk_freq, "1:4"),23:03
johnsel92[m] * ```23:04
johnsel92[m]module        = AS4C128M16(sys_clk_freq, "1:4"),23:04
johnsel92[m]```23:04
johnsel92[m] * ```#7023:04
johnsel92[m]AS4C128M16(sys_clk_freq, "1:4"),23:04
johnsel92[m]```23:04
subthresholdGotcha. I noticed these too, but I was confused about how the MC tracks timing parameters in cases where 1:4 is used.23:04
johnsel92[m] * ```23:04
johnsel92[m]AS4C128M16(sys_clk_freq, "1:4"),23:04
johnsel92[m]```23:04
subthresholdLet me pull up something23:05
subthresholdFor example in this code: https://github.com/enjoy-digital/litedram/blob/master/litedram/core/bankmachine.py23:05
subthreshold144- 14823:05
subthreshold        # tWTP (write-to-precharge) controller -----------------------------------------------------23:06
subthreshold        write_latency = math.ceil(settings.phy.cwl / settings.phy.nphases)23:06
subthreshold        precharge_time = write_latency + settings.timing.tWR + settings.timing.tCCD # AL=023:06
subthreshold        self.submodules.twtpcon = twtpcon = tXXDController(precharge_time)23:06
subthreshold        self.comb += twtpcon.valid.eq(cmd.valid & cmd.ready & cmd.is_write)23:06
subthresholdWL is originally specified in terms of no. of CK cycles in terms of the PHY+DRAM Device Time Domain23:06
subthresholdif there's a 1:4 ratio, then dividing this by 4 converts it to the number of clock cycles in the MC Domain23:07
mithro_florent_ Great to see https://www.crowdsupply.com/lime-micro/limesdr-mini-2/updates/litex-support !23:07
tpbTitle: LimeSDR Mini 2.0 - LiteX Support | Crowd Supply (at www.crowdsupply.com)23:07
subthresholdBut TWR isn't divided by 4!23:08
subthresholdand neither is TCCD23:08
subthresholdso I am attempitng to figure out what domain these TXXD controllers are operating on in a ratio'ed system23:08
subthresholdand why some parameters are divided down by nphases while others aren't, if that makes sense.23:09
*** genpaku <[email protected]> has quit IRC (Quit: leaving)23:10
johnsel92[m]honestly this goes beyond my knowledge I was able to use things successfully without understanding these details, but perhaps it helps to know that there is a lot of functionality implemented in e.g. https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/dfi.py#L10723:13
johnsel92[m]based on my understanding these values are precalculated either in that file or in one of it's sibling files23:14
subthresholdGotcha, I would like to make the MC fully DFI compatible23:15
subthresholdand thats why I'm examining these parameters23:15
subthresholdis there someone else who would know about this in greater depth, perhaps florent?23:16
johnsel92[m]undoubtedly, the commit logs show who contributed what23:17
subthresholdGot it, thanks a lot John23:17
johnsel92[m]you are welcome, and there are several files called dfi/dfii that most likely are related to what you are looking for23:19
johnsel92[m]and perhaps it's useful to realise that as it's python you can step through the code while it's running and inspect variables with a debugger23:22
johnsel92[m]you can easily build some device and hook a debugger up to see what comes from where23:23
subthreshold(y) , though I suspect this may be more of an architectural point than anything.23:27
subthresholdHi _florent_, I just wanted to ask a quick question about the way the LiteDRAM memory controller is designed. Walking through the code, I see there is a partial implementation of DFI, and that there are phases and frequency ratios supported. However, the timing controllers are all defined in terms of "NCK" from JEDEC. In a frequency ratio system23:30
subthreshold(e.g., 1:4), this would be on the PHY+Memory domain. However, the MC timing controllers seem to work off this domain already.23:30
subthresholdI reference this code: https://github.com/enjoy-digital/litedram/blob/master/litedram/core/bankmachine.py23:30
subthreshold        # tWTP (write-to-precharge) controller -----------------------------------------------------23:30
subthreshold        write_latency = math.ceil(settings.phy.cwl / settings.phy.nphases)23:30
subthreshold        precharge_time = write_latency + settings.timing.tWR + settings.timing.tCCD # AL=023:30
subthreshold        self.submodules.twtpcon = twtpcon = tXXDController(precharge_time)23:30
subthreshold        self.comb += twtpcon.valid.eq(cmd.valid & cmd.ready & cmd.is_write)23:30
subthresholdwrite_latency/ nphases makes sense, but why isn't the same applied to tWR? Does this mean that in general the MC needs to be running on a 1:1 with the PHY+MC in this implementation?23:31
johnsel92[m]so just to be sure, you're not looking for: https://github.com/enjoy-digital/litedram/blob/master/litedram/modules.py#L49323:33
johnsel92[m] _TechnologyTimings(tREFI=64e6/4096, tWTR=(2, None), tCCD=(1, None), tRRD=(None, 14))23:34
johnsel92[m] _SpeedgradeTimings(tRP=22, tRCD=21, tWR=20, tRFC=(None, 63), tFAW=None, tRAS=42)23:34
subthresholdNo, those are spec sheet parameters which I have as well.23:34
johnsel92[m]those, right?23:34
subthresholdit's the question of the domain on which they're counted in a DFI5.1 ratio'ed system.23:34
subthresholdBecause a ratio'ed system would have MC running at say, 1/4 speed of PHY+Memory.23:35
subthresholdIn this case you cannot count those parameters in TCCD but must instead divide by 4 to convert it to MC domain23:35
subthresholdcount those parameters in NCK*23:36
subthresholdbut I don't see this happening. Which makes me confused about how the phases were implemented to begin with.23:36

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