Saturday, 2022-06-25

lkclprogrammerjake, it's perfectly fine to cut this back drastically09:42
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=86809:42
lkclwe absolutely don't have time to do that much work09:44
lkclso i'm cutting it back, the budget doesn't change09:45
lkclwe *need* to set goals that are *achievable within the timeframe*09:45
lkclthen apply for follow-up grants afterwards09:46
lkcland make certain that the available budget right now is 100% allocated and spent on *achievable* tasks within the remaining 12 weeks09:46
lkclwhich makes 869 80% done already09:48
lkcli've allocated EUR 2500 to 868, which leaves EUR 2650 remaining to allocate, e.g. to fmul16, and i'd say we're good09:56
lkcllxo, i'm putting you down for EUR 1,000 on https://bugs.libre-soc.org/show_bug.cgi?id=23810:05
lkcldo you have an EU bank account (if not can you set up a transferwise account, use this link https://transferwise.com/u/marier50)10:06
lkcloctavius, mooornin19:51
octaviusHi lkcl, I have been awake, just doing other things XD19:52
lkcl:)19:52
* lkcl been chucking in a boatload more RFPs19:52
octaviusNow, I tried running the makefile for the powersim thing, getting a struct error19:53
lkclsummary from yesterday: the bmask pseudocode is perfectly fine and is exactly the same implementation of the executable demo, bmask.py19:53
octaviusAnd the bitfields are MSB for good measure :D19:53
lkcli can help you with that one later, let's close the bmask one first19:53
lkclsigh yes19:54
lkcli think i mentioned it was 18 months before i suddenly realised i'd thought "naturally" in MSB0 order :)19:54
octaviusIt's not too bad to think that way, the important thing is *WHERE* I need to think like this.19:55
octaviusAre all instructions MSB0 order?19:55
octaviusbitfields19:55
lkclif you can add a SOF and a SIF test case_1_bmask case_2_bmask based on the values from here19:55
lkclhttps://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv/sif.py;hb=HEAD19:55
lkclhttps://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv/sof.py;hb=HEAD19:55
lkcl  22      m  = 0b1100001119:55
lkcl  23      v3 = 0b10010100 # vmsof.m v2, v319:55
lkcl  24      v2 = 0b01000000 # v219:55
lkclthen we can call it a day and close that bugreport, put the RFP in19:56
lkclyes.19:56
octaviusWhat do v2/v3 mean, variables?19:56
lkcland the ISACaller simulator as well19:56
octaviusok19:56
lkcllook at the case_0_bmask19:56
lkcland compare the values inputted to those in sbf.py19:56
lkclhttps://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv/sbf.py;hb=HEAD19:57
octaviusNo no, I'm talking about "v2", is it just a name for a variable?19:57
lkclthis is literally a cut-paste job19:57
lkclyes19:57
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/bitmanip/av_cases.py;h=72455c73034564c2cb48d97d78c4de48dddde9af;hb=3ccf08c35610a74532c37307ab4c3e1d56b3e754#l45219:58
lkclline 46419:58
lkcllet's keep it real simple19:58
lkclcut19:58
lkclpaste19:58
lkclrun19:58
lkclbang19:58
* lkcl just correcting the comments in case_1_bmask20:05
lkclalso note, generally, you shouldn't do unit tests that test for UNDEFINED behaviour20:06
octaviusIs that because it will never be allowed to execute?20:07
lkclit's because, strictly speaking, due to the result being *UNDEFINED*, how can you possibly correctly test that?20:07
lkclit's literally *undefined*20:07
lkclthe answer could be literally anything20:08
lkcltherefore how is it possible to make a test for something that could be completely random responses?20:08
octaviusYou wrote 0 there, so I assumed the result is forced to be 020:08
lkclno, i had the word "UNDEFINED"20:08
lkcl    if mode3 = 3 then result <- undefined([0]*XLEN)20:08
lkclwhich *means*, "it's UNDEFINED"20:08
octaviusok20:09
lkclthere are a number of occurrences like this in the Power ISA spec20:09
lkclunnnnnfortunately....20:09
lkclsome idiots decide "oh because IBM POWER9 returns value zyz, we can rely on that"20:09
* lkcl bangs head repeatedly against desk20:09
lkclwhich causes serious problems for other hardware implementors because they have to completely ignore the spec20:10
lkcland implement exactly what *IBM's implementation* impements20:10
lkclsigh20:10
octaviusIn the sif.py code, the instruction is execute with v3 being the first arg, and m being the mask. Why is v2 there? Is v2 the expected result?20:25
lkclyyep20:26
octaviusThe first two tests give the same result (v3 didn't change)20:26
lkclthose actually come from the RVV spec20:26
lkcljust do lines 22-2420:26
lkclkeep it real simple20:26
lkcl  20      m  = 0b1100001120:27
lkcl  21      v3 = 0b10010100 # vmsif.m v2, v320:27
lkcl  22      v2 = 0b11000011 # v220:27
octaviusYeah got it, it works20:29
octaviusSOF fails20:33
octaviusAssertionError: 128 != 64 : int reg 3 (sim) not equal (expected) '.long 0x58611251'.  got 80  expected 40 at pc 4 420:33
lkclok do commit it i'll take a look21:01
octaviuscommited21:01
octaviuscommitted21:01
lkclyep v3 was wrong21:07
lkclhttps://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#vmsof-m-set-only-first-mask-bit21:08
openpowerbot_[slack] <github> signin21:08
lkclok i'm happy with that21:08
lkcloctavius, all good. do put in an RFP. EUR 1,00021:10
octaviuswow21:11
octaviusThat's amazing XD21:11
lkclam in "not pissing about" mode. get work done, get RFP in, move on rapidly.21:12
octaviusAh ok21:12
lkclit's partly about not embarrassing the hell out of NLnet21:15
lkclfor backing us with really substantial amounts of money21:15
octaviussure, can I send you the draft rfp to check?21:16
lkclthe Video and the Vulkan3D drivers are *really* low utilisation21:16
lkclsure21:16
lkcluse this21:17
lkcl* [Bug #865](https://bugs.libre-soc.org/show_bug.cgi?id=865):21:17
lkcl  implement vector bitmanip opcodes21:17
lkcl    * &euro;1000 out of total of &euro;350021:17
lkclas the "Notes" section21:17
lkclthe other NLnet grants aren't so bad21:17
octaviusYeah, got out by generating the utils program :D21:17
octavius*it21:17
lkcl:)21:17
lkclcoriolis2 is at EUR 45k and we should reach 50k21:18
lkclOpenPOWER standards is at 40k and we should also be able to reach 50k21:18
lkclthe Formal Correctness one is *only 20k* out of 50k21:19
octaviusgoing afk21:53
ghostmansd[m]I'm really fed up with the way svp64.py is done. This is bunch of hacks, and every single instruction added is not mentioned everywhere it should had been mentioned.22:03
ghostmansd[m]I have a big commit in my local branch which groups all this crap into a dict.22:03
ghostmansd[m]Ideally we should have been generated it from operands, bit I have no time now to write yet another parser for fields.txt.22:04
ghostmansdI already checked src/openpower/decoder/isa/test_caller.py and src/openpower/decoder/isa/test_caller_svp64.py. Anything else I should be aware of?22:05
ghostmansdI touched almost every single custom 32-bit instruction we have in pysvp64asm.22:05
ghostmansdFor now, the code resides in branch pysvp64asm (openpower-isa).22:05
ghostmansdlkcl ^^^22:06
octaviusOoh, thanks ghostmansd!22:10
ghostmansd[m]octavius, that was the least I could do :-)22:16
octavius;)22:17
ghostmansd[m]And that's not just phraseology, it's really the least. :-) All this crap should be dropped in favor of some mechanism which is aware of fields.txt. However, this is a big task, and for now I just want to keep this code maintainable for a while.22:21
ghostmansd[m]After all, as hacky as it is, it is still a reference.22:22
ghostmansd[m]I'm interested in tests to launch. lkcl, of you could launch testing on pysvp64asm branch, it'd be great.22:23
ghostmansd[m]I lost several hours until I finally came up with some reasonable code, so I'd be happy if you could share ideas on further improvements.22:25
octaviusI haven't done this, but since luke as away, I could have a go22:25
octaviusJust need to grab the pysvp64asm branch22:25
ghostmansd[m]Perfect, thanks octavius!22:26
ghostmansd[m]It's almost 1 AM here, so I'll have some rest. :-)22:26
octaviusBefore you go off, is it this test you want to run: decoder/isa/test_caller_bitmanip_av.py?22:30
ghostmansd[m]Well I checked only test_caller.py and test_caller_svp64.py.22:44
ghostmansd[m]I'm not sure which tests should be run in addition.22:44
ghostmansd[m]The one you mentioned certainly deserves to be run, since I touched av section as well.22:45
octaviusI just ran test_caller_bitmanip_av.py: https://pastebin.com/BHk5q2ZP22:47
octaviusI'll try the other ones22:47
octaviuswow, test_caller.py is taking some time22:49
ghostmansd[m]Yeah this is slow.22:49
ghostmansd[m]You know what, I can run these tomorrow on talos1, don't worry :-)22:50
ghostmansd[m]I've actually been thinking there are more other tests I must launch. Stuff in decoder/isa I know, will check it.22:51
ghostmansd[m]Thank you!22:51
octaviusJust ran test_caller.py, looks good22:52
octaviusyou're welcome, gn!22:52
ghostmansd[m]gn!22:54
ghostmansd[m]bitmanip_av should be fixed now :-)22:54
ghostmansd[m]I found that I missed adding some insns to table22:54
octaviustest_caller_svp64.py also ran fine22:55
octavius(did it while I was on anyway)22:55
octaviusno I'll go XD22:55

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