Sunday, 2023-05-14

programmerjakeghostmansd: because one ISACaller instance is shared between several case_* tests to skip having to instantiate it as many times, we need the trace file to be reset-able so each case_* function (actually each self.add_case invocation) can have a separate log file so they're not all mixed together06:17
programmerjakeso just passing it into ISACaller's constructor is insufficient06:18
lkclprogrammerjake, good point.  hmmm hmm let me see...07:33
lkclno it does actually instantiate an entirely new ISA() instance - see openpower/test/runner.py07:36
lkclso in *runner.py* a different filename (if one is needed) needs to be passed in and/or constructed...07:38
lkclbut this is *not* ghostmansd's task07:39
lkclghostmansd, you can leave the insnlog parameter to default to None and for there to be no action taken if it is None.07:40
lkclno creating a tmp file07:40
lkclno creating a default log file07:40
lkclnothing07:40
lkclthe primary initial goal is to do the minimum work with the least fuss.  if you have to create examples by hand that's perfectly valid07:43
lkclcan i suggest not touching ISACaller *at all* for now and simply working with stand-alone unit tests that you create by hand?07:43
lkclit should be obvious what to do but if you make a start (put some stubs with even just one instruction in it, even if it's "TODO" or just plain rong) i can help add better examples07:44
lkcldon't even get ISACaller involved in *producing* the output at this stage, other than running it once to drop some examples into /tmp/insnlog.txt07:45
lkclprogrammerjake, you see how i *reduced* ghostmansd's workload instead of increased it, as you did?07:45
lkclyou increased the workload even before he had something working, which is the worst thing to do when someone is completely unfamiliar with the code07:46
lkclhe needs a "first success"07:47
lkclthat gains confidence (and also has a known-good start point)07:47
lkcland *then* the incremental steps can begin to improve07:47
lkclat which point yes raising the issue of case_* tests can be discussed07:47
lkclbut not before07:47
lkclsee how that works?07:48
programmerjakeah, yeah, i didn't refresh my memory of SimRunner and thought it made one ISA per-instance rather than per-run_test call08:01
programmerjakemostly cuz i recall you saying that all the case_* functions share simulator state08:02
programmerjakeor something08:02
lkclTestIssuer.09:05
programmerjakeSimRunner https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/runner.py;h=4068d1ab10c117f348ff0dc8eca62ed7c276fd59;hb=HEAD#l4109:08
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC10:53
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.123> has joined #libre-soc10:54
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.123> has quit IRC14:00
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has joined #libre-soc14:20
lkclok here we go. LD/ST to remove elwidth_src and just use elwidth, always for RB on Indexed, not the data-width. which leaves something to do for elwidth on Immediate LDs16:26
lkclwe'll think of something16:27
lkclnope. can't do it. not ready to commit to that level of changes16:36
lkclbut i can update LD/ST-immediate-update to EXTRA316:39
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has quit IRC16:49
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has joined #libre-soc16:49
lkclarse.  ldu 4, 0(4) is "invalid" when in fact it's precisely and exactly what is needed16:57
lkclit's actually *not* wrong16:58
lkclbecause the *prefix* is adding 1 to RA.16:59
lkclfrick16:59
lkclmeans it's necessary to perform manual decoding using power_insndb for now16:59
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has quit IRC17:01
lkclthis is a job for svp64asm17:09
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.166.180> has joined #libre-soc17:14
lkclgaah took a while to find the syntax for pysvp64asm17:23
lkclwithout SILENCELOG17:23
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=95017:23
lkclghostmansd, what's with the pcode of 200+ blank lines? that's new :)17:29
lkcli got as far as i can for now17:40
lkcl    RA (vector)17:41
lkcl        000000000000017:41
lkcl        43, 44, 45, 46, 47, 22, 23, 22, 23, 22, 23, 22, 2317:41
lkcl        extra3<generator object ExtendableOperand.extra_idx at 0x7f7ce3f1c570>17:41
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=108417:41
ghostmansd[m]lkcl, probably some "".join needed :-)19:08
ghostmansd[m]We rarely check the verbose disassembly19:08
ghostmansd[m]I'll fix it19:08
ghostmansd[m]For blank pcode... Which insn do you check? I need some repro. Or is it any? :-)19:08
ghostmansd[m]Might as well be any, I checked verbose asm long ago...19:09
ghostmansdWhat is the relationship between TestRunner and SimRunner?21:01
ghostmansdI have a feeling that runner.py is copied from test_runner.py...21:01
ghostmansdlkcl, nevermind the questions above, already found you had issues with "sv.ldu/ff=~RC1/vli *16, 0(*17)"21:06
ghostmansdfixed extra prints. Yet another ugly place in insndb which desperately begs for refactoring. What I did is actually a bit hackish, this needs a better resolution. Currently an algorithm which maps extra index to extra leaves much to be desired.21:19
ghostmansdI don't have time to involve with such refactoring, though: it needs too much time.21:20
ghostmansdAs for how the pcode is printed... Well, I simply get what ISA gives us.21:20
ghostmansdI'm calling ISA.__iter__, which resolves to `yield from self.instr.items()`.21:23
ghostmansdI'm thinking of cleaning this bit.21:23
ghostmansdBasically we have `(['', '', ...] + ['EA <- (RA) + EXTS(DS || 0b00)', 'RT <- MEM(EA, 8)', 'RA <- EA', ''])` there.21:24
ghostmansdI'll filter out empty strings.21:24
ghostmansdSince changes I introduced should affect only verbose disassembly, I pushed them into master.21:27
ghostmansdlkcl, that's how it looks in new revision: https://pastebin.com/HP0yugjV21:28
lkclghostmansd, that's "working" now - RT is incorrectly marked as scalar and RA is incorrectly marked as zero but it no longer has the generator in the middle22:20
lkclTestRunner does not exist22:20
lkclif you mean "TestRunnerBase" then you should be able to see that SimRunner is added to a list if there is an input boolean "run_sim"22:23
lkclfor the purposes of the model-running there is *absolutely no need* for you to know anything about that, in any way shape or form.22:24
lkclif you are believing that it is necessary for you to know about what goes on there as a critical hard dependency of the model, this is false and you are taking up valuable time investigating irrelevant code.22:24
lkclif you are simply curious: TestRunnerBase runs "things" - in lock-step - and compares the results.22:25
lkclthere are presently up to three "things" that are compared22:25
lkclSimRUnner22:25
lkclHDLRUnner22:25
lkclExpectedState22:26
lkclmore will be added.22:26
lkclthese include22:26
lkclMicrowattRunner22:26
lkclQemuRunner22:26
lkclCavatoolsRunner22:26
lkclyou should be able to infer what is going, from that and the comments22:26
lkclbut again, really important: knowing that does not help you *at all* in any way shape or form with the model inorder.py22:27
lkclwhich is an entirely *stand-alone* program that does *nothing* other than read in its input file and writes out a markdown table22:28
lkclback to https://bugs.libre-soc.org/show_bug.cgi?id=108422:29
lkclthis looks ok22:30
lkcl    RT (vector)22:30
lkcl        001000022:30
lkcl        38, 39, 40, 41, 42, 19, 2022:30
lkcl        extra3[0]22:30
lkclit's 7-bit long22:31
lkclif i put the input "sv.ldu/ff=~RC1/vli *18, 0(*17)"22:31
lkclRT goes up correctly22:31
lkcl    RT (vector)22:31
lkcl        001001022:31
lkcl        38, 39, 40, 41, 42, 19, 2022:31
lkcl        extra3[0]22:31
lkclhowever RA is *13* bits long!22:32
lkcl    RA (vector)22:32
lkcl        000000000000022:32
lkcl        43, 44, 45, 46, 47, 22, 23, 22, 23, 22, 23, 22, 2322:32
lkcl        extra3[1]22:32
lkclrepeated bits 22,23 22,23 22,23 four times22:32
lkclit would appear (for a start) that pysvp64asm is not updating RA22:35
lkcli'll investigate that22:35
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc23:25

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