Sunday, 2022-06-26

lkclghostmansd[m], yep it grew from "oh whoops i need a quick way to do this by hand"08:28
lkclghostmansd[m], preeetty much everything in https://git.libre-soc.org/?p=openpower-isa.git;a=tree;f=src/openpower/decoder/isa;hb=HEAD08:30
lkclstarting with test_caller_*.py08:30
lkclholy cow that looks like a lot of work08:32
lkclpython3 decoder/isa/test_caller_bitmanip_av.py >& /tmp/f good08:39
lkclpython3 decoder/isa/test_caller_setvl.py >& /tmp/f not so much, investigating08:43
lkclhilarious. the comment for svshape was out-of-date from the last re-shuffle of OPC 2208:46
lkclfound it08:58
lkcl* setvl RT,RA,SVi,vf,vs,ms08:58
lkcl-    (RT, RA, SVi, ms, vs, vf) = fields08:58
lkcl+    (RT, RA, SVi, vf, vs, ms) = fields08:58
lkcland svstep uses only 3 fields08:59
lkcl* svstep RT,SVi,vf08:59
lkclpython3 decoder/isa/test_caller_setvl.py >& /tmp/f good09:01
lkcli say good, the inner loop fns are barfing...09:02
lkclahh svremap09:05
lkclSVRM-Form updated a few days back09:05
ghostmansd[m]I haven't checked forms09:05
ghostmansd[m]For now I concentrated on the code09:05
lkcli had to shuffle some of them09:06
lkcli'm on it09:06
ghostmansd[m]Only obvious errors were fixed :-)09:06
lkclsvremap:09:06
lkcl            # 1.6.34 SVRM-FORM from fields.txt09:06
lkcl            # |0  |6     |11  |13   |15   |17   |19   |21  |22   |26     |31 |09:06
lkcl            # |PO | SVme |mi0 | mi1 | mi2 | mo0 | mo1 |pst |///  | XO    | / |09:06
lkclis out-of-date09:06
lkclactual fields.txt09:06
lkcl# 1.6.34 SVRM-FORM09:06
lkcl   |0     |6     |11  |13   |15   |17   |19   |21  |22   |26     |31 |09:06
lkcl   | PO   | SVme |mi0 | mi1 | mi2 | mo0 | mo1 |pst |///  | XO        |09:06
lkcland master svp64.py09:06
lkcl            insn |= fields[6] << (31-21)  # pst        , bit 2109:06
lkcl            insn |= 0b111001 << (31-31)   # XO       , bits 26..3109:06
lkclbranch:09:07
lkcl        (XO  , 26, 30),09:07
lkcl        (0   , 31, 31),09:07
lkcl    )09:07
lkclwhich is wrong09:07
ghostmansd[m]It might have been a copy&paste, I admit :-)09:07
lkcli.e. you fitted to the old cut/paste out-of-date copy of fields.txt entry09:07
ghostmansd[m]Aaaag09:07
ghostmansd[m]Yeah makes sense09:07
lkclno, actually, you did an excellent and perfect job of conforming to out-of-date copies of fields.txt :)09:08
ghostmansd[m]I've been looking at fields.txt entries :-)09:08
ghostmansd[m]Yeah09:08
ghostmansd[m]You know, this is one of the reasons I'm confident that we must generate these09:08
lkclyehyeh09:08
lkcli mean it's precisely what i'd been advocating "oh yeah we do all auto-generated to avoid mistakes"09:09
lkclwark-wark09:09
ghostmansd[m]Yeah couldn't agree more09:10
ghostmansd[m]BTW could you please split any findings in separate commits if possible?09:11
programmerjakeluke...soo many emails....i'll need an hour or more to read them all...:)09:11
ghostmansd[m]I'll revisit binutils then09:11
lkclprogrammerjake, i know - last year i simply switched off SMTP delivery (!)09:11
lkclthey're pretty much all RFP-related09:12
lkclbut they're things that have been delayed and delayed and delayed and delayed09:13
lkclghostmansd[m], will try, drat, i just put svshape and svstep in the same commit09:13
lkclsvremap fixed09:14
* lkcl frickin monster headache09:16
lkclow09:16
lkclpython3 decoder/isa/test_caller_setvl.py >& /tmp/f09:16
lkcl pass, hooray09:16
lkclpython3 decoder/isa/test_caller_transcendentals.py >& /tmp/f good09:20
lkclsvp64 fft one underway, go go go go09:21
lkclcome ooon you can do it... :)09:22
lkclerrr that's odd09:23
lkclha, one too many arguments :)09:23
lkclpython3 decoder/isa/test_caller_transcendentals.py >& /tmp/f gooood09:24
lkclwhich is a relief because that's a frickin complex test09:25
lkcldct.py...09:25
lkcli think these will all be probably ok from now on, after getting test_caller_svp64_setvl.py to work09:26
ghostmansd[m]I have an impression this deserves some task already :-)09:27
lkclmhmm09:27
ghostmansd[m]But I think this is just a temporary hack09:27
ghostmansd[m]And the real task is generating these09:27
lkclwell it's kinda covered by... well it's kinda along the right lines09:27
ghostmansd[m]The only reason for task is how much time was spent :-)09:27
* lkcl taking a look09:28
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=83809:28
lkclok there's EUR 1425 available in https://bugs.libre-soc.org/show_bug.cgi?id=57709:29
lkclwhat i'll do is shuffle some of that to 83809:29
lkclEUR 500?09:29
* lkcl same cut/paste issue with svp64_dct.py svremap (8 args when 7 are needed), sorted...09:34
lkclthis is good, you check the length of the fields, that wouldn't have been caught09:35
ghostmansd[m]We actually should do more and check whether they overlap09:37
ghostmansd[m]But I'll leave it to generator :-)09:37
ghostmansd[m]By the way, is it possible we switch to some other format? :-)09:38
ghostmansd[m]I wouldn't call fields.txt particularly readable09:38
lkclmmmm... unfortunately it's machine-read09:40
lkclthe columns "|" actually line up in a machine-readable way09:40
lkcland it comes directly from the Power ISA Spec09:41
lkclso changes are a lot more work than it first seems09:41
lkclpython3 decoder/isa/test_caller_svp64_dct.py >& /tmp/f gooood09:42
* lkcl test_caller_fp.py next...09:42
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/decoder/power_fields.py;hb=HEAD09:44
lkcltest_caller_fp.py good svp64_fp.py good svp64_matrix.py corrected good09:47
lkcloink.  the "open" source podcast announced by the linuxfoundation requests DRM to play it10:21
lkclwhat the hell10:22
lkclghostmansd[m], i'm good with the tests. all happy with the new dict-thing svp64.py10:28
programmerjakelkcl: re-expanded top comment: https://bugs.libre-soc.org/show_bug.cgi?id=868#c010:38
lkclprogrammerjake, now it's off of the critical path under time-pressure it looks great11:03
programmerjake:)11:04
ghostmansd[m]Many thanks lkcl!11:07
ghostmansd[m]Do you like the new approach? I'm thinking of using some similar stuff in task 838.11:08
ghostmansd[m]Not exactly this, I think; rather a dataclass or a namedtuple.11:08
lkclghostmansd[m], yes it's much better11:18
lkcljust bear in mind, power_decoder.py the damn XO fields are hard-coded into the function11:18
lkclit *should* be possible to extract them by tree-walking the list-of-namedtuples11:19
lkclbtw can i leave it with you to rebase pysvp64asm branch onto master? i don't do that often enough to remember how to do it11:20
ghostmansd[m]Yeah sure11:24
ghostmansd[m]I'll complete this later today11:24
lkclstar. no rush.11:30
octaviusgood afternoon lkcl, so what should I focus on doing next? pypowersim bug #758?15:35
ghostmansdlkcl, I kinda lost how many fields should svremap have :-D15:53
ghostmansdLuke I've re-based the branch and integrated the changes. I've changed the wording for some commits a bit so that it's apt to subsystem and follows the wording done before. Many thanks for this work, especially for tests.16:03
ghostmansdIt seems we've been somewhat out-of-sync. I'll update binutils part respectively; it's been long enough since I published the previous revision. :-)16:04
ghostmansdI'm also going to include svindex as well in a new revision, if you don't object.16:04
ghostmansdAfter that I think I'll finally be able to continue with operands parsing. :-)16:05
ghostmansd[m]lkcl, I think there's an error with fsins/fcoss. It should be either have FRT,FRA,FRB operands, or FRT,FRB. Judging from svfparith.mdwn, this is the former. But the X-form which you added mentions FRA as well. Am I missing something?16:39
ghostmansdlkcl, I think this is the correct form16:41
ghostmansd   | PO   |   FRT         |     ///     |   FRB       |   XO |Rc  |16:41
ghostmansdI've updated pysvp64.asm; this is a comment anyway, so this shouldn't break anything. It matches svfparith.mdwn count of operands, the operands position which I took from the original code, so I think we're safe to assume this is the correct form. Anyway, please let me know whether it is indeed.16:43
ghostmansdThat'd be great if SVM-form used a different name for operand SVRM, since we already have a form with the same name.17:01
ghostmansdFor now I call this operand SVRMf, f stands for field.17:02
ghostmansdI'm kinda dubious on what we should do with the ignored fields. The current code code marks these, for example, (0, 22, 25) designates "a field which is set to 0 and spans through bits 22-25".17:11
ghostmansdOn one hand, it makes it easier to keep track, and is explicit. We could also check that all bits are mentioned and not a single bit is forgotten (we don't check for it now, but we really could).17:13
ghostmansdOn the other hand... well, it actually does nothing other than being explicit and perhaps leaving a room for checks in the future.17:13
ghostmansdSo, thoughts? I'm inclined to think that the current approach is better. Perhaps we could even have a special data type for an ignored field when we get to the generator.17:18
lkclghostmansd[m], ah whoops - have a look at Power ISA 3.0, p148, "fneg" instruction18:13
lkclFloating Negate X-form18:13
lkclfneg  FRT,FRB (Rc=0)18:13
lkclfneg. FRT,FRB (Rc=1)18:13
lkclfcoss and fsins follow that pattern18:13
lkclso, sorry, you'll have to put those back to FRB :)18:14
ghostmansd[m]Yes, and they don't have FRA18:14
lkclcorrect.18:14
ghostmansd[m]FRB is still there :-)18:14
lkclagain it'll probably be something down to that trick i described with RS/shift/ldst18:14
ghostmansdgit show 956dc17c4e10ae57bbd4bb07d9348054353bbd7918:15
ghostmansd[m]Isn't it correct?18:15
lkclahhh... yes! that's correct18:15
ghostmansd[m]We shouldn't list FRA amongst registers18:15
ghostmansd[m]Well :-)18:15
lkclsorry you'd spotted something i'd got wrong18:15
ghostmansd[m]That's all I did18:15
* lkcl just woke up18:16
lkclah brilliant18:16
ghostmansd[m]I also pushed more commits there18:16
ghostmansd[m]Re-visiting binutils and comparing both assemblers was a good idea18:16
ghostmansd[m]OK it looks like these are finally synced18:17
ghostmansd[m]So I'll publish a new series of patches soon18:17
lkclcool. let me think about SVM-Form for a bit18:18
lkcl# 1.6.33 SVM-FORM18:19
lkcl   |0     |6        |11      |16    |21    |25 |26    |31  |18:19
lkcl   | PO   |  SVxd   |   SVyd | SVzd | SVRM |vf |   XO      |18:19
lkclshould really be....18:19
lkcl   | PO   |  SVme  |  SVxd   |   SVyd | SVzd |vf |   XO      |18:19
lkcl   | PO   |  SVme  |  SVxd   | SVyd | SVzd |vf |   XO      |18:19
lkclhmmm... no, it's not the same field18:21
lkclok it can just be lower-cased SVrm18:21
lkcl   | PO   |  SVxd   |   SVyd | SVzd | SVrm |vf |   XO      |18:21
ghostmansd[m]Ah yeah, good idea!18:32
ghostmansd[m]Makes perfect sense18:32
ghostmansd[m]Thanks Luke! I see you already updated openpower-isa.18:33
ghostmansd[m]I'll update binutils.18:33
lkclghostmansd[m], yes updated. awesome18:56
lkclbtw about the "ignored" fields, these are effectively already dealt with18:56
lkclfrom power_fields.py and the markdown-pseudocode-parser-class (can't remember its name straight away, something daft like "ISA")18:57
lkclthe markdown is already parsed so the opcode arguments obtained18:58
lkcl+* svshape SVxd,SVyd,SVzd,SVrm,vf18:58
lkcland the Form obtained as well18:58
lkcl SVM-Form18:58
lkcltherefore, a dictionary-of-dictionaries (actually, attributes-of-attributes) is created18:59
lkclby FormName.FieldName18:59
lkcland it's a near-trivial job to walk those and obtain the bit-locations18:59
lkcl"ignoring" fields doesn't even come into the picture because it's inherently and automatically done by virtue of walking the list of field names and using those as key-lookups into PowerFields[FormName][fieldname]19:00
lkclall of these:19:01
lkcl@@ -141,7 +141,7 @@ def svshape(fields):19:01
lkcl         (SVxd, 6 , 10),19:01
lkcl         (SVyd, 11, 15),19:01
lkclshould be obtainable from PowerFIelds with a single function call instead of manual19:01
lkclbottom line there's an incremental path here, keeping things going without huge disruption or unnecessary "full replacement" code being written19:06
ghostmansdlkcl, I've submitted svindex along with its test, plus also refreshed patches (links, renamed SVRMf to SVrm, etc.)20:06
ghostmansdI'm wondering if we could generate parts of an RFP via budget-sync, or a similar script. Because, well, some parts can be done in an automatic fashion.20:11
ghostmansdAnyway, Luke, I've just sent the template for 867. Both binutils and pysvp64asm can handle svindex successfully.20:13
lkclghostmansd, brilliant20:18
lkclyes, i know - it's been on the TODO list for a loooong time20:18
lkclyes i saw. you got the project name wrong, it should be "LibreSOC Formal" (i sent it in email)20:19
lkclthe rest is good20:19
lkcloh btw, you'll love this: i actually have a bugzilla-automated-poster which manages attachments for patch-sets, somewhere!20:20
lkcli forgot about it.20:20
ghostmansdMmm, I'm missing what you mean. Which kind of attachments?20:21
lkclbasically what this program did was, it analysed a series of commits and automatically uploaded them as attachments to a bugreport20:23
lkclincluding revising them20:23
lkcli wrote it for managing a series of 30 patches to webkit20:23
lkclit relied however on some specific database augmentation that they'd done20:24
ghostmansdI kinda have an impression we might need that. I still have no reply from FSF, and perhaps this whole upstream merging might take a while.20:36
ghostmansdWell, at least most of the code is decoupled into the separate file.20:37
programmerjaketechnically, our project name is Libre-SOC, not LibreSOC. (we picked that to match the available domain name).20:49

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