Tuesday, 2022-07-12

lkclmarkos, the opcode's already mapped out in this page https://libre-soc.org/openpower/sv/bitmanip/?updated00:17
lkclyou'll need a match pattern in minor_22.csv of something like "------00011-"00:18
Veera[m]bitwuzla: how to interface with yosys/sby or anything other???02:07
lkclVeera[m], that's complicated :) it's quite chain02:31
lkcllibsmt2 is used by cvc5, bitwuzla, z3 and yices02:31
lkclyosys can be told (by sby) to use one of cvc5, bitwuzla, z3, yices, for formal correctness02:32
lkclnmigen understands how to create sby files to instruct yosys to use one of....02:32
lkclieee754 fp library which is in nmigen has some unit tests which use a Formal Correctness test harness02:33
lkcl...02:33
lkcl...02:33
lkcl...02:33
lkclso it goes:02:33
lkclieee754fp unit test ->02:33
lkclnmigen ->02:33
lkclsby ->02:33
lkclyosys ->02:33
lkclcvc5/bitwuzla/etc ->02:33
lkclsmt202:33
Veera[m]ok. thanks.02:34
lkcltherefore you can run this unit test02:35
lkclhttps://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/fpfma/test/test_fma_formal.py;hb=HEAD02:35
lkclbut you have to have all the right branches in place02:35
lkclon yosys sby etc.02:35
lkclwhich is done by all the devscripts, correctly02:36
lkcllike, this one:02:36
lkclhttps://git.libre-soc.org/?p=dev-env-setup.git;a=commitdiff;h=70b0c32a13869633f6ec91938482b4e0cebaf41702:36
Veera[m]built yosys sby cvc5 bitwuzla: success06:29
Veera[m]ran python3 src/ieee754/fpfma/test/test_fma_formal.py06:29
Veera[m]Ran 113 tests in 162.328s06:30
Veera[m]OK (skipped=84)06:30
Veera[m]Can anyone tell how to run the test with cvc5, bitwuzla06:31
Veera[m]I mean is there a way to specify these for src/ieee754/fpfma/test/test_fma_formal.py06:31
programmerjakeit's all the solver=... lines in test_fma...06:55
programmerjakeit uses bitwuzla06:55
programmerjakeyou can also run nmigen's tests -- 2 of them use cvc506:57
programmerjakeso, if you ran test_fma...py successfully, you already tested bitwuzla by running the fma tests06:58
Veera[m]ok07:02
Veera[m]how to run nmigen's tests; is there a command line!07:02
programmerjakechange to nmigen's root directory, then run pytest07:43
programmerjakepip3 install pytest-xdist07:43
programmerjakepytest -n auto07:43
programmerjakepytest -n auto tests07:44
programmerjakehttps://gitlab.com/nmigen/nmigen/-/blob/master/.gitlab-ci.yml07:44
Veera[m]FAILED tests/test_hdl_smtlib2.py::TestReal::test_real_div - AssertionError: F...08:17
Veera[m]FAILED tests/test_hdl_smtlib2.py::TestFloatingPoint::test_floating_point_from_int_real08:17
Veera[m]both were cvc5 tests08:17
programmerjakehmm, seems likely cvc5 is somehow borked, or you're using a too-old version of cvc5 or you compiled it without a needed option enabled .. i'd have to see the error to know for sure...08:49
Veera[m] git clone --depth 1 -b cvc5-1.0.0 https://github.com/cvc5/cvc5.git cvc508:50
openpowerbot[slack] <github> signin08:50
Veera[m]./configure.sh --poly --auto-download -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_FLAGS=-fpermissive08:51
Veera[m]-fpermissive is needed for antlr-3.408:52
programmerjakecan you look in nmigen/tests/spec_hdl_smtlib2_real_div/engine_0/logfile.txt08:53
Veera[m]File "/usr/local/bin/../share/yosys/python3/smtio.py", line 360, in p_write08:56
Veera[m]if flush: self.p.stdin.flush()08:56
Veera[m]BrokenPipeError: [Errno 32] Broken pipe08:56
Veera[m]I compiled cvc5 after yosys but before sby08:57
programmerjakewhich yosys and sby commits are you on?08:58
Veera[m]git checkout smtlib2-expr-support-on-0.1308:59
Veera[m]git clone https://git.libre-soc.org/git/SymbiYosys.git sby09:00
programmerjakeyeah, that branch has been changed in the past...which commit are you on? you can check with git log09:00
Veera[m]yosys eb5f9d9de61411d22944c105cf3800f121f9066609:01
Veera[m]sby e3123283eaf129d19519bf72cd48e19b097552e609:01
programmerjakeyosys looks correct...09:02
programmerjakesby too...hmm09:03
Veera[m]should cvc5 and bitwuzla to be compiled before yosys09:04
programmerjakeshouldn't matter...cvc5 and bitwuzla don't depend on yosys, and compiling yosys doesn't depend on them09:06
programmerjakewhat's the output of yosys -V09:07
Veera[m]Yosys 0.13 (git sha1 eb5f9d9de, clang 7.0.1-8+deb10u2 -fPIC -Os)09:08
programmerjakehmm, seems fine09:09
Veera[m]Power has gone here. Can we discuss a little later. If urgent msgs are give me09:09
programmerjakek, ttyl09:09
lkclahh how much memory does this use?09:31
programmerjakeoh, pytest -n auto runs 1 test per cpu core...i'd expect it to not use much memory though...i remember bitwuzla using around 60MiB for fma09:36
programmerjakecvc5 may be less efficient09:36
programmerjakei have 32GiB of ram and 24 cpu threads...so 1.33GiB per thread09:38
programmerjakethe build server has 8 threads and 20GiB ram09:38
programmerjakegitlab.com's build servers have 1 thread and 4GiB ram09:40
lkclok that should be enough.09:47
lkcljust concerned that if Veera is using a local machine that he has enough RAM.10:02
lkclVeera[m], we need to get you a big UPS! :)10:03
lkclmarkos, i raised this for you with a checklist https://bugs.libre-soc.org/show_bug.cgi?id=88710:17
markosyes, already on it, implemented already most of it, working on the testcase now10:18
markosofc I expect some things to be fixed10:19
jn[offtopic] https://nitter.it/aka_pugs/status/1546576975166201856 the Cray-1 had very nice cheat sheets / reference cards. instruction timings, formats, addressing modes, encodings, all in a few pages10:28
lkcljn: oooo, niiiice10:33
programmerjakeneat!10:33
lkcljn, not offtopic at all10:35
lkclmarkos, just bear in mind, once you use fmvis in assembler then you create a dependency on ghostmansd[m] adding it to binutils if you intend to use that10:43
lkclgiven that fmvis helps to avoid loading constants from TOC in the first place which iirc was the primary reason you wanted to use binutils not svp64.py then that shouldn't be an issue10:43
lkclplus it's ridiculously easier anyway10:44
markosok, I'll sync with him to make sure I don't put an unnecessary burden on him too early10:44
lkclyes please. also remember that anything you need will (a) have to be scheduled and (b) need a budget. which for binutils having been almost 4 months now we're pushing limits10:47
lkclbottom line here is that svp64.py is extremely easy and quick to add things to, whilst binutils is a much longer cycle.10:48
lkcland we don't *in any way* want to go anywhere near the Oct 1st EU cut-off point for RFP submission.10:48
lkclNLnet has 300 grants being managed: we can assume a very large percentage of those will attempt to submit RFPs right at the last minute10:49
lkclNLnet then has to analyse those and put in its *own* RFP to the EU.10:50
lkclif that RFP - by NLnet - to the EU - is after Oct 1st it will be ***DENIED***.10:50
lkclmarkos, i added support at least for "0xNNN" and "0bmmmm" fields in svp64.py https://bugs.libre-soc.org/show_bug.cgi?id=887#c210:51
lkclso you can at least do "fmvis 0,0xFC40"10:52
markosthat's enough, getting the hex value of a fp constant is trivial10:52
lkclawesome10:53
lkclmarkos, oh, please do reply to the new-mou-something@nlnet.nl email sending your address to them. it's for EU audit purposes so don't send it cc to me.11:15
lkclif you wish your identity to remain confidential to the EU please let them know11:15
markoslkcl, I did, I replied already11:20
lkclah excellent, i can let the accountant know.11:23
Veera[m]this is regarding cvc5 with sby11:26
Veera[m]which I left earlier11:26
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] engine_0: self.p_write(stmt + "\n", True)11:27
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] engine_0: File "/usr/local/bin/../share/yosys/python3/smtio.py", line 360, in p_write11:27
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] engine_0: if flush: self.p.stdin.flush()11:27
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] engine_0: BrokenPipeError: [Errno 32] Broken pipe11:27
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] engine_0: finished (returncode=1)11:27
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] ERROR: engine_0: Engine terminated without status.11:27
Veera[m]E   SBY  7:31:26 [spec_hdl_smtlib2_real_div] DONE (ERROR, rc=16)11:27
Veera[m]____________ TestFloatingPoint.test_floating_point_from_int_real _____11:27
lkclcan you commit the scripts to dev-env-setup and i'll run them in a local chroot to try a repro11:28
lkcli have both cvc5 and bitwuzla compiled (manually) and working perfectly11:29
Veera[m]well, I will. need a little time.11:29
Veera[m]To inform I am running these in PowerPC talos11:30
lkcldon't worry if "it's not perfect"11:30
lkclthe main thing is to have a look and reproduce it11:30
lkclahh ok.11:30
lkclrright. so that means it's possible to ssh in and check the logs (etc.)11:30
Veera[m]yep11:30
lkcllet's hope it's not something to do with ppc64 vs x86 sigh11:31
Veera[m]"/home/vklr/cvc.1/home/vklr/src/nmigen"11:32
Veera[m]"/home/vklr/tmp/d.log"11:34
Veera[m]screen output11:34
lkcl1 sec11:35
lkclVeera[m], just running as local user vklr in chroot cvc.1 now11:39
lkcli chown -R'd the entire src directory to vklr:vklr11:40
lkclthat's the actual *command execution* failing11:41
lkclnot an actual Formal Correctness error11:41
programmerjakelkcl, can you stop running it for a sec so i can copy the dir to my computer to see if it fails on there?11:41
Veera[m]lkcl: mean binary cvc5?11:42
Veera[m]how you found out11:42
lkclprogrammerjake, only needed to be run once11:42
lkclthe formal proof for FIFO also fails11:43
lkclso it's nothing to do with smt2 / cvc5 / bitwuzla itself11:43
programmerjakei mean take the sby test case generated there and run it on my x86 machine to see if it's before/after sby11:44
programmerjakeso, are you done modifying tests/spec_hdl_smtlib2_real_div? can i tar it up now?11:44
programmerjakelkcl ^11:45
lkcli haven't made any modifications.11:45
lkcli ran "nosetests3" once and one time only.11:46
programmerjakerunning the tests makes modifications11:46
lkcl5 minutes ago i ran "nosetests3", once and only once11:47
lkcli've been examining the log output (and nohup.out) ever since11:47
programmerjakek, tarring now11:47
lkclah ha!11:48
lkclSMT Solver "yices-smt2" not found in path11:48
Veera[m]lkcl: sorry I did not installed that11:50
lkclhome/vklr/src/nmigen/tests/spec_lib_fifo_sync_not_fwft_pot/engine_0/logfile.txt11:50
lkclyou need everything.11:50
* lkcl looking....11:51
Veera[m]only installed z311:51
Veera[m]also ghdl and ../ghdl-yosys-plugin was not installed11:51
lkclhttps://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-tools-yosys;hb=HEAD11:51
lkclyyyeah you can probably get away with not including ghdl11:51
Veera[m]Looking at nmigen tests only cvc5 and z3 was needed11:52
lkcli added that to the hdl-tools-yosys because of how often microwatt gets used11:52
programmerjakeif you're running nmigen's tests, you need at least yices, z3, and cvc5...11:52
lkclno, the FIFO test (which is nmigen) failed because yices is missing11:52
Veera[m]pytest -n auto tests/test_hdl_smtlib2.py11:52
programmerjakeuntarring, i noticed another potential issue --- the server's clock is wrong by a few minutes11:54
programmerjaketar: spec_hdl_smtlib2_real_div: time stamp 2022-07-12 03:54:57 is 80.975790299 s in the future11:54
programmerjake^ after taking a few minutes to copy stuff around11:55
lkclmmm.... installing ntp... mmm.... that'll be fun....11:56
lkcllet me take care of it11:56
Veera[m]shall I install yices and rerun tests to see. Are you guys finished processing my account directories11:56
programmerjakei'm done, lkcl may still be doing stuff11:56
lkclVeera[m], yes go for it11:59
lkclthat was scary. installing ntpd, dpkg failed. fail2ban had terminated at some point and left an entry in /var/run11:59
programmerjakeon my pc, the sby test passes...so the problem is sby or later12:00
lkclprogrammerjake, see src/nmigen/tests/spec_lib_fifo_sync_not_fwft_pot/engine_0/logfile.txt12:00
lkcli'd expect the problems to magically go away entirely once yices2 is installed12:01
programmerjakek, i can look at that too, i was looking at spec_..._real_div/12:01
lkclntpd is now operational12:01
programmerjakeyay12:02
lkclwith yices2 missing there's not much point investigating further12:02
lkclthen have a look at spec_...._real_div/engine_0/logfile.txt12:02
programmerjakeinstalling yices won't fix cvc5...12:02
lkcland you'll likely see that it... ahhh12:02
lkcl1 sec12:02
lkclyeah that one looks a lot more fun12:04
Veera[m]Still FAILS with yices2 installed12:05
Veera[m]mean cvc5 ones12:06
lkcli'm using this12:06
lkcl$ cvc5 --version12:06
lkclThis is cvc5 version 1.0.1-dev.160.2a397ba9a [git 2a397ba9a on branch main]12:06
lkclyou have version 1.0.012:07
lkclit's the development version (no explicit tag yet)12:07
Veera[m]=========================== short test summary info ============================12:08
Veera[m]FAILED tests/test_hdl_smtlib2.py::TestReal::test_real_div - AssertionError: F...12:08
Veera[m]FAILED tests/test_hdl_smtlib2.py::TestFloatingPoint::test_floating_point_from_int_real12:08
Veera[m]======================== 2 failed, 870 passed in 14.40s ========================12:08
Veera[m]https://bugs.libre-soc.org/show_bug.cgi?id=883#c112:09
programmerjakeieee754fpu and nmigen ci use cvc5 1.0 -- so that shouldn't be the issue12:09
lkclVeera[m], take a look at src/nmigen/tests/spec_hdl_smtlib2_real_div/engine_0/logfile.txt12:09
lkclthat's giving more detail12:10
programmerjakelkcl: basically that's just python's backtrace from sigpipe12:10
lkcli have a sneaking suspicion this is going to be down to ppc64 / x86 differences12:10
lkclprogrammerjake, yes. it's a bit more than "an assert occurred"12:11
programmerjakeno details on why cvc5 terminated tho...12:11
* lkcl thinks12:11
lkclVeera[m], ok, can you assume this is fine, complete the dev-env-setup script12:11
lkcl(add cvc5 and bitwuzla)12:11
lkclthen i'll do a repro here on x8612:12
Veera[m]lkcl: ok12:12
programmerjakei've debugged stuff like this before...i'll look into cvc5 issues tomorrow...4:12am here12:12
lkclprogrammerjake, :)12:12
lkcltake it easy!12:12
programmerjakehad similar sby solver termination issues12:13
programmerjakebasically sby swallows the solver's output error messages, then terminates12:14
programmerjakeactually, yosys-smtbmc does12:14
programmerjakegn12:16
octaviushi lkcl, need any help with tasks?13:03
Veera[m]lkcl: Added initial support for cvc5 and bitwuzla. https://git.libre-soc.org/?p=dev-env-setup.git;a=commitdiff;h=31c0963eec1866251e343b40ec0f527577c5b93213:44
lkcloctavius, yes, https://bugs.libre-soc.org/show_bug.cgi?id=89013:45
Veera[m]Checked the scripts they are building fine.13:45
lkclVeera[m], fantastic13:45
lkcli'll start an install now13:46
octaviusYes, I'll try to set those up in a new chroot13:46
lkcloctavius, we need to get you onto the NGI POINTER Grant13:49
lkcltoshywoshy, vantosh as well13:49
lkcli'll send out the message now to FundingBox13:49
octaviusthanks13:49
octaviuslkcl, should I also make an iwiki page for tasyagle/HiTas? Useful as I'll be documenting as I'm setting up13:53
lkclyes please13:53
octaviusack :)14:03
lkclfrickin lot of admin today14:15
Veera[m]Ran "make check" for cvc5 and got: 1% tests passed, 2936 tests failed out of 296614:17
Veera[m]Looked at running log: In many of the tests cvc5 segfaults14:18
Veera[m] Supported Operating Systems 14:19
Veera[m]cvc5 can be built natively on Linux and macOS, cross-compilation is possible for Windows using Mingw-w64. cvc5 also supports cross-compilation for ARM64 systems. We generally recommend a 64-bit operating system.14:19
Veera[m]** I think PowerPC is not supported!14:19
lkclgreeeat14:42
lkclthat's total bullshit.14:43
lkclit's *really* not hard when writing non-GUI software to make it run portably.14:43
lkclsigh14:44
Veera[m]Bug 878 - image conversion explaining multi-issue; Ah where to put this finished image in wiki or somewhere else?14:54
lkclVeera[m], i'll find somewhere for it. there are a couple of places, i haven't entirely decided where, though15:15
lkclthe task is done, for you, though.15:15
Veera[m]ok15:16
lkclVeera[m], builds cleanly. running nosetest3 now15:19
lkclnmigen tests pass... trying ieee754fp now15:23
octaviuslkcl, when you have the time, can you try running the tasyagle script (wiki page shows which scripts you need to call). See the bug for current issue15:32
ghostmansd[m]lkcl, I know what you wanted to ask :-)15:34
ghostmansd[m]Why do we have different constants in svp64.py, right?15:35
ghostmansd[m]At decode_predicate15:35
markoslkcl, will there be a sv.fmvis instruction? would be fun setting a fp constants in a ton of registers using immediates :D16:12
markosthough, come to think of it, it's not very useful, it's enough to set one register and then just copy that to the rest16:33
lkclmarkos, automatically. yes. you have to run sv_analysis to get it to be "analysed" and create the SVRM*.csv files16:34
lkclthat's wasting one instruction.  a broadcast-splat is perfectly reasonable to have, especially when predicated16:35
lkcland because it is an immediate, that would save a hell of a lot of register hazard dependencies.16:36
lkcloctavius, you saw i tracked down the build dependencies from debian/rules? that file will be for e.g. debian/7 or debian/816:36
lkcl(jre-6)16:36
lkclso you'll have to hunt (apt-cache search) for equivalent up-to-date libraries, inside the debian/10 chroot16:37
lkclor use packages.debian.org16:37
octaviusYeah, I don't know how you'd get jre-6 though. Do later versions not support it?16:37
lkclghostmansd[m], yes i was wondering why the inversion of all those tests were missing16:37
lkcloctavius, you don't.16:37
lkcloctavius, "><lkcl> so you'll have to hunt (apt-cache search) for equivalent up-to-date libraries, inside the debian/10 chroot"16:38
lkcl^^^16:38
octaviusYeah16:38
markoslkcl, just to save you some time explaining, what I've done so far, I've added an entry in CUSTOM_INSNS for that opcode, a hook function, in that hook I'm processing fields list as follows:16:40
markosbtw, which pastebin do you use?16:40
lkclmarkos, irc :)16:40
markoshaha ok16:40
markosthis is a first form16:40
markosdef fmvis(fields):16:40
markos    # XXX WARNING THESE ARE NOT APPROVED BY OPF ISA WG16:40
markos    # however we are out of space with opcode 2216:40
markos    # 1.6.7 X-FORM16:40
markos    # |0     |6 |7|8|9  |10  |11|12|13  |15|16|17     |20|21    |31  |16:40
lkclbecause otherwise i have to actually set one up and make sure it's logged16:40
markos    # | PO   |   FRS         |     d1      |      d0     |   XO |d2  |16:40
markos    PO = 2216:40
markos    XO = 0b00001116:40
markos    (FRT, d0, d1, d2) = fields16:41
lkclcareful though, on rate-limiting!16:41
markos    return instruction(16:41
markos        (PO , 0 , 5),16:41
markos        (FRT, 6 , 10),16:41
markos        (d0 , 11, 15),16:41
markos        (d1 , 16, 20),16:41
markos        (XO , 21, 30),16:41
markos        (d2 , 31, 31),16:41
markos    )16:41
markosbut I have no idea how/where to process the immediate value from16:41
Veera[m]<lkcl> "nmigen tests pass... trying ieee..." <- did it pass!!16:41
lkclVeera[m], yes, all good16:41
Veera[m]Is there any other work for this bug #88316:42
lkclPO 0-5... FRT 6-10 d0 11-15 d1 XO 21-30 ermmm ermermrm...16:42
lkclVeera[m], no that's good16:42
markosfollowed this: https://libre-soc.org/openpower/sv/int_fp_mv/#fmvis16:42
lkclmarkos, gimme a sec, that doesn't look right, DX-Form is supposed to be a 16-bit immediate16:42
lkclconcatenating d1|do|d2 should be 16-bit16:43
lkclMajor FRS d1 d0 XO d2 DX-Form16:43
lkclDX-Form not X-Form16:43
markoscrap, forgot to change that when copy-pasting the comment :)16:43
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/fields.text;hb=HEAD16:43
lkcl  5016:43
lkcl  51 # V3.0B 1.6.6 DX-FORM16:43
lkcl  52     |0    |6   |11   |16   |26   |3116:43
lkcl  53     | PO  |  RT|   d1|   d0|   XO|d216:43
lkclehm... i need to add FRT to that, 1 sec16:44
lkclFRS not FRT16:45
Veera[m]Bugs 839, 847 and 878 RFP lines you gave in email. Now for bug 883 can you give me!16:45
lkclVeera[m], can you run budget-sync yourself? in the middle of something16:45
lkclthen see contents mdwn/vklr.mdwn16:45
Veera[m]will try?16:45
lkclsee the README16:45
lkclhttps://git.libre-soc.org/?p=utils.git;a=blob;f=README.txt;h=cb29f299dd56ca02d51570404a5b24db4d5fe529;hb=c475120c2b2e69344345e485d895e6ee7f1b22d8#l1416:46
lkclmarkos, ok so i'm adding:16:46
lkcl--- a/openpower/isatables/fields.text16:46
lkcl+++ b/openpower/isatables/fields.text16:46
lkcl@@ -51,6 +51,7 @@16:46
lkcl # V3.0B 1.6.6 DX-FORM16:46
lkcl     |0    |6   |11   |16   |26   |3116:46
lkcl     | PO  |  RT|   d1|   d0|   XO|d216:46
lkcl+    | PO  | FRS|   d1|   d0|   XO|d216:46
lkcland16:46
lkcl@@ -523,7 +524,7 @@16:46
lkcl     FRS (6:10)16:46
lkcl-         Formats: D, X16:46
lkcl+         Formats: D, X, DX16:46
markosok16:46
markosfixed that here as well16:47
lkclwhich will give you the (correct, matching) DX-Form in int_fp_mv16:47
lkclwhat's the bugnumber again?16:47
lkcl885?16:47
markos88716:47
lkcloff of 234 i remember16:48
lkcl> <markos>     # however we are out of space with opcode 2216:49
lkclthat line can go, because this one is in fact going into EXT02216:49
lkclit's the sandbox but hey16:49
markoscool16:49
lkclbasically you're on the right lines16:49
markosI can't figure out where to parse the immediate value though16:50
lkclthat's already done16:50
markosoh nice16:50
lkclyou treat it as "just yet another number comma-separated"16:50
lkclthis stuff's *really* dumb-and-simple16:51
lkclnot in the least bit as sophisticated as binutils.16:51
markosok, I'll finish the testcase and commit asap and you could then tell me where I've got it wrong or completely derailed :)16:52
lkclplease make damn sure to run the *unrelated* unit tests i put in the checklist before git push16:52
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/sv/trans/svp64.py;h=1625ad98e910195a552d04e17a64f3fcc3683b70;hb=HEAD#l58216:52
lkcl 582         # now find opcode fields16:52
lkcl 583         fields = ''.join(ls[1:]).split(',')16:52
lkclso if you have fmvis 0,0x3FC016:52
markosyes ofc16:52
lkclthen fields gets set to16:53
lkcl["0", "0x3FC0"]16:53
lkcltheeeen...16:53
lkclwhere was it...16:53
lkcl 594         if custom_insn_hook is not None:16:53
lkcl 595             fields = tuple(map(to_number, fields))16:53
lkclthat converts fields to:16:53
lkcl[0, 16320]16:53
lkcland ya done :)16:54
lkclplease do put the bugreport number into the commit message(s)16:54
markosok, fingers crossed that should be done today unless I find something else I don't understand16:55
lkclfantastic. easy EUR 2,000 :)16:55
lkclwhich helps balance some of the other ones which are way too low16:55
Veera[m]lkcl: My run of budget-sync is failing. Also will you allot budget for persons in its page.17:00
lkclVeera[m], 1 sec17:05
lkclit shouldn't do.17:05
lkclarg i know why.  lower-case email.17:06
lkclgit pull17:06
markoslast couple of questions, which mdwn file for fmvis? fpload/fpmove/other? and similarly for the test cases17:11
markos+(last couple of questions) for now :)17:12
lkclmarkos, in the bugreport.  av.mdwn17:12
markosah missed that, ok thx17:12
lkcl* run "pywriter noall av" after each edit to av.mdwn, to produce17:13
lkcl  av.py17:13
lkclyou'll find av.py gets created in the same directory as caller.py17:13
lkclconsider adding to av.mdwn to be a "checkpoint" (commit-and-push-wise)17:15
lkclif you get to the point of having added to:17:17
lkcl* power_enums.py17:17
lkcl* sv/trans/svp64.py17:18
lkcl* major_22.csv17:18
lkcl* caller.py17:18
lkcl* av.mdwn17:18
lkclthen run the "safety" (no damage) checks and do "git push" on that.17:18
lkclwe can consider it a checkpoint and the unit test (test_caller_fmvis.py) can be done in a second round17:19
lkclVeera[m], i can't see any differences in bug numbers.  878, 839, 847 are the 3. was there one more?17:21
lkclfound it.17:22
Veera[m]lkcl: 88317:22
lkclbudget for you missing17:22
lkcldone (edit)17:23
lkclveera=80017:23
* lkcl re-running budget-sync, you should be able to do it now as well (git pull though)17:23
* octavius orienteering for a few hours, will be back later17:24
lkclthat's *three* separate RFPs, three separate messages, send them to me for review first ok?17:24
lkcloctavius, enjoy. i always got lost :)17:24
lkclVeera[m], run completed, emailed you17:25
Veera[m]ok17:25
markosgetting an error processing av, here's the major_22.csv diff:17:29
markos+++ b/openpower/isatables/major.csv17:29
markos@@ -55,3 +55,4 @@ opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry ou17:29
markos 3,TRAP,OP_TRAP,RA,CONST_SI,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,1,0,NONE,0,1,twi,D,17:29
markos 26,LOGICAL,OP_XOR,RS,CONST_UI,NONE,RA,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,xori,D,17:29
markos 27,LOGICAL,OP_XOR,RS,CONST_UI_HI,NONE,RA,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,xoris,D,17:29
markos+22,ALU,OP_FMVIS,CONST_UI,NONE,NONE,FRT,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,fmvis,DX,17:29
markosthe error is at KeyError: 'CONST_UI'17:29
markosTraceback (most recent call last):17:29
markos  File "/home/markos/src/openpower-isa/src/openpower/decoder/pseudo/parser.py", line 973, in __init__17:29
markos    self.parser = _CACHED_PARSERS[debug, form, incl_carry, helper]17:29
markosKeyError: (False, 'X', False, False)17:29
lkclmarkos, ok those are fun. 1 sec...17:33
lkclcheck the column headings17:33
lkclah, you've added to major.csv17:33
lkcldon't do that17:33
lkclthat takes over the *ENTIRETY* of EXT022 for the purposes of one operation: OP_FMVIS17:34
markosok, initially I added it to minor_22.csv17:34
markosbut the bug refers to major_22.csv and I got confused :)17:34
lkclah :)17:34
lkcldoh17:34
lkclnggh where is it...17:34
lkclminor_22.csv sorry17:35
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/minor_22.csv;hb=HEAD17:35
markosyup, will replace it17:35
lkcli edited the comment 0 https://bugs.libre-soc.org/show_bug.cgi?id=887#c017:36
lkclnow.17:36
lkcllook carefully at the column headings:17:36
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=887#c017:36
lkclwhoops17:36
lkcl   2 opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,17:36
lkclbetter17:36
lkclyou want something like:17:37
lkcl-----00011-,ALU,OP_FMVIS,FRS,CONST_UI,NONE,NONE,.....17:38
lkclwhich is17:38
lkclopcode=-----00011-17:39
lkclunit=ALU17:39
lkclinternal_op=OP_FMVIS17:39
lkclin1=FRS17:39
lkclin2=CONST_UI <<<--- you had this in in1 which is not supported17:39
lkclhang on....17:39
lkclsorry...17:39
markosshouldn't it be FRT?17:40
markosfor out?17:40
lkclFRS can be an Out as well17:40
lkcland yes17:40
markosah ok17:40
lkclso it is17:40
lkcl-----00011-,ALU,OP_FMVIS,NONE,CONST_UI,NONE,FRS,.....17:40
lkclin1=None17:40
lkclin2=CONST_UI17:40
lkclin3=NONE17:41
markosyup worked17:41
lkclout=FRS17:41
lkclhave a look in power_enums.py17:41
markosthis worked:17:41
markos+------00011,ALU,OP_FMVIS,FRS,CONST_UI,NONE,FRT,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,fmvis,DX,,1,unofficial until submitted and approved/renumbered by the opf isa wg17:41
markosbut I guess I should put FRS in out as well17:41
lkclthe list of what's supported by in1/in2/in3/out1/out2 is17:41
lkclno, just put FRS in out.17:41
lkcllook again at the page17:41
markosok17:41
lkclhttps://libre-soc.org/openpower/sv/int_fp_mv/#fmvis17:42
lkclMajor FRS d1 d0 XO d2 DX-Form17:42
lkclall of these things have to match up17:42
lkclit is quite a long list of moving parts but it all hangs together consistently17:42
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/decoder/power_enums.py;hb=HEAD#l46717:42
markoswill make sure everything is proper before I commit push17:43
lkclthat's what "in1" supports (class In1Sel). note how CONST_UI isn't on the list?17:43
lkclthis seems arbitrary but it is down to how the hardware works.17:43
markosI will get it eventually17:44
markosthis is exciting17:44
lkclthe "Register RB" path (in2) is overloaded inside microwatt and libre-soc (and probably IBM POWER 1 as well)17:44
lkclto take the immediate value17:44
lkclrather than have separate wires wasted17:44
lkcland that goes a long way towards explaining some of the choices of register operand names RA RB RC17:45
lkclyou will neverrrrrr see for example "powerinstruction RT, --->RB<---, immediate"17:45
lkclit will alllllways be17:45
lkclpowerinstruction RT, --->RA<----, immediate17:45
lkclbecause it is the *RB* data path that is shared - in the hardware - with getting immediate values to whatever ALu needs them17:46
lkclit's quite fascinating17:46
lkclyou think, "oh it's obvious how to design an ISA, just chuck some mnemonics together"17:47
lkclit doesn't work that way17:47
* lkcl need rest17:48
programmerjakenote fmvis should only accept integer immediates ... that's what powerpc already does for instructions with float immediates: https://gcc.godbolt.org/z/fhnnjhr6117:53
programmerjakedo note that vsx already has move-immediate-to-float-reg17:55
programmerjake(just discovered that)17:55
markosprogrammerjake, yes xxspltidp but that's for vector registers, not for scalars18:27
markosunless you mean another one18:28
markosre float immediates, that might be something for the assembler as a helper, ie automatic conversion to int constants18:29
markosI agree it's not really that big a deal, but it would be convenient18:30
markosah, just saw the comment in the bug report18:30
markosso yes, it exists but not for scalar which is a shame, loading fp constants can take up to 3 insns which is ridiculous if you're doing some complex expression with lots of coeffs18:32
programmerjakeimho float immediates should only be integers or fp, they shouldn't allow both because 1234.0 vs. 1234 (totally different values) is too confusing imho18:36
markosa notation could be mandated in that case, eg. scientific notation or a suffix18:41
markosin any case, that would be assembler specific18:41
markosI am not asking for that feature atm, converting to int is trivial anyway18:43
programmerjakescientific notation and/or hexadecimal scientific notation (0x12.34p+5) sound good to me!18:43
markoshahaha18:43
markosI'm sure people would love converting their trig constants to hex scientific notation :D18:44
markosmy biggest problem with floats immediates is conversion ambiguity18:44
markosit might lead to different ints altogether18:45
programmerjakeimho hex scientific notation is just as meaningful as decimal...the real number is irrational and the digits aren't any specific pattern...18:45
markosI know, but it's not entirely obvious to non-programmers unless it's explained18:45
programmerjakeuse javascript's standard --- round to nearest, ties to even18:45
markosotoh, non-programmers would not write SVP64 assembly :D18:46
markosand ofc it's already invented by IBM and it's not entirely the same thing https://en.wikipedia.org/wiki/IBM_hexadecimal_floating-point18:47
programmerjakethat's a totally different thing than hexadecimal literals...18:49
programmerjakei meant printf %a format18:49
markosyes I know, was just googling for caveats and found the above link18:56
programmerjakeoh, wow, apparently ibm hex floating point is used in gds ii files18:59
Veera[m]lkcl: Hey, emailed the RFPs to you.19:30
lkclVeera[m], looks great20:51
markosdon't remember, is there a meeting today as well?22:02
octaviusmeeting's on markos22:02
octaviuswaiting for lkcl atm22:02
lkclthank you everyone, apologies there was quite a lot to get through, not the usual "social" meeting style23:47
programmerjakenp23:49

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