*** tpb <[email protected]> has joined #litex | 00: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 #litex | 03:04 | |
*** Degi <[email protected]> has quit IRC (Ping timeout: 246 seconds) | 03:06 | |
*** Degi <[email protected]> has joined #litex | 03:09 | |
*** genpaku <[email protected]> has quit IRC (Ping timeout: 272 seconds) | 08:11 | |
*** genpaku <[email protected]> has joined #litex | 08:12 | |
*** davebee <[email protected]> has joined #litex | 08:32 | |
davebee | Litex 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-gcc | 08:52 |
davebee | I'm building my application code using scons, so I set the toolchain to point to the programs in the bin directory. | 08:54 |
davebee | I 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 |
davebee | It is encoded in the mcause register. Sorry for the noise. | 09:43 |
*** betocool <[email protected]> has joined #litex | 12:20 | |
betocool | Hey 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 |
betocool | I 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 |
betocool | But 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 | |
betocool | I'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 |
betocool | Also... 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 #litex | 13: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 #litex | 17: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 #litex | 17:48 | |
*** Johnsel <[email protected]> has joined #litex | 21:15 | |
*** subthreshold <subthreshold!~subthresh@2607:fb90:8e27:5039:559e:1ac0:61f6:62fc> has joined #litex | 22:55 | |
subthreshold | Hi, 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 |
subthreshold | Namely, 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 |
subthreshold | Where 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 automagically | 22:59 |
johnsel92[m] | there are option to run the DRAM in SDR or DDR modes | 23:00 |
johnsel92[m] | maybe the example implementations for the platform/boards show you how to do what you want | 23:01 |
johnsel92[m] | https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/alchitry_au.py | 23:02 |
johnsel92[m] | specifically #38-47 and #61-71 | 23: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] | * ```#70 | 23:04 |
johnsel92[m] | AS4C128M16(sys_clk_freq, "1:4"), | 23:04 |
johnsel92[m] | ``` | 23:04 |
subthreshold | Gotcha. 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 |
subthreshold | Let me pull up something | 23:05 |
subthreshold | For example in this code: https://github.com/enjoy-digital/litedram/blob/master/litedram/core/bankmachine.py | 23:05 |
subthreshold | 144- 148 | 23: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=0 | 23: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 |
subthreshold | WL is originally specified in terms of no. of CK cycles in terms of the PHY+DRAM Device Time Domain | 23:06 |
subthreshold | if there's a 1:4 ratio, then dividing this by 4 converts it to the number of clock cycles in the MC Domain | 23:07 |
mithro | _florent_ Great to see https://www.crowdsupply.com/lime-micro/limesdr-mini-2/updates/litex-support ! | 23:07 |
tpb | Title: LimeSDR Mini 2.0 - LiteX Support | Crowd Supply (at www.crowdsupply.com) | 23:07 |
subthreshold | But TWR isn't divided by 4! | 23:08 |
subthreshold | and neither is TCCD | 23:08 |
subthreshold | so I am attempitng to figure out what domain these TXXD controllers are operating on in a ratio'ed system | 23:08 |
subthreshold | and 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#L107 | 23:13 |
johnsel92[m] | based on my understanding these values are precalculated either in that file or in one of it's sibling files | 23:14 |
subthreshold | Gotcha, I would like to make the MC fully DFI compatible | 23:15 |
subthreshold | and thats why I'm examining these parameters | 23:15 |
subthreshold | is there someone else who would know about this in greater depth, perhaps florent? | 23:16 |
johnsel92[m] | undoubtedly, the commit logs show who contributed what | 23:17 |
subthreshold | Got it, thanks a lot John | 23:17 |
johnsel92[m] | you are welcome, and there are several files called dfi/dfii that most likely are related to what you are looking for | 23: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 debugger | 23:22 |
johnsel92[m] | you can easily build some device and hook a debugger up to see what comes from where | 23:23 |
subthreshold | (y) , though I suspect this may be more of an architectural point than anything. | 23:27 |
subthreshold | Hi _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 system | 23: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 |
subthreshold | I reference this code: https://github.com/enjoy-digital/litedram/blob/master/litedram/core/bankmachine.py | 23: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=0 | 23: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 |
subthreshold | write_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#L493 | 23: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 |
subthreshold | No, those are spec sheet parameters which I have as well. | 23:34 |
johnsel92[m] | those, right? | 23:34 |
subthreshold | it's the question of the domain on which they're counted in a DFI5.1 ratio'ed system. | 23:34 |
subthreshold | Because a ratio'ed system would have MC running at say, 1/4 speed of PHY+Memory. | 23:35 |
subthreshold | In this case you cannot count those parameters in TCCD but must instead divide by 4 to convert it to MC domain | 23:35 |
subthreshold | count those parameters in NCK* | 23:36 |
subthreshold | but 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/!