programmerjake | ghostmansd: 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 together | 06:17 |
---|---|---|
programmerjake | so just passing it into ISACaller's constructor is insufficient | 06:18 |
lkcl | programmerjake, good point. hmmm hmm let me see... | 07:33 |
lkcl | no it does actually instantiate an entirely new ISA() instance - see openpower/test/runner.py | 07:36 |
lkcl | so in *runner.py* a different filename (if one is needed) needs to be passed in and/or constructed... | 07:38 |
lkcl | but this is *not* ghostmansd's task | 07:39 |
lkcl | ghostmansd, you can leave the insnlog parameter to default to None and for there to be no action taken if it is None. | 07:40 |
lkcl | no creating a tmp file | 07:40 |
lkcl | no creating a default log file | 07:40 |
lkcl | nothing | 07:40 |
lkcl | the primary initial goal is to do the minimum work with the least fuss. if you have to create examples by hand that's perfectly valid | 07:43 |
lkcl | can i suggest not touching ISACaller *at all* for now and simply working with stand-alone unit tests that you create by hand? | 07:43 |
lkcl | it 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 examples | 07:44 |
lkcl | don't even get ISACaller involved in *producing* the output at this stage, other than running it once to drop some examples into /tmp/insnlog.txt | 07:45 |
lkcl | programmerjake, you see how i *reduced* ghostmansd's workload instead of increased it, as you did? | 07:45 |
lkcl | you increased the workload even before he had something working, which is the worst thing to do when someone is completely unfamiliar with the code | 07:46 |
lkcl | he needs a "first success" | 07:47 |
lkcl | that gains confidence (and also has a known-good start point) | 07:47 |
lkcl | and *then* the incremental steps can begin to improve | 07:47 |
lkcl | at which point yes raising the issue of case_* tests can be discussed | 07:47 |
lkcl | but not before | 07:47 |
lkcl | see how that works? | 07:48 |
programmerjake | ah, yeah, i didn't refresh my memory of SimRunner and thought it made one ISA per-instance rather than per-run_test call | 08:01 |
programmerjake | mostly cuz i recall you saying that all the case_* functions share simulator state | 08:02 |
programmerjake | or something | 08:02 |
lkcl | TestIssuer. | 09:05 |
programmerjake | SimRunner https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/runner.py;h=4068d1ab10c117f348ff0dc8eca62ed7c276fd59;hb=HEAD#l41 | 09:08 |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC | 10:53 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.123> has joined #libre-soc | 10:54 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.123> has quit IRC | 14:00 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has joined #libre-soc | 14:20 | |
lkcl | ok 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 LDs | 16:26 |
lkcl | we'll think of something | 16:27 |
lkcl | nope. can't do it. not ready to commit to that level of changes | 16:36 |
lkcl | but i can update LD/ST-immediate-update to EXTRA3 | 16:39 |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has quit IRC | 16:49 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has joined #libre-soc | 16:49 | |
lkcl | arse. ldu 4, 0(4) is "invalid" when in fact it's precisely and exactly what is needed | 16:57 |
lkcl | it's actually *not* wrong | 16:58 |
lkcl | because the *prefix* is adding 1 to RA. | 16:59 |
lkcl | frick | 16:59 |
lkcl | means it's necessary to perform manual decoding using power_insndb for now | 16:59 |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.43.113> has quit IRC | 17:01 | |
lkcl | this is a job for svp64asm | 17:09 |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.166.180> has joined #libre-soc | 17:14 | |
lkcl | gaah took a while to find the syntax for pysvp64asm | 17:23 |
lkcl | without SILENCELOG | 17:23 |
lkcl | https://bugs.libre-soc.org/show_bug.cgi?id=950 | 17:23 |
lkcl | ghostmansd, what's with the pcode of 200+ blank lines? that's new :) | 17:29 |
lkcl | i got as far as i can for now | 17:40 |
lkcl | RA (vector) | 17:41 |
lkcl | 0000000000000 | 17:41 |
lkcl | 43, 44, 45, 46, 47, 22, 23, 22, 23, 22, 23, 22, 23 | 17:41 |
lkcl | extra3<generator object ExtendableOperand.extra_idx at 0x7f7ce3f1c570> | 17:41 |
lkcl | https://bugs.libre-soc.org/show_bug.cgi?id=1084 | 17:41 |
ghostmansd[m] | lkcl, probably some "".join needed :-) | 19:08 |
ghostmansd[m] | We rarely check the verbose disassembly | 19:08 |
ghostmansd[m] | I'll fix it | 19: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 |
ghostmansd | What is the relationship between TestRunner and SimRunner? | 21:01 |
ghostmansd | I have a feeling that runner.py is copied from test_runner.py... | 21:01 |
ghostmansd | lkcl, nevermind the questions above, already found you had issues with "sv.ldu/ff=~RC1/vli *16, 0(*17)" | 21:06 |
ghostmansd | fixed 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 |
ghostmansd | I don't have time to involve with such refactoring, though: it needs too much time. | 21:20 |
ghostmansd | As for how the pcode is printed... Well, I simply get what ISA gives us. | 21:20 |
ghostmansd | I'm calling ISA.__iter__, which resolves to `yield from self.instr.items()`. | 21:23 |
ghostmansd | I'm thinking of cleaning this bit. | 21:23 |
ghostmansd | Basically we have `(['', '', ...] + ['EA <- (RA) + EXTS(DS || 0b00)', 'RT <- MEM(EA, 8)', 'RA <- EA', ''])` there. | 21:24 |
ghostmansd | I'll filter out empty strings. | 21:24 |
ghostmansd | Since changes I introduced should affect only verbose disassembly, I pushed them into master. | 21:27 |
ghostmansd | lkcl, that's how it looks in new revision: https://pastebin.com/HP0yugjV | 21:28 |
lkcl | ghostmansd, 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 middle | 22:20 |
lkcl | TestRunner does not exist | 22:20 |
lkcl | if 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 |
lkcl | for 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 |
lkcl | if 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 |
lkcl | if you are simply curious: TestRunnerBase runs "things" - in lock-step - and compares the results. | 22:25 |
lkcl | there are presently up to three "things" that are compared | 22:25 |
lkcl | SimRUnner | 22:25 |
lkcl | HDLRUnner | 22:25 |
lkcl | ExpectedState | 22:26 |
lkcl | more will be added. | 22:26 |
lkcl | these include | 22:26 |
lkcl | MicrowattRunner | 22:26 |
lkcl | QemuRunner | 22:26 |
lkcl | CavatoolsRunner | 22:26 |
lkcl | you should be able to infer what is going, from that and the comments | 22:26 |
lkcl | but again, really important: knowing that does not help you *at all* in any way shape or form with the model inorder.py | 22:27 |
lkcl | which is an entirely *stand-alone* program that does *nothing* other than read in its input file and writes out a markdown table | 22:28 |
lkcl | back to https://bugs.libre-soc.org/show_bug.cgi?id=1084 | 22:29 |
lkcl | this looks ok | 22:30 |
lkcl | RT (vector) | 22:30 |
lkcl | 0010000 | 22:30 |
lkcl | 38, 39, 40, 41, 42, 19, 20 | 22:30 |
lkcl | extra3[0] | 22:30 |
lkcl | it's 7-bit long | 22:31 |
lkcl | if i put the input "sv.ldu/ff=~RC1/vli *18, 0(*17)" | 22:31 |
lkcl | RT goes up correctly | 22:31 |
lkcl | RT (vector) | 22:31 |
lkcl | 0010010 | 22:31 |
lkcl | 38, 39, 40, 41, 42, 19, 20 | 22:31 |
lkcl | extra3[0] | 22:31 |
lkcl | however RA is *13* bits long! | 22:32 |
lkcl | RA (vector) | 22:32 |
lkcl | 0000000000000 | 22:32 |
lkcl | 43, 44, 45, 46, 47, 22, 23, 22, 23, 22, 23, 22, 23 | 22:32 |
lkcl | extra3[1] | 22:32 |
lkcl | repeated bits 22,23 22,23 22,23 four times | 22:32 |
lkcl | it would appear (for a start) that pysvp64asm is not updating RA | 22:35 |
lkcl | i'll investigate that | 22:35 |
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc | 23:25 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!