programmerjake | as I mentioned on the github issue, I got microwatt to work now, thanks msh for all the heavy lifting! | 04:56 |
---|---|---|
programmerjake | https://github.com/antonblanchard/microwatt/pull/347#issuecomment-1058800570 | 04:56 |
msh | programmerjake: it works with litedram too and with linux on the usb uart - just the litedram boot code is set to use uart0 rather than the usb uart. I'll reply in github with more details | 04:59 |
programmerjake | k | 05:02 |
programmerjake | I ported my 3D maze game from my rv32 core to microwatt on the OrangeCrab: https://github.com/antonblanchard/microwatt/pull/354 | 11:54 |
programmerjake | I added a screenshot: https://github.com/antonblanchard/microwatt/pull/354 | 12:09 |
programmerjake | https://user-images.githubusercontent.com/4584340/156760782-7b2e75be-1e93-48b0-a3c0-68f08a28afda.png | 12:10 |
programmerjake | lkcl if you let me write to libre-soc's microwatt.git, I can push my branch there too. | 12:11 |
programmerjake | oh, btw, thx msh for writing out how to run linux on microwatt! i'll try that out soon, maybe next week | 12:37 |
msh | programmerjake: cool, be good to hear how it goes. if you hit memtest issues (some boards hit that?) there's a workaround telling the dram to use cl=7 rather than cl=6 timing. a bit of a bodge but seems to work. | 13:34 |
msh | flash looking 3d maze, will give it a go some time | 13:35 |
lkcl | programmerjake, 1 sec | 13:56 |
lkcl | msh, yay! | 13:56 |
lkcl | programmerjake, done | 14:00 |
lkcl | msh: yeahh these DRAM ICs have a datasheet minimum speed of 200 mhz DDR (so a 100 mhz clock) | 14:02 |
lkcl | it turns out that manufacturing tolerances actually allow for around 48 to 55 mhz | 14:02 |
lkcl | but you are reaaally pushing your luck :) | 14:02 |
lkcl | ghostmansd[m], just going over the patches for binutils, they look pretty reasonable | 20:46 |
lkcl | as in, i recognise the similra morass of if-statements from when i did the python version :) | 20:47 |
lkcl | this one's unfortunate https://git.libre-soc.org/?p=binutils-gdb.git;a=commitdiff;h=0313d112ed7d5dfaa3cec052b5c4519ef92966a6 | 20:51 |
lkcl | i wonder if there's a better way to do it, by adding a CSV column from sv_analysis.py | 20:52 |
ghostmansd[m] | Yep. Some stuff still looks kinda different compared to Python, but for some parts I couldn't resist, especially those with callbacks. | 20:52 |
lkcl | heh | 20:53 |
ghostmansd[m] | We actually can substitute all is_wahtever stuff to "constants" | 20:53 |
ghostmansd[m] | But I think this would be an overkill for now, also, this would occupy some bits | 20:53 |
lkcl | +/* Opcode is only supported by SVP64 extensions (LibreSOC architecture). */ | 20:54 |
lkcl | +#define PPC_OPCODE_SVP64 0x800000000000ull | 20:54 |
ghostmansd[m] | (not critical but, since we can deduce these anyway, why bother) | 20:54 |
lkcl | can you make that "Draft SVP64 extensions"? | 20:54 |
ghostmansd[m] | Sure | 20:54 |
lkcl | to make it clear to people it's not yet been submitted to the OPF ISA WG yet? | 20:54 |
ghostmansd[m] | Maybe you also would like to rename -m switch? | 20:54 |
ghostmansd[m] | We issue it by -mlibresoc | 20:55 |
lkcl | if we give the impression that we're over-and-above the OPF, we're in trouble :) | 20:55 |
ghostmansd[m] | Exactly like they use -mpower9 | 20:55 |
lkcl | mmm i wondered about that, but a little free advertising never hurt anyone lol | 20:55 |
ghostmansd[m] | Lol | 20:55 |
ghostmansd[m] | Ok then :-) | 20:55 |
lkcl | i'm sure there should be a better way than using separate explicit string-matching against a bunch of mnemonics to identify LDs, STs, and Branches | 20:58 |
lkcl | oh btw at some point the Condition Register mnemonics need their own set, too | 20:58 |
lkcl | but i haven't added any support for CR-based svp64 instructions at all, yet | 20:58 |
lkcl | in Power ISA 3.1 with 64-bit Prefixes, they have some bits which tell you: | 20:59 |
lkcl | "this prefix is of type SLS" | 20:59 |
lkcl | "this prefix is of type MLSS" | 20:59 |
lkcl | etc. | 20:59 |
lkcl | etc. | 20:59 |
lkcl | each type can *only* be applied to certain instructions | 20:59 |
lkcl | which makes you think, "oink, that's totally redundant, wtf??" | 21:00 |
lkcl | but then you realise, "ah. if you don't have those prefix-types, you have to do the same horrible trick we're doing with is-this-a-LD-operation, ..." | 21:00 |
lkcl | but there isn't enough space, we need the entire 24-bits for SVP64, there's no room for a 2-bit "type-identifier" | 21:02 |
lkcl | "type is LD/ST" | 21:02 |
lkcl | "type is BC" | 21:02 |
lkcl | "type is CR" | 21:02 |
lkcl | i know why IBM added the prefix-identifier: it makes Multi-Issue OoO Decode/Execution way, *way* faster | 21:03 |
lkcl | because you can just look at those bits and go "yep that's of type MLSS let's farm it *right now* to the MLSS pipeline" | 21:03 |
lkcl | whereas - unfortunately - we'll have to go "hang on this is SVP64 errrr let's do a full decode on the next 32-bits to work out whether it's a LD, ST, BC, or CR op" | 21:04 |
lkcl | sigh | 21:04 |
lkcl | and you're running into a similar issue in binutils (with the string-matching) just as i did in the python-version :) | 21:05 |
lkcl | wark-wark | 21:05 |
lkcl | programmerjake, the 3d maze game port is pretty cool. does it fit into an 8k SRAM? | 21:05 |
lkcl | (similar size to hello_world.bin or is it more like 24k micro_python.bin?) | 21:06 |
lkcl | just wondering because if it is really small it can fit into FPGA BRAM | 21:08 |
lkcl | which makes testing easier | 21:08 |
programmerjake | iirc it already uses the fpga's bram...it uses 256kB of ram...the ecp5 85 has around 3Mbit of bram | 21:17 |
programmerjake | i originally designed the code to fit in 32kB of bram, since that was about half of the available space on the fpga i used for my rv32 core...the other half was used for video stuff (fonts and text framebuffer) | 21:18 |
programmerjake | i used 256kB cuz it has that much available and cuz that way you basically don't have to worry about your program running out | 21:19 |
programmerjake | 256k == 2^18 iirc. i specified it using `MEMORY_SIZE=$((1<<18))` | 21:21 |
programmerjake | if you change the linker script it might fit in 8kB... | 21:23 |
programmerjake | i just checked...it has a little over 8kB code (first 4k used by boot/interrupts, could probably be shrunk) and 0x630 bytes of ram not counting stack (idk if something uses malloc)...so it probably won't fit in 8kB but could easily fit in 16kB ram | 21:30 |
programmerjake | 0x630 bytes .data/.rodata/.bss | 21:31 |
programmerjake | 0x2b0 of which is .eh_frame, so maybe that can be dropped....i know i passed -fno-exceptions tho | 21:32 |
*** alMalsamo is now known as lumberjack123 | 23:16 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!