*** tpb has joined #litex | 00:00 | |
*** rohitksingh has quit IRC | 00:20 | |
*** rohitksingh has joined #litex | 00:28 | |
*** rohitksingh has quit IRC | 00:52 | |
*** peepsalot has joined #litex | 01:11 | |
peepsalot | hi, i'm just starting to learn about litex/migen and curious about how to develop new soft cpu cores. are there currently any fine grained reusable modules that are shared across architectures? i guess I'm picturing some config that defines supported opcodes, and can generate an instruction decoder, modules to define ALUs of various widths and capabilities, L1cache modules etc. | 01:17 |
---|---|---|
peepsalot | i'm also a software dev by trade, and not familiar with HDL yet so this project looks great to me. i've been loath to learn Verilog directly so far as its so ugly | 01:22 |
*** gregdavill has joined #litex | 01:36 | |
gregdavill | I'm wanting to add a clock domain crossing to ValentyUSB eptri. It currently needs to run in a 12MHz clock domain for the USB side. | 01:39 |
gregdavill | I want to run my SoC at 48MHz+ and trying to work out the best way/place to add cdc elements. | 01:40 |
gregdavill | Its interface with the SoC is entirely though CSRs. | 01:41 |
gregdavill | Is there an easy way to do this? | 01:42 |
gregdavill | I'm thinking of wrapping the CSRs and using a Async FIFO with address/data/re/we signals. I think this will satisfy the CSR bus cycle. | 01:46 |
gregdavill | that seems like a better plan than keeping the CSRs in the SoC and breaking out each signal through a separate cdc element to the lower speed domain. | 01:47 |
peepsalot | why is there a litex-boards repository which is separate from https://github.com/m-labs/migen/tree/master/migen/build/platforms shouldn't they ideally be in sync? | 02:12 |
tpb | Title: migen/migen/build/platforms at master · m-labs/migen · GitHub (at github.com) | 02:12 |
peepsalot | i saw that de10nano was added for litex, but not migen | 02:13 |
sajattack[m] | I added the de10nano to litex because it's what I was using | 02:27 |
sajattack[m] | if you want to copy it over somewhere else go right ahead | 02:28 |
peepsalot | oh, hi sajattack[m], i found this from atari-forums litex linux thread btw :) | 02:32 |
sajattack[m] | cool | 02:33 |
sajattack[m] | I'm not sure how a litex board definition differs from a migen one | 02:34 |
sajattack[m] | I've only ever used migen in the context of litex | 02:34 |
peepsalot | i'm sort of curious about developing other MiSTer cores using litex/migen | 02:34 |
sajattack[m] | It can be done, but it's probably not how I'd go about doing things | 02:35 |
sajattack[m] | because all the core MiSTer tooling is systemverilog, and the verilog output from litex is pretty ugly | 02:35 |
sajattack[m] | I'm using litex because it's the only way I could figure out how to get a functioning risc-v soc | 02:36 |
sajattack[m] | verilog's not so hard | 02:40 |
sajattack[m] | I got my start with this book https://www.amazon.ca/Designing-Video-Game-Hardware-Verilog-ebook/dp/B07LD48CTV/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr= | 02:41 |
*** futarisIRCcloud has joined #litex | 02:48 | |
*** gregdavill has quit IRC | 03:25 | |
levi | This book is a pretty straightforward intro to doing FPGA stuff with Verilog too: https://www.amazon.com/FPGA-Prototyping-Verilog-Examples-Spartan-3/dp/0470185325 The FPGA it targets is pretty outdated now, but most of it transfers pretty well to other dev boards. | 03:43 |
futarisIRCcloud | https://github.com/antmicro/arty-expansion-board | 03:57 |
tpb | Title: GitHub - antmicro/arty-expansion-board: IO expansion board compatible with Digilent Arty A7 (at github.com) | 03:57 |
futarisIRCcloud | Anyone got one of these? mithro, didn't I mention the MAX3421E back in 2018? | 04:00 |
futarisIRCcloud | https://logs.timvideos.us/%23timvideos/%23timvideos.2018-02-23.log.html | 04:00 |
*** gregdavill has joined #litex | 04:01 | |
futarisIRCcloud | Hi gregdavill. | 04:01 |
gregdavill | futarisIRCcloud: https://twitter.com/pdp7/status/1232794004409942018 | 04:06 |
gregdavill | I guess a standard USB PHY with ULPI takes up too many signals for a single PMOD, the SPI based approach is nice. | 04:07 |
futarisIRCcloud | I've got some USB-C PMODs from kbeckmann ... | 04:07 |
futarisIRCcloud | The Arduino shield I linked to in 2018 should also work with Arty. | 04:10 |
mithro | gregdavill: valentyusb already has CDC stuff unless xobs deleted it? | 04:15 |
xobs | mithro: there's no CDC stuff in valentyusb. If you use tinyusb, you can have cdc support with eptri. | 04:17 |
xobs | Jamie Craig (madhacker) was working on getting it working as part of a 6502 project, however: https://github.com/jamesacraig/6502-on-fomu/blob/master/fomu_usb_cdc.py | 04:17 |
tpb | Title: 6502-on-fomu/fomu_usb_cdc.py at master · jamesacraig/6502-on-fomu · GitHub (at github.com) | 04:17 |
gregdavill | Does it? in eptri? I only saw a 'cdc' boolean, that gets passed into the debug bridge. The CSRs and FIFOs look like they always live in the 12MHz domain. | 04:17 |
gregdavill | I'm attempting to get CircuitPython running. Ideally I want to run it from the SDRAM. But I can't get enumeration, because I think the fetch time in SDRAM is too slow. | 04:19 |
gregdavill | I think xobs 'solved' this on the Fomu, by moving all time critical stuff into a blockram fro execution. | 04:19 |
xobs | Oh! Right, CDC. Overloaded acronym. Sorry. | 04:20 |
mithro | Ahh, only all the *other* interfaces than eptri have CDC | 04:20 |
xobs | I thought you meant cdc_acm. You mean clock domain crossing. | 04:20 |
xobs | Right, I wasn't sure how to get cdc working with eptri. That's a longstanding issue. dummyusb has cdc which does, in fact, work correctly. | 04:20 |
mithro | Yes, clock domain crossing | 04:20 |
mithro | Just use a FIFO with one end in sys and one end in usb_12 | 04:21 |
mithro | epfifo has an example | 04:22 |
gregdavill | Okay, I'll have to take a look through the other valentyusb.cpu interfaces, thanks! | 04:23 |
futarisIRCcloud | CDC = Centres for Disease Control / USB Communications Device Class / Clock Domain Crossing | 04:23 |
futarisIRCcloud | TLA are not confusing at all. | 04:24 |
mithro | If you clocks are aligned, you have an even easier time | 04:24 |
mithro | The fact that flipflops in an FPGA have setup + hold times which (have to) meet your fast clock mean you only need to worry about metastability from clock phase | 04:27 |
mithro | Another option is to just use a clock-enable strobe | 04:27 |
gregdavill | Ohh, so the usb_12 is actually clocked at 48, but only has a CE pulse every 4th clock. | 04:30 |
*** litex-questions has quit IRC | 04:30 | |
gregdavill | That might work well on the ECP5, since it easily meets timing. and it's trivial to setup with a `CEInserter()` | 04:31 |
mithro | If I recall correctly the capture frontend uses a 48MHz clock with a recovered strobe at 12MHz... | 04:31 |
mithro | Snap :-P | 04:31 |
mithro | Writing on my phone while I walk home is slow | 04:32 |
gregdavill | FYI, I did implement a hardware based USB Communication Device Class. Very much a work in progress, but it's a statemachine that captures the CSR registers and sits behind eptri. | 04:37 |
gregdavill | https://github.com/gregdavill/valentyusb/blob/hw_cdc_eptri/valentyusb/usbcore/cpu/cdc_eptri.py | 04:37 |
tpb | Title: valentyusb/cdc_eptri.py at hw_cdc_eptri · gregdavill/valentyusb · GitHub (at github.com) | 04:38 |
gregdavill | I've been using it with linux-on-litex on orangecrab/hadbadge for the UART link. Been working well. | 04:39 |
xobs | gregdavill: fancy! | 04:40 |
xobs | another option is to add a uart in litex in "crossover" mode and use `wishbone-tool -s terminal`. | 04:40 |
futarisIRCcloud | Fancy indeed. | 04:42 |
*** rohitksingh has joined #litex | 04:57 | |
*** gregdavill has quit IRC | 06:40 | |
*** m4ssi has joined #litex | 06:51 | |
peepsalot | i tried to follow the instructions here https://github.com/litex-hub/linux-on-litex-vexriscv but can't get the sim.py to run. the way the steps are all split up is a bit confusing. the end of prerequisites has cd into the git dir, but are any of the other steps supposed to actually be done inside that directory? | 07:55 |
tpb | Title: GitHub - litex-hub/linux-on-litex-vexriscv: Linux on LiteX-VexRiscv (at github.com) | 07:55 |
peepsalot | it errors out on compiling xgmii_ethernet.c | 08:04 |
sajattack[m] | peepsalot if you want I can send you my de10nano build | 10:35 |
sajattack[m] | You'll need an ftdi cable though | 10:36 |
peepsalot | sajattack[m]: sure that could be helpful, though i'm also wanting to learn/setup the tools properly. | 10:39 |
peepsalot | by build you mean like rbf + linux image? where does the linux image go if there's no sd support? its loaded straight to sdram via serial? | 10:39 |
sajattack[m] | I think your issue might be a non-recursive clone, not sure | 10:39 |
sajattack[m] | Yes loaded straight over serial via ftdi | 10:40 |
peepsalot | ok, i think i have one around here somewhere, there's nothing altera specific about the connection device, right? | 10:41 |
sajattack[m] | no | 10:41 |
sajattack[m] | just plug into the arduino rx/tx and the pin next to it is grounded | 10:41 |
sajattack[m] | I think I have to recompile my image, I've been messing with some stuff | 10:42 |
sajattack[m] | it's the last 3 pins not covered by the io board | 10:43 |
peepsalot | i have a cp2102 | 10:45 |
sajattack[m] | that should work | 10:46 |
sajattack[m] | you also need quartus to flash the rbf | 10:46 |
peepsalot | i forget if its 5 or 3.3v, or configurable somehow. haven't messed with it in a while | 10:47 |
sajattack[m] | yeah make sure it's 3.3v | 10:47 |
peepsalot | i have quartus 19.1 installed, tried getting 17.x setup but it wasn't working on ubuntu | 10:47 |
sajattack[m] | It shouldn't matter, you only need the programmer part and I think it's the same | 10:48 |
sajattack[m] | gimme a sec to unfuck the stuff I've been messing with | 10:52 |
peepsalot | yeah looks like its 3.3v data only on the cp2102. i was a little confused because the board have a breakout pin for 5v and 3.3v, but that's just passing the usb rail through | 10:54 |
peepsalot | sajattack[m]: did you try the simulator at all? | 10:56 |
sajattack[m] | no lol | 10:57 |
peepsalot | k, just curious | 10:58 |
* sajattack[m] posted a file: de10nano-litex-wip.zip (5130KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/VaALvSDEDXCgaIdmBazeXCqg > | 11:02 | |
* sajattack[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/niQwRSnlIMXKpcEBwnlQJouR > | 11:02 | |
sajattack[m] | oh oops that zip is missing some stuff | 11:03 |
sajattack[m] | 1 sec | 11:05 |
sajattack[m] | oh oops I lost a bit when I git reset | 11:06 |
sajattack[m] | I'll give you this version anyway | 11:06 |
* sajattack[m] posted a file: de10nano-litex-wip.zip (5136KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/TbiExRIoidBywBupdltpTiRA > | 11:07 | |
sajattack[m] | that version's not filling the whole screen | 11:07 |
sajattack[m] | I only laughed when you asked if I did the simulation because it's bad practice not to test things in simulation first | 11:10 |
peepsalot | :) | 11:10 |
sajattack[m] | ok, full screen version | 11:15 |
* sajattack[m] posted a file: de10nano-litex-wip.zip (5119KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/sbsaIlbKZgEUHqgyujIydxio > | 11:15 | |
sajattack[m] | which part of simulation where you stuck on? | 11:28 |
sajattack[m] | * which part of simulation were you stuck on? | 11:29 |
peepsalot | xgmii_ethernet.c:110:8: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] | 11:36 |
peepsalot | i was just trying to call sim.py and it would automatically start building libraries or something | 11:37 |
sajattack[m] | yeah but what part is that? what command? | 11:37 |
sajattack[m] | ok | 11:37 |
sajattack[m] | oh it's probably because your gcc is newer than what's targeted by litex or something | 11:38 |
sajattack[m] | I would add -Wno-sometimes-uninitialized to CFLAGS | 11:38 |
peepsalot | oh, yeah, its running clang-9 :P | 11:40 |
peepsalot | i haven't flashed with quartus before, and evidently am too dumb to figure this out. you use the usb blaster port? what "mode" for programmer? | 12:07 |
sajattack[m] | jtag | 12:09 |
peepsalot | i guess i'm missing usb-blaster driver for linux? | 12:09 |
sajattack[m] | maybe | 12:09 |
* sajattack[m] uploaded an image: 2020-02-28-040830_960x595_scrot.png (67KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/yKXWBycoryEgHBxgyQHSRzFb > | 12:10 | |
peepsalot | ok, i had to change udev rules, looks like it sees it now | 12:14 |
peepsalot | sajattack[m]: you use the pins corresponding to tx/rx on this image? the pin next to it isn't gnd though? or its configured that way for this specific core? | 12:33 |
peepsalot | https://i.stack.imgur.com/dVkQU.jpg | 12:33 |
sajattack[m] | yeah, unused pins are automatically ground | 12:34 |
sajattack[m] | don't forget to connect tx to rx and rx to tx because uart is dumb that way | 12:35 |
peepsalot | is 1e6 valid rate? i think cp2102 only does 921600 | 13:00 |
sajattack[m] | oh | 13:00 |
sajattack[m] | it works on ftdi | 13:00 |
peepsalot | idk, i just get: [LXTERM] Starting.... | 13:01 |
sajattack[m] | press enter at that | 13:01 |
sajattack[m] | and it should give you the prompt | 13:01 |
sajattack[m] | idk why it does that | 13:01 |
daveshah | 1e6 is known not to work on cp2102, afaik you have to use 500k for those parts | 13:01 |
sajattack[m] | ok let me compile you a slower build | 13:02 |
daveshah | (https://github.com/litex-hub/linux-on-litex-vexriscv/issues/91) | 13:02 |
tpb | Title: KC705: Lower uart_baudrate? · Issue #91 · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com) | 13:02 |
* sajattack[m] posted a file: top.sof (6534KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/DHxvMyfOPDzsnYxHQOUolSxx > | 13:08 | |
sajattack[m] | see if that works peepsalot | 13:08 |
peepsalot | i also have a pl2303 i could try? | 13:09 |
sajattack[m] | the datasheet for that says it supports 1.2M so it might work | 13:10 |
peepsalot | eh, i just don't know if its putting out 5v signals or not, its capable of either depending on how its connected, but the adapter is overmolded so can't see how its wired up. | 13:33 |
peepsalot | pain in the butt serial connections | 13:33 |
sajattack[m] | just try the 500k build then | 13:33 |
peepsalot | hrm, weird i got litex> prompt but can't type after that | 13:36 |
peepsalot | using 500000 build | 13:37 |
sajattack[m] | speed=500000? | 13:38 |
peepsalot | yes | 13:38 |
sajattack[m] | it worked for me so idk | 13:39 |
peepsalot | ok 2nd time worked *shrug* | 13:40 |
peepsalot | re-uploaded in quartus and connected lxterm again | 13:40 |
peepsalot | thanks for all the help | 13:41 |
peepsalot | still uploading image... | 13:41 |
sajattack[m] | cool glad you got it | 13:41 |
sajattack[m] | oh btw are you using 32mb or 128mb sdram? | 13:41 |
peepsalot | 128, is that a problem? | 13:42 |
sajattack[m] | idk | 13:42 |
sajattack[m] | I've always used 32 | 13:42 |
sajattack[m] | I want to know if it will work with both | 13:42 |
peepsalot | oh wait, lol actually i have 0 RAM on this board, i guess i should swap it over. i have this separate de10 for learning development and one i use just for mister(with 128MB), forgot about that aspect | 13:44 |
sajattack[m] | oops | 13:44 |
sajattack[m] | haha | 13:44 |
peepsalot | is it not feasible to integrate with the onboard ddr3? | 13:45 |
sajattack[m] | it's difficult because the hps interface is in the way | 13:45 |
sajattack[m] | litex doesn't have any knowledge of the hps | 13:45 |
peepsalot | ok, yeah i know it has to go through hps somehow, but i still don't really understand the details of how that works. isn't the hps over avalon bus, which litex knows about? | 13:49 |
sajattack[m] | tbh idk | 13:49 |
sajattack[m] | if you figure it out, send a pr :P | 13:50 |
_florent_ | peepsalot, sajattack[m] : do you have a link to the MiSTer verilog/VHDL code that integrate the HPS? just to have a look at the interfaces. | 14:05 |
peepsalot | don't really know which cores/where its used exactly | 14:05 |
sajattack[m] | I'll have a look | 14:06 |
peepsalot | it might be a drop in intel IP | 14:06 |
peepsalot | ? | 14:06 |
sajattack[m] | this might be it? looks a bit small https://github.com/MiSTer-devel/Genesis_MiSTer/blob/master/sys/ddr_svc.sv | 14:09 |
tpb | Title: Genesis_MiSTer/ddr_svc.sv at master · MiSTer-devel/Genesis_MiSTer · GitHub (at github.com) | 14:09 |
_florent_ | is there a common verilog/VHDL code that each MiSTer FPGA core reuses? or does each core create a full FPGA image? | 14:10 |
_florent_ | sajattack[m]: thanks, i'm going to look | 14:10 |
sajattack[m] | the sys folder is common to each core pretty much | 14:10 |
sajattack[m] | see also https://github.com/MiSTer-devel/Genesis_MiSTer/blob/master/ddram.sv | 14:13 |
tpb | Title: Genesis_MiSTer/ddram.sv at master · MiSTer-devel/Genesis_MiSTer · GitHub (at github.com) | 14:13 |
_florent_ | sajattack[m]: the easier would probably be to create a LiteX platform with a similar pinout than the emu Module: https://github.com/MiSTer-devel/Main_MiSTer/wiki/Core-porting-notes | 14:27 |
tpb | Title: Core porting notes · MiSTer-devel/Main_MiSTer Wiki · GitHub (at github.com) | 14:27 |
_florent_ | sajattack[m]: and then reuse theses interfaces to communicate with the ARM or DDR3 | 14:27 |
_florent_ | these | 14:27 |
sajattack[m] | yeah I was planning to stick it in the emu module eventually | 14:27 |
sajattack[m] | but how do I get litex to generate the right signals? | 14:28 |
_florent_ | i can create a template for that | 14:30 |
sajattack[m] | ok thanks | 14:30 |
sajattack[m] | could you do something with litesdcard too or not ready yet? | 14:31 |
_florent_ | to create a standalone litesdcard core? | 14:31 |
sajattack[m] | instead of serialboot | 14:32 |
sajattack[m] | that wiki might be a bit out of date, I think there are sdcard signals too | 14:33 |
sajattack[m] | oh actually I forgot, there's two sdcards | 14:34 |
sajattack[m] | one with standard sdcard signals on the io board, and one with ioctl | 14:34 |
sajattack[m] | https://github.com/MiSTer-devel/Genesis_MiSTer/blob/e0b367749da88836c226c6a269e09b6aa363497b/Genesis.sv#L76 | 14:34 |
tpb | Title: Genesis_MiSTer/Genesis.sv at e0b367749da88836c226c6a269e09b6aa363497b · MiSTer-devel/Genesis_MiSTer · GitHub (at github.com) | 14:34 |
sajattack[m] | I think this module maps between the two https://github.com/MiSTer-devel/BBCMicro_MiSTer/blob/master/sys/sd_card.v | 14:38 |
tpb | Title: BBCMicro_MiSTer/sd_card.v at master · MiSTer-devel/BBCMicro_MiSTer · GitHub (at github.com) | 14:39 |
sajattack[m] | so ideally I'd like that | 14:41 |
_florent_ | For generating the emu core with LiteX, you could use this as a template: https://hastebin.com/jatekurefo.py | 14:41 |
_florent_ | this will generate a core like this: https://hastebin.com/xapogesado.php | 14:41 |
sajattack[m] | ok, sorry, how does that fit in with litedram though? | 14:43 |
sajattack[m] | I can map litex to emu by hand | 14:48 |
_florent_ | this will just allow you to create a LiteX SoC inside the EMU framework of MiSTer, you then have to reuse the interfaces already provided by the EMU framework | 14:48 |
sajattack[m] | sorry, my question is, how do I get litedram to give me signals for the mister interface? does it already have similar ones? | 14:49 |
_florent_ | the interface in the EMU framework for the SDRAM is a simplified interface, so no need for LiteDRAM, it can probably be easily connected to the wishbone bus | 14:51 |
sajattack[m] | if I look at another core with ddr, the signals lok different | 14:51 |
sajattack[m] | ok | 14:51 |
sajattack[m] | I know very little about wishbone | 14:53 |
_florent_ | you can find useful information about it at: | 14:58 |
_florent_ | https://zipcpu.com/blog/2017/06/08/simple-wb-master.html | 14:58 |
tpb | Title: Building a Simple Wishbone Master (at zipcpu.com) | 14:58 |
sajattack[m] | are you saying these signals https://github.com/MiSTer-devel/Genesis_MiSTer/blob/e0b367749da88836c226c6a269e09b6aa363497b/Genesis.sv#L85 map to line 72 of your hastebin? | 14:58 |
tpb | Title: Genesis_MiSTer/Genesis.sv at e0b367749da88836c226c6a269e09b6aa363497b · MiSTer-devel/Genesis_MiSTer · GitHub (at github.com) | 14:58 |
_florent_ | https://zipcpu.com/zipcpu/2017/11/07/wb-formal.html | 14:58 |
tpb | Title: Building Formal Assumptions to Describe Wishbone Behaviour (at zipcpu.com) | 14:58 |
_florent_ | https://github.com/enjoy-digital/litex/blob/master/litex/soc/interconnect/wishbone.py#L21-L71 | 14:58 |
tpb | Title: litex/wishbone.py at master · enjoy-digital/litex · GitHub (at github.com) | 14:58 |
_florent_ | line 72 of the template or generated verilog? | 14:59 |
sajattack[m] | generated verilog | 15:00 |
sajattack[m] | or line 16 | 15:00 |
_florent_ | not directly, you will need to understand the protocol used for the SDRAM interface on MiSTer, how wishbone works and create a bridge between both | 15:01 |
sajattack[m] | ok | 15:02 |
_florent_ | like for example the Wishbone2CSR bridge: https://github.com/enjoy-digital/litex/blob/master/litex/soc/interconnect/wishbone2csr.py | 15:02 |
tpb | Title: litex/wishbone2csr.py at master · enjoy-digital/litex · GitHub (at github.com) | 15:02 |
sajattack[m] | I got some reading to do 😅 | 15:03 |
sajattack[m] | ok I read all the things | 15:54 |
somlo | _florent_: it just occurred to me (after a week of doing *completely* different things) to actually ask you: what brand of microSD card have you used successfully with liteSDCard on nexys4ddr? :) | 15:57 |
sajattack[m] | _florent_: could you show me where litedram bridges to wishbone so I can get a better idea of what it looks like for a memory interface? | 15:58 |
somlo | should have asked a week ago, and ordered the *right* one, and done things in parallel, but that's usually not how it works out for me... | 15:59 |
somlo | sajattack[m]: I think you're looking for this block: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L981 (but _florent_ can correct me if I'm wrong) | 16:01 |
tpb | Title: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com) | 16:01 |
sajattack[m] | I think this is what I was looking for actually https://github.com/enjoy-digital/litedram/blob/master/litedram/frontend/wishbone.py | 16:10 |
tpb | Title: litedram/wishbone.py at master · enjoy-digital/litedram · GitHub (at github.com) | 16:10 |
somlo | oh, that's how you get litedram to expose a wishbone port; I thought you're looking for where it hooks into the litex SoC -- but yeah... | 16:14 |
sajattack[m] | yeah, I'll need to do both, so thanks | 16:16 |
sajattack[m] | would anyone have any ideas why when I change my system clock from 50MHz to 100MHz, linux fails to boot | 16:43 |
daveshah | Does memtest pass? | 16:47 |
sajattack[m] | good thought, I'll check | 16:47 |
daveshah | If not, the SDRAM clock phase might need changing | 16:47 |
sajattack[m] | ok | 16:48 |
sajattack[m] | it's phase shifted -10000 for 50MHz, do I just double it or something? | 16:48 |
daveshah | Halve it | 16:49 |
daveshah | I'm assuming 10000=10ns=half cycle at 50MHz | 16:49 |
sajattack[m] | ok | 16:49 |
daveshah | It might need finer tuning than that though, idk | 16:49 |
sajattack[m] | let's find out | 16:49 |
sajattack[m] | yeah, looks like it needs fine tuning | 16:57 |
sajattack[m] | maybe I'll find something in altera and bring it over | 17:01 |
sajattack[m] | the random msiter core I picked out isn't doing any phase shifting for sdram | 17:05 |
sajattack[m] | or maybe it's doing it within the controller rather than the pll | 17:09 |
Claude | this will be my weekend :) first trying to get yosis/nextpnr running on the pi . then maybe some DVI/hdmi fun https://usercontent.irccloud-cdn.com/file/JXlXbYwe/IMG_20200228_175426.jpg | 17:09 |
sajattack[m] | neat | 17:10 |
sajattack[m] | are you bitbanging jtag on the pi or something? | 17:10 |
Claude | Yes that's the plan , openocd on pi gpio | 17:11 |
Claude | Later (probably very very later..) I try myself on a migen/LiteX raspi SMI (parallel bus master peripheral) to some wishbone master | 17:13 |
*** rohitksingh has quit IRC | 17:36 | |
*** m4ssi has quit IRC | 17:39 | |
_florent_ | somlo: the last SDCard i tested with the Nexys4DDR is a SanDisk Ultra 16GB | 17:57 |
_florent_ | Claude: nice! | 17:58 |
sajattack[m] | I can't find a working phase shift for 100mhz | 18:03 |
*** rohitksingh has joined #litex | 18:07 | |
*** lambda has quit IRC | 18:15 | |
*** nrossi has quit IRC | 18:15 | |
_florent_ | sajattack[m]: not sure i tested sdram at this frequency, i would need to do some tests on hardware to help | 18:31 |
sajattack[m] | it tests up to 150MHz on MiSTer | 18:32 |
*** lambda has joined #litex | 18:32 | |
_florent_ | do you have a link to the sdram controller used on MiSTer? | 18:32 |
sajattack[m] | it varies by core I think | 18:33 |
sajattack[m] | here's their memtest https://github.com/mister-devel/memtest_mister | 18:37 |
tpb | Title: GitHub - MiSTer-devel/MemTest_MiSTer (at github.com) | 18:37 |
*** nrossi has joined #litex | 18:37 | |
_florent_ | i just tested 100MHz on the De0Nano and got it working with this: https://hastebin.com/apovofubof.rb | 18:42 |
sajattack[m] | oh? two phase shift values? | 18:43 |
sajattack[m] | oh it's a diff | 18:44 |
sajattack[m] | haha | 18:44 |
sajattack[m] | yeah I tried -5000 already | 18:44 |
* sajattack[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/KedFrEgmyjUabMjUMnorpEKH > | 18:49 | |
sajattack[m] | the only numbers I've been able to change are the bus fail and the addr, got up to 64 bus fails, and up to 8192 addr fails | 18:51 |
sajattack[m] | tried probably 20 values in the range 3000-10000 | 18:51 |
sajattack[m] | many in the range 4000-6000 | 18:52 |
_florent_ | with the chip you use (AS4C16M16) CL=2 is fine for clk up to 83MHz, so you should probably test with CL=3 | 18:55 |
_florent_ | https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/gensdrphy.py#L27 | 18:56 |
tpb | Title: litedram/gensdrphy.py at master · enjoy-digital/litedram · GitHub (at github.com) | 18:56 |
_florent_ | set cl parameter to 3 | 18:56 |
sajattack[m] | oh | 18:56 |
*** rohitksingh has quit IRC | 19:02 | |
sajattack[m] | that got it down to 8184 addr fails | 19:03 |
*** rohitksingh has joined #litex | 19:04 | |
sajattack[m] | cl=4 got it to 8154 | 19:10 |
sajattack[m] | but we can't really just keep increasing it eh | 19:11 |
sajattack[m] | do we need to change some other timings too? | 19:15 |
*** rohitksingh has quit IRC | 19:25 | |
*** rohitksingh has joined #litex | 19:51 | |
_florent_ | sajattack[m]: the SDRAM is not supporting CL=4. To investigate, you will have to enable debug: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/sdram.c#L773 | 21:01 |
tpb | Title: litex/sdram.c at master · enjoy-digital/litex · GitHub (at github.com) | 21:01 |
_florent_ | and reduce the test size: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/sdram.c#L769 | 21:01 |
tpb | Title: litex/sdram.c at master · enjoy-digital/litex · GitHub (at github.com) | 21:01 |
*** rohitksingh has quit IRC | 21:04 | |
*** rohitksingh has joined #litex | 21:52 | |
*** _whitelogger has quit IRC | 22:01 | |
*** _whitelogger has joined #litex | 22:04 | |
*** rohitksingh has quit IRC | 23:30 | |
*** rohitksingh has joined #litex | 23:32 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!