Wednesday, 2022-08-10

Veera[m]lkcl:  Hi, regarding (Santhosh) and coriolis2: Query: can coriolis2 setup run on 8GB RAM laptop? Can PPC64EL Talos be used for setup? I saws coriolis2 page; it uses X Display - so perhaps won't work under ssh(Talos)?06:19
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC06:35
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc06:35
programmerjakei don't know about just setup, but iirc coriolis2 needs a lot more ram if you want to use it on ls180, in the range of 32-64gb06:43
programmerjakealso, you can forward X through ssh06:44
programmerjakeif it needs some local stuff, maybe use xnest on the talos and forward the xnest through ssh to your computer and have coriolis connect to xnest06:45
programmerjaketry just ssh first, xnest will likely be complex to setup06:46
programmerjakehttps://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely/12772#1277206:49
Veera[m]programmerjake:  Ah 32-64GB!!. I will try X forwarding through ssh!06:50
Veera[m]Thanks for info!06:50
programmerjakeyw06:51
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@broadband-188-32-220-156.ip.moscow.rt.ru> has quit IRC09:16
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.55.169> has joined #libre-soc09:16
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.55.169> has quit IRC11:57
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@broadband-188-32-220-156.ip.moscow.rt.ru> has joined #libre-soc11:57
alethkitHow difficult would it be to port the simple-v specification to risc-v? Most of the toolchains I'm intending to use don't seem to take OpenPOWER into account. (I only need to port it by myself for testing purposes)14:10
ghostmansd|2lkcl, what should be the rationale for generating instruction with dot (Rc'ed one)?16:37
*** ghostmansd|2 is now known as ghostmansd16:37
ghostmansdI have the following code now:16:38
ghostmansdnames = tuple(ppc.names)16:38
ghostmansdif ppc.rc is _RC.ONE: names = tuple(map(lambda name: f"{name}.", names))16:38
ghostmansdelif ppc.rc is _RC.RC: names += tuple(map(lambda name: f"{name}.", names))16:38
ghostmansdIs it correct?16:38
ghostmansdDoesn't look like this... I think that RC.ONE should not replace names.16:39
ghostmansdAnd only if instruction is marked with RC.RC we should add its version with dot.16:40
ghostmansdAnd then we would check the exact Rc field position via fields.text.16:41
lkcllet me put it another way: you _shouldn't_ be using the csv column RC.ONE/RC, should instead be using the information from the markdown files (because that comes directly from the actual spec)17:05
lkclbut the csv column _should_ suffice, as you describe17:06
lkclalethkit, i did actually do an early version 2 years ago, the spike simulator should still be perfectly functional17:07
lkclhttps://git.libre-soc.org/?p=riscv-isa-sim.git;a=shortlog;h=refs/heads/sv17:07
lkclyou obviously also need the corresponding tests as well https://git.libre-soc.org/?p=riscv-tests.git;a=tree;h=refs/heads/sv;hb=refs/heads/sv17:07
lkclbut please bear in mind, the RISC-V Foundation Founders were so unbelievably rude and arrogant that there's just no way in seven hells we'll ever go back to it17:08
lkclplus, from a technical perspective, it looked like we seriously dodged a bullet.  the best independent technical assessment i've seen is here:17:09
lkclhttps://news.ycombinator.com/item?id=2445931417:09
lkclwhich should tell you everything you need to know.17:09
* lkcl back to checking csv files for ghostmansd....17:10
lkclstwcx - that's one of them.17:11
lkclopenpower/isatables/minor_31.csv:0b0010010110,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,CR0,0,0,ZERO,0,is4B,0,0,0,1,0,0,ONE,0,1,stwcx,X17:11
lkcland sthcx17:11
lkclthey're actually "stwcx." and "sthcx."17:11
lkclyou *never* get just "stwcx" or "sthcx"17:12
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/minor_31.csv;h=5cd8494d3546711bdbdad1b6aa93264f4439b23e;hb=08088da82e27a632f7c4c606f1ed2ea3c64658ca#l18917:12
lkclline 18917:12
lkclerr... err... where the frickin frick's the corresponding mdwn?? oink??17:13
lkclgreeeeat, i added them to the HDL but not the damn simulator.  greeeeat.17:15
lkclok so CSV files, RC column it is.17:15
lkclghostmansd, payment date of 09aug2022 is listed for RFPs now. which to an EU account should be pretty much immediate.17:24
lkclif it is then do update the "paid=....." field.17:24
ghostmansdLuke, I'll check for payments with the account owner, thanks!17:25
ghostmansdAbout RC.ONE, so anything marked as RC.ONE is always with dot and there's no undotted version, right?17:26
lkclghostmansd, correct.17:28
ghostmansdOK thanks!17:28
* lkcl salutes :)17:28
ghostmansdI've updated the code locally, we're now posses the fields.text information, too...17:28
lkclw00t17:29
lkclsmall steps17:29
ghostmansd...and also I adopted the instruction generator (the one which generates from fields) to the form that it can pass split fields17:29
ghostmansdlike SX,S (28,6:10)17:29
ghostmansdI've now returned to opcode property calculation :-)17:30
alethkitlkcl: Ooof. I just need the ISA to make a PoC, since I assume porting should not be *that* hard.17:52
*** tplaten <tplaten!~isengaara@55d4b47b.access.ecotel.net> has joined #libre-soc18:06
lkclghostmansd, niiice18:11
lkclalethkit, that's what i'd already done.  it was called Simple-V for RISC-V and i released version 0.618:12
lkcl3 years ago18:12
lkclSimple-V *as a concept* is applicable to any Scalar ISA18:12
lkclyou could drop it on top of the scalar x86 instructions if you really felt so inclined18:13
lkcl(and would end up with something a hell of a lot better than what Intel has done with AVX-NNN)18:13
lkclwe thought RISC-V was going to be great, and a truly Open ISA, so were delighted to find it18:14
lkcland started investing a lot of time into the SV-for-RISC-V Spec18:14
lkclsufficient for me to write a full simulator18:14
lkcl(links i gave you, above)18:14
lkclit works.18:14
lkclit actually works.18:14
lkcli wrote hundreds of unit tests.18:14
lkclthey all work.18:14
lkclpredication, element-width-overrides, everything.18:15
lkcleven twin-predication works and has unit tests demonstrating that it works18:15
lkclnow18:16
lkclwhen you say "assume it should not be hard"... :)18:16
lkclit's actually deceptively challenging.18:16
lkclto give you some idea: we converted to Power ISA *two years* ago and i am still completing adding of features to the Simple-V-for-Power-ISA Simulator18:17
lkclthe development of the actual Specification itself is the majority of the work18:18
lkcl(actually writing the words surrounding the bit-format)18:18
lkclbut then that's no good if you haven't actually got a way to write assembler and actually run it.18:19
lkclconsequently *in tandem* with writing the spec, i also had to write the Simulator *of* that spec.18:19
lkclthen there are the unit tests18:19
lkclof which there are now several thousand18:19
lkclbut yes18:19
lkcl*if you have the spec*18:19
lkclthen actually, writing the Simulator was extremely quick.18:20
lkcli think based on spike i had the first Simple-V instructions executing in a loop in under 8 days18:20
lkclhttps://git.libre-soc.org/?p=riscv-isa-sim.git;a=shortlog;h=refs/heads/sv;pg=318:21
lkclyou can see i started around 2018-09-2418:22
lkcland the first unit test was 2018-10-0118:24
lkclhttps://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff;h=5a43c689b5440871297f7f49580677eb398d16f418:24
lkclso yes, a week18:24
lkcl200+ commits later i had everything as a POC up and running.... according to a spec that had taken several months to write.18:25
lkclthe issue we had with the Power ISA was that there really was - still is - no suitable program-order-simulator that was "up-to-scratch"18:28
ghostmansdIt's interesting that addic and addic. have different major opcode.18:28
ghostmansdOops, sorry, didn't see there's another topic raised.18:29
ghostmansdPlease excuse me for interruption, had my chat scrolled.18:29
lkcli never knew that.  that goes some way to explain why there is such major opcode pressure.18:29
lkclghostmansd, no problem18:29
ghostmansd12,ALU,OP_ADD,RA,CONST_SI,NONE,RT,NONE,NONE,0,0,ZERO,1,NONE,0,0,0,0,0,0,NONE,0,0,addic,D, 13,ALU,OP_ADD,RA,CONST_SI,NONE,RT,NONE,CR0,0,0,ZERO,1,NONE,0,0,0,0,0,0,ONE,0,0,addic.,D,12,ALU,OP_ADD,RA,CONST_SI,NONE,RT,NONE,NONE,0,0,ZERO,1,NONE,0,0,0,0,0,0,NONE,0,0,addic,D, 13,ALU,OP_ADD,RA,CONST_SI,NONE,RT,NONE,CR0,0,0,ZERO,1,NONE,0,0,0,0,0,0,ONE,0,0,addic.,D,12,ALU,OP_ADD,RA,CONST_SI,NONE,RT,NONE,NONE,0,0,ZERO,1,NONE,0,0,0,0,0,18:29
ghostmansd0,NONE,0,0,addic,D,18:29
ghostmansd13,ALU,OP_ADD,RA,CONST_SI,NONE,RT,NONE,CR0,0,0,ZERO,1,NONE,0,0,0,0,0,0,ONE,0,0,addic.,D,18:29
lkcli remember looking at the major opcodes with some dismay and going "holy cow that's a hell of a lot of major opcodes allocated to immediate instructions"18:30
lkclbut they obviously wanted 16-bit immediates not 15-bit immediates18:30
tplatenI'm now having a look at simsoc.fst, it isn't working. Only the clock signals are valid. I expected that to be this way18:31
lkcltplaten, rrright, there's a trick to that18:33
lkcluse fst2vcd to convert it18:33
lkclbefore loading with gtkwave18:33
lkclthe signals will "by inexplicable magic" correctly appear18:33
lkclit is a persistent long-standing bug in gtkwave18:34
lkclghostmansd, do be careful not to drop too many lines at once into libera.chat!  it may end up rate-limiting you :)18:35
* lkcl afk for a while18:36
*** tplaten <tplaten!~isengaara@55d4b47b.access.ecotel.net> has quit IRC18:42
*** tplaten <tplaten!~isengaara@55d4b47b.access.ecotel.net> has joined #libre-soc18:43
tplatensimsoc.vcd is really large, about 18.9 GiB. By contrast simsoc.fst is only 144.5 MiB.18:57
tplatenthe dram_cke goes high at about one 1 us, the dram_ck is valid from there on. But nothing else happens there18:59
programmerjakelkcl: rust foundation survey on what trademark policy everyone wants: https://foundation.rust-lang.org/news/2022-08-09-trademark-policy-review-and-survey/19:03
tplatenI'll be afk for some time, I'll come back later19:04
lkcltplaten, yes. sounds about right.19:19
lkclnow if you run vcd2fst it will shrink again in size but will have "fixed" the bug in gtkwave19:20
tplatenso with future versions of gtkwave fst2vst won't be needed anymore, once it is fixed upstream19:30
lkcltplaten, let's hope so19:31
lkclprogrammerjake, can you take a look at the occurrences where you've repeated arguments in unit tests and replace them with for-loops around self.subTest("some_name_%d" % idx)?19:32
lkclhttps://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/div/experiment/test/test_goldschmidt_div_sqrt.py;h=bf999bd850237387120691f16bcda7eb308e21df;hb=HEAD#l24719:32
lkclall of those can be replaced with "with self.subTest(....)"19:33
lkclif you look at i think test_caller.py or test_runner.py (which handles the results from add_cases) you'll see examples19:33
lkclparallelism of test infrastructure is not a priority19:33
lkcl(and overheats my laptop so i can't risk using it)19:34
lkclbut 200+ lines of identical code with only a function name change and a hard-coded parameter is a priority to clean up, it's what subTest is specifically designed for19:35
programmerjakelkcl: lkcl: no, that's intentional because it allows pytest to run the tests in parallel taking <1/10 as much time on my pc19:37
programmerjakeif it overheats your laptop, just use pytest -n 2 rather than -n 8 or -n auto19:38
programmerjakenose should have a similar option19:38
programmerjakeor, better yet, just put your laptop on a counter or table and let it get hot, intel cpus are designed to be able to run at 99C for extended periods thermal throttling19:40
programmerjakesaves a bunch of time19:41
programmerjakealso takes around 1/4th to 1/8th as much time on our build server, since it is an 8-core amd fx processor19:43
programmerjakeif all the repeated tests are anything more than just calling a common test function with different arguments, let me know -- they should be utterly trivial so you can just scroll past them19:45
programmerjake<1/10 as much time is *very* significant when it takes 5-10min to run rather than having to wait >1hr19:48
programmerjakemakes debugging much easier19:48
lkclprogrammerjake, there has to be a way to deal with that.  it's totally ridiculous to have 200+ lines of repeated code with parameters like that20:04
lkcl(ridiculous => "not ok")20:05
lkcland undocumented20:05
programmerjakei can work on documenting it better, but I really do want the individual function definitions rather than a for loop generating functions, since my ide allows quickly running and (more importantly) debugging unit tests only if the test entry is a method directly defined in the source code20:09
programmerjakedebugging in the ide is waay nicer than trying to use pdb, since it highlights which line its currently on in the editor, as well as allowing setting breakpoints in the editor and a bunch of other useful stuff20:10
lkclit *may* be the case that subTest does actually run in parallel20:11
lkclthen you can add a special file (committed or not committed) which passes the arguments necessary to run only that which you need at a given time20:11
programmerjakeit does not, all it does is mark subsections and catch assertion exceptions20:11
lkcli comment-out unit tests all the time (:%s/def test_/def tst_/g)20:12
lkclif you had done this in one place only i wouldn't pick up on it20:12
lkclit's that you've put it in *dozens* of places, hundreds of lines of code with hard-coded parameters20:12
lkclwe have to find a better (cleaner) way20:13
lkcleven if it means doing batches - QTY 8 tests performing QTY N/8 subTests20:13
programmerjakeif you want to run a specific unit test, you can use unittest's -k option20:14
lkclor work out how to overload subTest to perform parallelism - something20:14
lkcli never bother with that, it pisses me off to type manually down to some insane depth of class bullshit20:14
lkclit irritated me no end to mis-type the name of the test and/or the class20:14
lkclso i quickly learned instead just to do ":%s/def test_/def tst_/g"20:15
programmerjakebut i do get an appreciable speedup beyond 8 tests...i have a 24 thread cpu after all...20:15
lkclwhich i usually have in the command-history20:15
lkclok - let's leave it for now and over time work out how to solve it20:16
lkclthere must be a way, even if it involves dynamic-creation of functions or something mad20:16
lkclneeds more thought20:17
programmerjakei copy/paste test names into my terminal if i need that....though i often just click the run test button (kinda button) that shows up right next to the test function's definition in my ide20:17
lkclbtw the reason i raise it is because i posted the goldschmidtt link on comp.arch20:17
lkclhttps://groups.google.com/g/comp.arch/c/aZQvbjqf2z8/m/-3sjYEJcCAAJ20:17
lkcland i _then_ looked at the unit tests and was embarrassed to see more lines of repeated function calls than actual useful test code20:18
programmerjakealso -k allows just using part of a name and it runs all matching tests20:18
lkclyeah - that's exactly the kind of thing that annoys me about -k options20:19
lkclremember, typing gets extremely painful for me, very frequently.20:19
lkcl(RSI)20:19
lkclbtw we need to put some more RFPs in for you, and re-do some of the ones emailed last month20:20
lkclthey won't get looked at: NLnet is now insanely busy20:20
lkcli'll need to send you the "secret" URLs, for goodness sake don't publish them anywhere online or send them to anyone else20:21
programmerjakek, can you send me them in a private email? i may get around to it today, but maybe it'll have to wait till later...i need more sleep before the meeting...20:24
*** tplaten <tplaten!~isengaara@55d4b47b.access.ecotel.net> has quit IRC20:39
ghostmansdlkcl, good news: FSF finally signed the docs21:04
programmerjakeyay!21:09
ghostmansdtook a fricking eternity21:10
ghostmansdnot surprising considering the political situation but still annoying21:11
ghostmansdlkcl, another good news: the payment arrived, I updated 849 and 88421:22
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC23:25
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc23:27
programmerjakelkcl, idk if you noticed, maybe fill out the survey: https://foundation.rust-lang.org/news/2022-08-09-trademark-policy-review-and-survey/23:28
programmerjakesurvey on what you want the trademark policy to be23:28
programmerjakeghostmansd: attn is defined in spec v3.1b appendix c reserved instructions page 1369:23:42
programmerjake256 Service Processor “Attention”23:42

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