Wednesday, 2020-01-29

*** tpb has joined #litex00:00
*** CarlFK has quit IRC00:54
*** rohitksingh has quit IRC01:15
*** atommann1 has joined #litex03:23
*** rohitksingh has joined #litex03:42
*** rohitksingh has quit IRC04:03
*** freemint has quit IRC05:18
*** loxodes has joined #litex05:45
*** sajattack has quit IRC06:21
*** sajattack has joined #litex06:21
sajattackyo07:24
_florent_sajattack: hi07:27
sajattackso how do I get to the bios prompt?07:27
_florent_when you load your bitstream, you should get the bios prompt07:28
sajattackit's hard to tell because I don't have an ftdi cable, I've got an arduino hooked up reading the uart07:28
sajattackit only seems to echo my characters07:29
_florent_in the pull request, you are saying that you have echo, but you should also have the LiteX bios prompt07:29
sajattackok I'll try to check07:29
_florent_if you send enter, to you get back "litex>"07:29
sajattackis enter the same as \n07:30
_florent_yes, try both \n and \r07:30
sajattackok07:31
sajattackjust a minute07:35
sajattackdoesn't look like it07:37
sajattackI only loaded gateware, not software07:37
sajattackor firmware or w/e07:38
sajattackI'm not getting an echo anymore either07:39
sajattackmaybe I'll go back a few commits07:47
*** m4ssi has joined #litex07:59
*** kgugala has joined #litex08:06
*** CarlFK has joined #litex08:12
sajattackok got it08:13
sajattackwiring pebkac08:13
sajattackb'hello\n\rCommand not found\n\r\x1b[92;1mlitex\x1b[0m> '08:13
daveshahLooks like your terminal isn't a VT100 :)08:14
sajattackit's picocom08:15
sajattackplus circuitpython08:15
sajattackjank hax because no ftdi cable08:15
sajattackhttps://termbin.com/9mbv08:20
sajattackif it works it works, right?08:22
sajattacklet me squash and stuff08:22
sajattackshould be good08:26
sajattackcan you guys help me get to linux-on-litex next?08:27
_florent_sajattack: the bios seems indeed to be working, but you setup does not seem that convenient to use :)08:32
sajattackindeed08:33
sajattackI at least converted the bytes to ascii now08:33
sajattackso it's a little better08:33
sajattackmaybe I can make it a bit more interactive too08:34
_florent_to use linux-on-litex-vexrisc, you need a 32MB memory and on the de10 nano, the DDR3 seems connected to the HPS, so not sure that's easy to access to it from the fabric08:37
_florent_the de10 nano is the board used by Mister, and there are SDRAM extension available that you could use: https://github.com/MiSTer-devel/Main_MiSTer/wiki/SDRAM-Board08:37
tpbTitle: SDRAM Board · MiSTer-devel/Main_MiSTer Wiki · GitHub (at github.com)08:37
sajattackyeah I have one of those08:38
sajattackbut I didn't think it was right to stick an optional addon board in the board def08:39
_florent_you could do it the way we did it on the ECP5 Versa when we were using the SDRAM extension: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/official/platforms/versa_ecp5.py#L147-L16508:41
tpbTitle: litex-boards/versa_ecp5.py at master · litex-hub/litex-boards · GitHub (at github.com)08:41
_florent_https://pbs.twimg.com/media/DrQ7ATbWwAAnlf1.jpg08:42
sajattackjust reuse the pins?08:44
_florent_yes, you could probably find that in the MiSTer project08:45
sajattackok will do08:45
_florent_then you will need to see if the SDRAM module is already defined in LiteDRAM: https://github.com/enjoy-digital/litedram/blob/master/litedram/modules.py#L126-L22108:46
tpbTitle: litedram/modules.py at master · enjoy-digital/litedram · GitHub (at github.com)08:46
_florent_if not, we could add it08:47
sajattackkk, just doing some circuitpython coding for the last few minutes to have more of an interactive prompt08:47
sajattackmuch better https://termbin.com/z3mo08:48
_florent_for the target with the SDRAM integrated, you could look at the de0nano.py: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/official/targets/de0nano.py08:48
tpbTitle: litex-boards/de0nano.py at master · litex-hub/litex-boards · GitHub (at github.com)08:48
sajattackthe sdram chips on mister are usually alliance or winbond08:49
sajattackI have winbond08:49
sajattackbut they're compatible with eachother I think08:49
_florent_yes probably, but what's the part number?08:50
sajattacklet me check08:50
sajattackAlliance Memory08:50
sajattackAS4C16M16SA-6TCN or Winbond W9825G6KH-608:50
sajattackfor 32mb08:50
sajattackthey have 128mb boards too08:50
_florent_ok, so it's already there: https://github.com/enjoy-digital/litedram/blob/master/litedram/modules.py#L17208:52
tpbTitle: litedram/modules.py at master · enjoy-digital/litedram · GitHub (at github.com)08:52
sajattackyay08:52
sajattackoh shit I think I typed this in backwards because quartus09:01
sajattackso how does this work if they don't have the sdram module?09:12
sajattackI'm looking at versa_ecp5 and you're using SoCSDRAM09:12
sajattack_florent_: ^09:20
sajattackI guess I add a flag like you do with ethernet09:27
*** m4ssi has quit IRC09:33
sajattackanyone there?10:25
acathlahi sajattack10:26
sajattackif I push some weird WIP code can you take a look at it and tell me how to do it properly?10:27
sajattackI'm getting this error and also I'm committing some python/migen crimes migen.fhdl.module.FinalizeError: CPU needs "rom" to be defined as memory or linker region10:28
acathlasajattack, you probably need to define a rom region in your new flash definition10:31
sajattackwhat flash definition?10:32
acathlaah, you were talking only about sdram, I didn't backlog enough10:32
acathlaanyway, your SoC need to have a rom region where you put your bios/bootloader/code to boot to, even if it's in SDRAM.10:34
acathlaI guess, i'm learning too...10:34
sajattackwhere do I define that?10:35
sajattackI checked existing boards platform and target files and didn't see anything with "rom" other than "from" in imports10:35
sajattackmaybe I'll just try running linux-with-litex as the builder now10:35
sajattackthat doesn't work for another reason10:40
acathlaI'm only using small FPGAs yet, without big SDRAM so it's a bit different. Here is the example I'm using : https://github.com/kekiefer/tinyfpga-litex/blob/master/tinyfpga_litex.py10:43
tpbTitle: tinyfpga-litex/tinyfpga_litex.py at master · kekiefer/tinyfpga-litex · GitHub (at github.com)10:43
sajattackit looks like that's a step up from where I'm working10:44
sajattackI'm working on a board def10:44
acathlaBut the concept is sadly to read the source with very few comments in it and to try to understnd how it works, until the docs grow...10:44
sajattackyeah10:44
sajattackoh I think I figured it out10:48
*** freemint has joined #litex10:58
sajattacknew problem lol10:58
sajattackNameError: name 'fmt' is not defined10:59
*** freemint has quit IRC11:02
*** m4ssi has joined #litex11:23
_florent_sajattack: sorry i was away, i can have a look if you share your current platform/target files11:26
*** rohitksingh has joined #litex14:26
somloxobs: https://pastebin.com/DA1KWiyk (on top of the current "common.h")14:35
tpbTitle: [Diff] diff --git a/litex/soc/software/include/hw/common.h b/litex/soc/software/include - Pastebin.com (at pastebin.com)14:35
somloxobs: then, restore generated/csr.h to use csr_readl() and csr_writel() with shifts14:35
somlowould that work for you?14:35
xobssomlo: I think it would, yes.  Thank you!14:36
somlocool, i'll cook something up for export.py to do that, then...14:37
somloxobs: just saw your last reply on github, so question re. naming convention: stick with readl/writel (as in, "long")? Or rather go with csr_read_sub[reg]() and csr_write_sub[reg]() instead? These are after all subregister accessors, not full-CSR ones... :)14:42
xobsSure, you can do csr_x_sub().14:50
xobsI just followed the Linux convention.  I tend to think of CSRs as being 8-bit registers with contents spread across multiple fields, but I'm not sure anyone else does that.14:50
xobsComes from working with odd-sized peripherals.  Like the i.MX6, which had an 8-bit PWM IP core taken straight from a Coldfire.14:51
xobsSo `csr_readl()` and `csr_writel()` made sense to me.  But I definitely see the confusion, so for this particular instance `csr_x_sub()` could work nicely!14:51
somloI'm used to MMIO registers of 32 and 64 bits, so my instinct is to encapsulate the scatter/gather "striping" of the underlying 8-bit limitation as much as possible :)14:53
somloparticularly since LiteX now supports 32bit subregisters, and might support 64bits with a bit more cleanup...14:54
somlook, so csr_x_sub() it is, then -- thanks for your patience :)14:55
xobsI think I'll be moving to 32-bit CSRs, because it makes the software simpler and doesn't impact performance too much.  It makes no difference with Fomu, and seems fine with Betrusted, too.14:59
*** rohitksingh has quit IRC15:14
*** rohitksingh has joined #litex15:15
*** rohitksingh has quit IRC15:34
*** rohitksingh has joined #litex15:38
somloxobs, _florent_: https://github.com/enjoy-digital/litex/pull/36616:03
tpbTitle: software, integration/export: (re-)expose CSR subregister accessors by gsomlo · Pull Request #366 · enjoy-digital/litex · GitHub (at github.com)16:03
*** rohitksingh has quit IRC16:41
*** m4ssi has quit IRC17:27
*** rohitksingh has joined #litex17:49
*** atommann1 has left #litex18:07
*** rohitksingh has quit IRC18:47
*** rohitksingh has joined #litex18:55
*** rohitksingh has quit IRC19:25
*** rohitksingh has joined #litex19:25
*** rohitksingh has quit IRC19:42
*** rohitksingh has joined #litex19:48
*** rohitksingh has quit IRC20:06
*** rohitksingh has joined #litex20:07
*** rohitksingh has quit IRC20:35
*** rohitksingh has joined #litex21:04
*** freemint has joined #litex21:40
sajattack_florent_: shared22:01
sajattackthe TODOs and the fmt error are what I'm struggling with22:03
*** rohitksingh has quit IRC22:15
*** rohitksingh has joined #litex22:25
*** rohitksingh has quit IRC22:54
futarisIRCcloudhttps://twitter.com/chisel_lang/status/1222598277268267008?s=1923:01
futarisIRCcloudCCC = Chisel Community Conference ?23:04
sajattackhow do I load a risc-v program to SoCCore?23:20
sajattacksfl?23:22
sajattackthis I guess https://github.com/enjoy-digital/litex/blob/master/litex/tools/litex_term.py23:26
tpbTitle: litex/litex_term.py at master · enjoy-digital/litex · GitHub (at github.com)23:26
sajattackI really need proper ftdi lol23:27
*** freemint has quit IRC23:41

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!