lkcl | markos, the opcode's already mapped out in this page https://libre-soc.org/openpower/sv/bitmanip/?updated | 00:17 |
---|---|---|
lkcl | you'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 |
lkcl | Veera[m], that's complicated :) it's quite chain | 02:31 |
lkcl | libsmt2 is used by cvc5, bitwuzla, z3 and yices | 02:31 |
lkcl | yosys can be told (by sby) to use one of cvc5, bitwuzla, z3, yices, for formal correctness | 02:32 |
lkcl | nmigen understands how to create sby files to instruct yosys to use one of.... | 02:32 |
lkcl | ieee754 fp library which is in nmigen has some unit tests which use a Formal Correctness test harness | 02:33 |
lkcl | ... | 02:33 |
lkcl | ... | 02:33 |
lkcl | ... | 02:33 |
lkcl | so it goes: | 02:33 |
lkcl | ieee754fp unit test -> | 02:33 |
lkcl | nmigen -> | 02:33 |
lkcl | sby -> | 02:33 |
lkcl | yosys -> | 02:33 |
lkcl | cvc5/bitwuzla/etc -> | 02:33 |
lkcl | smt2 | 02:33 |
Veera[m] | ok. thanks. | 02:34 |
lkcl | therefore you can run this unit test | 02:35 |
lkcl | https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/fpfma/test/test_fma_formal.py;hb=HEAD | 02:35 |
lkcl | but you have to have all the right branches in place | 02:35 |
lkcl | on yosys sby etc. | 02:35 |
lkcl | which is done by all the devscripts, correctly | 02:36 |
lkcl | like, this one: | 02:36 |
lkcl | https://git.libre-soc.org/?p=dev-env-setup.git;a=commitdiff;h=70b0c32a13869633f6ec91938482b4e0cebaf417 | 02:36 |
Veera[m] | built yosys sby cvc5 bitwuzla: success | 06:29 |
Veera[m] | ran python3 src/ieee754/fpfma/test/test_fma_formal.py | 06:29 |
Veera[m] | Ran 113 tests in 162.328s | 06:30 |
Veera[m] | OK (skipped=84) | 06:30 |
Veera[m] | Can anyone tell how to run the test with cvc5, bitwuzla | 06:31 |
Veera[m] | I mean is there a way to specify these for src/ieee754/fpfma/test/test_fma_formal.py | 06:31 |
programmerjake | it's all the solver=... lines in test_fma... | 06:55 |
programmerjake | it uses bitwuzla | 06:55 |
programmerjake | you can also run nmigen's tests -- 2 of them use cvc5 | 06:57 |
programmerjake | so, if you ran test_fma...py successfully, you already tested bitwuzla by running the fma tests | 06:58 |
Veera[m] | ok | 07:02 |
Veera[m] | how to run nmigen's tests; is there a command line! | 07:02 |
programmerjake | change to nmigen's root directory, then run pytest | 07:43 |
programmerjake | pip3 install pytest-xdist | 07:43 |
programmerjake | pytest -n auto | 07:43 |
programmerjake | pytest -n auto tests | 07:44 |
programmerjake | https://gitlab.com/nmigen/nmigen/-/blob/master/.gitlab-ci.yml | 07: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_real | 08:17 |
Veera[m] | both were cvc5 tests | 08:17 |
programmerjake | hmm, 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 cvc5 | 08:50 |
openpowerbot | [slack] <github> signin | 08: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=-fpermissive | 08:51 |
Veera[m] | -fpermissive is needed for antlr-3.4 | 08:52 |
programmerjake | can you look in nmigen/tests/spec_hdl_smtlib2_real_div/engine_0/logfile.txt | 08:53 |
Veera[m] | File "/usr/local/bin/../share/yosys/python3/smtio.py", line 360, in p_write | 08:56 |
Veera[m] | if flush: self.p.stdin.flush() | 08:56 |
Veera[m] | BrokenPipeError: [Errno 32] Broken pipe | 08:56 |
Veera[m] | I compiled cvc5 after yosys but before sby | 08:57 |
programmerjake | which yosys and sby commits are you on? | 08:58 |
Veera[m] | git checkout smtlib2-expr-support-on-0.13 | 08:59 |
Veera[m] | git clone https://git.libre-soc.org/git/SymbiYosys.git sby | 09:00 |
programmerjake | yeah, that branch has been changed in the past...which commit are you on? you can check with git log | 09:00 |
Veera[m] | yosys eb5f9d9de61411d22944c105cf3800f121f90666 | 09:01 |
Veera[m] | sby e3123283eaf129d19519bf72cd48e19b097552e6 | 09:01 |
programmerjake | yosys looks correct... | 09:02 |
programmerjake | sby too...hmm | 09:03 |
Veera[m] | should cvc5 and bitwuzla to be compiled before yosys | 09:04 |
programmerjake | shouldn't matter...cvc5 and bitwuzla don't depend on yosys, and compiling yosys doesn't depend on them | 09:06 |
programmerjake | what's the output of yosys -V | 09:07 |
Veera[m] | Yosys 0.13 (git sha1 eb5f9d9de, clang 7.0.1-8+deb10u2 -fPIC -Os) | 09:08 |
programmerjake | hmm, seems fine | 09:09 |
Veera[m] | Power has gone here. Can we discuss a little later. If urgent msgs are give me | 09:09 |
programmerjake | k, ttyl | 09:09 |
lkcl | ahh how much memory does this use? | 09:31 |
programmerjake | oh, 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 fma | 09:36 |
programmerjake | cvc5 may be less efficient | 09:36 |
programmerjake | i have 32GiB of ram and 24 cpu threads...so 1.33GiB per thread | 09:38 |
programmerjake | the build server has 8 threads and 20GiB ram | 09:38 |
programmerjake | gitlab.com's build servers have 1 thread and 4GiB ram | 09:40 |
lkcl | ok that should be enough. | 09:47 |
lkcl | just concerned that if Veera is using a local machine that he has enough RAM. | 10:02 |
lkcl | Veera[m], we need to get you a big UPS! :) | 10:03 |
lkcl | markos, i raised this for you with a checklist https://bugs.libre-soc.org/show_bug.cgi?id=887 | 10:17 |
markos | yes, already on it, implemented already most of it, working on the testcase now | 10:18 |
markos | ofc I expect some things to be fixed | 10: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 pages | 10:28 |
lkcl | jn: oooo, niiiice | 10:33 |
programmerjake | neat! | 10:33 |
lkcl | jn, not offtopic at all | 10:35 |
lkcl | markos, 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 that | 10:43 |
lkcl | given 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 issue | 10:43 |
lkcl | plus it's ridiculously easier anyway | 10:44 |
markos | ok, I'll sync with him to make sure I don't put an unnecessary burden on him too early | 10:44 |
lkcl | yes 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 limits | 10:47 |
lkcl | bottom line here is that svp64.py is extremely easy and quick to add things to, whilst binutils is a much longer cycle. | 10:48 |
lkcl | and we don't *in any way* want to go anywhere near the Oct 1st EU cut-off point for RFP submission. | 10:48 |
lkcl | NLnet has 300 grants being managed: we can assume a very large percentage of those will attempt to submit RFPs right at the last minute | 10:49 |
lkcl | NLnet then has to analyse those and put in its *own* RFP to the EU. | 10:50 |
lkcl | if that RFP - by NLnet - to the EU - is after Oct 1st it will be ***DENIED***. | 10:50 |
lkcl | markos, i added support at least for "0xNNN" and "0bmmmm" fields in svp64.py https://bugs.libre-soc.org/show_bug.cgi?id=887#c2 | 10:51 |
lkcl | so you can at least do "fmvis 0,0xFC40" | 10:52 |
markos | that's enough, getting the hex value of a fp constant is trivial | 10:52 |
lkcl | awesome | 10:53 |
lkcl | markos, 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 |
lkcl | if you wish your identity to remain confidential to the EU please let them know | 11:15 |
markos | lkcl, I did, I replied already | 11:20 |
lkcl | ah excellent, i can let the accountant know. | 11:23 |
Veera[m] | this is regarding cvc5 with sby | 11:26 |
Veera[m] | which I left earlier | 11: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_write | 11: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 pipe | 11: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 |
lkcl | can you commit the scripts to dev-env-setup and i'll run them in a local chroot to try a repro | 11:28 |
lkcl | i have both cvc5 and bitwuzla compiled (manually) and working perfectly | 11:29 |
Veera[m] | well, I will. need a little time. | 11:29 |
Veera[m] | To inform I am running these in PowerPC talos | 11:30 |
lkcl | don't worry if "it's not perfect" | 11:30 |
lkcl | the main thing is to have a look and reproduce it | 11:30 |
lkcl | ahh ok. | 11:30 |
lkcl | rright. so that means it's possible to ssh in and check the logs (etc.) | 11:30 |
Veera[m] | yep | 11:30 |
lkcl | let's hope it's not something to do with ppc64 vs x86 sigh | 11: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 output | 11:34 |
lkcl | 1 sec | 11:35 |
lkcl | Veera[m], just running as local user vklr in chroot cvc.1 now | 11:39 |
lkcl | i chown -R'd the entire src directory to vklr:vklr | 11:40 |
lkcl | that's the actual *command execution* failing | 11:41 |
lkcl | not an actual Formal Correctness error | 11:41 |
programmerjake | lkcl, 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 out | 11:42 |
lkcl | programmerjake, only needed to be run once | 11:42 |
lkcl | the formal proof for FIFO also fails | 11:43 |
lkcl | so it's nothing to do with smt2 / cvc5 / bitwuzla itself | 11:43 |
programmerjake | i mean take the sby test case generated there and run it on my x86 machine to see if it's before/after sby | 11:44 |
programmerjake | so, are you done modifying tests/spec_hdl_smtlib2_real_div? can i tar it up now? | 11:44 |
programmerjake | lkcl ^ | 11:45 |
lkcl | i haven't made any modifications. | 11:45 |
lkcl | i ran "nosetests3" once and one time only. | 11:46 |
programmerjake | running the tests makes modifications | 11:46 |
lkcl | 5 minutes ago i ran "nosetests3", once and only once | 11:47 |
lkcl | i've been examining the log output (and nohup.out) ever since | 11:47 |
programmerjake | k, tarring now | 11:47 |
lkcl | ah ha! | 11:48 |
lkcl | SMT Solver "yices-smt2" not found in path | 11:48 |
Veera[m] | lkcl: sorry I did not installed that | 11:50 |
lkcl | home/vklr/src/nmigen/tests/spec_lib_fifo_sync_not_fwft_pot/engine_0/logfile.txt | 11:50 |
lkcl | you need everything. | 11:50 |
* lkcl looking.... | 11:51 | |
Veera[m] | only installed z3 | 11:51 |
Veera[m] | also ghdl and ../ghdl-yosys-plugin was not installed | 11:51 |
lkcl | https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-tools-yosys;hb=HEAD | 11:51 |
lkcl | yyyeah you can probably get away with not including ghdl | 11:51 |
Veera[m] | Looking at nmigen tests only cvc5 and z3 was needed | 11:52 |
lkcl | i added that to the hdl-tools-yosys because of how often microwatt gets used | 11:52 |
programmerjake | if you're running nmigen's tests, you need at least yices, z3, and cvc5... | 11:52 |
lkcl | no, the FIFO test (which is nmigen) failed because yices is missing | 11:52 |
Veera[m] | pytest -n auto tests/test_hdl_smtlib2.py | 11:52 |
programmerjake | untarring, i noticed another potential issue --- the server's clock is wrong by a few minutes | 11:54 |
programmerjake | tar: spec_hdl_smtlib2_real_div: time stamp 2022-07-12 03:54:57 is 80.975790299 s in the future | 11:54 |
programmerjake | ^ after taking a few minutes to copy stuff around | 11:55 |
lkcl | mmm.... installing ntp... mmm.... that'll be fun.... | 11:56 |
lkcl | let me take care of it | 11:56 |
Veera[m] | shall I install yices and rerun tests to see. Are you guys finished processing my account directories | 11:56 |
programmerjake | i'm done, lkcl may still be doing stuff | 11:56 |
lkcl | Veera[m], yes go for it | 11:59 |
lkcl | that was scary. installing ntpd, dpkg failed. fail2ban had terminated at some point and left an entry in /var/run | 11:59 |
programmerjake | on my pc, the sby test passes...so the problem is sby or later | 12:00 |
lkcl | programmerjake, see src/nmigen/tests/spec_lib_fifo_sync_not_fwft_pot/engine_0/logfile.txt | 12:00 |
lkcl | i'd expect the problems to magically go away entirely once yices2 is installed | 12:01 |
programmerjake | k, i can look at that too, i was looking at spec_..._real_div/ | 12:01 |
lkcl | ntpd is now operational | 12:01 |
programmerjake | yay | 12:02 |
lkcl | with yices2 missing there's not much point investigating further | 12:02 |
lkcl | then have a look at spec_...._real_div/engine_0/logfile.txt | 12:02 |
programmerjake | installing yices won't fix cvc5... | 12:02 |
lkcl | and you'll likely see that it... ahhh | 12:02 |
lkcl | 1 sec | 12:02 |
lkcl | yeah that one looks a lot more fun | 12:04 |
Veera[m] | Still FAILS with yices2 installed | 12:05 |
Veera[m] | mean cvc5 ones | 12:06 |
lkcl | i'm using this | 12:06 |
lkcl | $ cvc5 --version | 12:06 |
lkcl | This is cvc5 version 1.0.1-dev.160.2a397ba9a [git 2a397ba9a on branch main] | 12:06 |
lkcl | you have version 1.0.0 | 12:07 |
lkcl | it'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_real | 12:08 |
Veera[m] | ======================== 2 failed, 870 passed in 14.40s ======================== | 12:08 |
Veera[m] | https://bugs.libre-soc.org/show_bug.cgi?id=883#c1 | 12:09 |
programmerjake | ieee754fpu and nmigen ci use cvc5 1.0 -- so that shouldn't be the issue | 12:09 |
lkcl | Veera[m], take a look at src/nmigen/tests/spec_hdl_smtlib2_real_div/engine_0/logfile.txt | 12:09 |
lkcl | that's giving more detail | 12:10 |
programmerjake | lkcl: basically that's just python's backtrace from sigpipe | 12:10 |
lkcl | i have a sneaking suspicion this is going to be down to ppc64 / x86 differences | 12:10 |
lkcl | programmerjake, yes. it's a bit more than "an assert occurred" | 12:11 |
programmerjake | no details on why cvc5 terminated tho... | 12:11 |
* lkcl thinks | 12:11 | |
lkcl | Veera[m], ok, can you assume this is fine, complete the dev-env-setup script | 12:11 |
lkcl | (add cvc5 and bitwuzla) | 12:11 |
lkcl | then i'll do a repro here on x86 | 12:12 |
Veera[m] | lkcl: ok | 12:12 |
programmerjake | i've debugged stuff like this before...i'll look into cvc5 issues tomorrow...4:12am here | 12:12 |
lkcl | programmerjake, :) | 12:12 |
lkcl | take it easy! | 12:12 |
programmerjake | had similar sby solver termination issues | 12:13 |
programmerjake | basically sby swallows the solver's output error messages, then terminates | 12:14 |
programmerjake | actually, yosys-smtbmc does | 12:14 |
programmerjake | gn | 12:16 |
octavius | hi 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=31c0963eec1866251e343b40ec0f527577c5b932 | 13:44 |
lkcl | octavius, yes, https://bugs.libre-soc.org/show_bug.cgi?id=890 | 13:45 |
Veera[m] | Checked the scripts they are building fine. | 13:45 |
lkcl | Veera[m], fantastic | 13:45 |
lkcl | i'll start an install now | 13:46 |
octavius | Yes, I'll try to set those up in a new chroot | 13:46 |
lkcl | octavius, we need to get you onto the NGI POINTER Grant | 13:49 |
lkcl | toshywoshy, vantosh as well | 13:49 |
lkcl | i'll send out the message now to FundingBox | 13:49 |
octavius | thanks | 13:49 |
octavius | lkcl, should I also make an iwiki page for tasyagle/HiTas? Useful as I'll be documenting as I'm setting up | 13:53 |
lkcl | yes please | 13:53 |
octavius | ack :) | 14:03 |
lkcl | frickin lot of admin today | 14:15 |
Veera[m] | Ran "make check" for cvc5 and got: 1% tests passed, 2936 tests failed out of 2966 | 14:17 |
Veera[m] | Looked at running log: In many of the tests cvc5 segfaults | 14: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 |
lkcl | greeeat | 14:42 |
lkcl | that's total bullshit. | 14:43 |
lkcl | it's *really* not hard when writing non-GUI software to make it run portably. | 14:43 |
lkcl | sigh | 14:44 |
Veera[m] | Bug 878 - image conversion explaining multi-issue; Ah where to put this finished image in wiki or somewhere else? | 14:54 |
lkcl | Veera[m], i'll find somewhere for it. there are a couple of places, i haven't entirely decided where, though | 15:15 |
lkcl | the task is done, for you, though. | 15:15 |
Veera[m] | ok | 15:16 |
lkcl | Veera[m], builds cleanly. running nosetest3 now | 15:19 |
lkcl | nmigen tests pass... trying ieee754fp now | 15:23 |
octavius | lkcl, 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 issue | 15: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_predicate | 15:35 |
markos | lkcl, will there be a sv.fmvis instruction? would be fun setting a fp constants in a ton of registers using immediates :D | 16:12 |
markos | though, come to think of it, it's not very useful, it's enough to set one register and then just copy that to the rest | 16:33 |
lkcl | markos, automatically. yes. you have to run sv_analysis to get it to be "analysed" and create the SVRM*.csv files | 16:34 |
lkcl | that's wasting one instruction. a broadcast-splat is perfectly reasonable to have, especially when predicated | 16:35 |
lkcl | and because it is an immediate, that would save a hell of a lot of register hazard dependencies. | 16:36 |
lkcl | octavius, you saw i tracked down the build dependencies from debian/rules? that file will be for e.g. debian/7 or debian/8 | 16:36 |
lkcl | (jre-6) | 16:36 |
lkcl | so you'll have to hunt (apt-cache search) for equivalent up-to-date libraries, inside the debian/10 chroot | 16:37 |
lkcl | or use packages.debian.org | 16:37 |
octavius | Yeah, I don't know how you'd get jre-6 though. Do later versions not support it? | 16:37 |
lkcl | ghostmansd[m], yes i was wondering why the inversion of all those tests were missing | 16:37 |
lkcl | octavius, you don't. | 16:37 |
lkcl | octavius, "><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 |
octavius | Yeah | 16:38 |
markos | lkcl, 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 |
markos | btw, which pastebin do you use? | 16:40 |
lkcl | markos, irc :) | 16:40 |
markos | haha ok | 16:40 |
markos | this is a first form | 16:40 |
markos | def fmvis(fields): | 16:40 |
markos | # XXX WARNING THESE ARE NOT APPROVED BY OPF ISA WG | 16:40 |
markos | # however we are out of space with opcode 22 | 16:40 |
markos | # 1.6.7 X-FORM | 16:40 |
markos | # |0 |6 |7|8|9 |10 |11|12|13 |15|16|17 |20|21 |31 | | 16:40 |
lkcl | because otherwise i have to actually set one up and make sure it's logged | 16:40 |
markos | # | PO | FRS | d1 | d0 | XO |d2 | | 16:40 |
markos | PO = 22 | 16:40 |
markos | XO = 0b000011 | 16:40 |
markos | (FRT, d0, d1, d2) = fields | 16:41 |
lkcl | careful 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 |
markos | but I have no idea how/where to process the immediate value from | 16:41 |
Veera[m] | <lkcl> "nmigen tests pass... trying ieee..." <- did it pass!! | 16:41 |
lkcl | Veera[m], yes, all good | 16:41 |
Veera[m] | Is there any other work for this bug #883 | 16:42 |
lkcl | PO 0-5... FRT 6-10 d0 11-15 d1 XO 21-30 ermmm ermermrm... | 16:42 |
lkcl | Veera[m], no that's good | 16:42 |
markos | followed this: https://libre-soc.org/openpower/sv/int_fp_mv/#fmvis | 16:42 |
lkcl | markos, gimme a sec, that doesn't look right, DX-Form is supposed to be a 16-bit immediate | 16:42 |
lkcl | concatenating d1|do|d2 should be 16-bit | 16:43 |
lkcl | Major FRS d1 d0 XO d2 DX-Form | 16:43 |
lkcl | DX-Form not X-Form | 16:43 |
markos | crap, forgot to change that when copy-pasting the comment :) | 16:43 |
lkcl | https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/fields.text;hb=HEAD | 16:43 |
lkcl | 50 | 16:43 |
lkcl | 51 # V3.0B 1.6.6 DX-FORM | 16:43 |
lkcl | 52 |0 |6 |11 |16 |26 |31 | 16:43 |
lkcl | 53 | PO | RT| d1| d0| XO|d2 | 16:43 |
lkcl | ehm... i need to add FRT to that, 1 sec | 16:44 |
lkcl | FRS not FRT | 16:45 |
Veera[m] | Bugs 839, 847 and 878 RFP lines you gave in email. Now for bug 883 can you give me! | 16:45 |
lkcl | Veera[m], can you run budget-sync yourself? in the middle of something | 16:45 |
lkcl | then see contents mdwn/vklr.mdwn | 16:45 |
Veera[m] | will try? | 16:45 |
lkcl | see the README | 16:45 |
lkcl | https://git.libre-soc.org/?p=utils.git;a=blob;f=README.txt;h=cb29f299dd56ca02d51570404a5b24db4d5fe529;hb=c475120c2b2e69344345e485d895e6ee7f1b22d8#l14 | 16:46 |
lkcl | markos, ok so i'm adding: | 16:46 |
lkcl | --- a/openpower/isatables/fields.text | 16:46 |
lkcl | +++ b/openpower/isatables/fields.text | 16:46 |
lkcl | @@ -51,6 +51,7 @@ | 16:46 |
lkcl | # V3.0B 1.6.6 DX-FORM | 16:46 |
lkcl | |0 |6 |11 |16 |26 |31 | 16:46 |
lkcl | | PO | RT| d1| d0| XO|d2 | 16:46 |
lkcl | + | PO | FRS| d1| d0| XO|d2 | 16:46 |
lkcl | and | 16:46 |
lkcl | @@ -523,7 +524,7 @@ | 16:46 |
lkcl | FRS (6:10) | 16:46 |
lkcl | - Formats: D, X | 16:46 |
lkcl | + Formats: D, X, DX | 16:46 |
markos | ok | 16:46 |
markos | fixed that here as well | 16:47 |
lkcl | which will give you the (correct, matching) DX-Form in int_fp_mv | 16:47 |
lkcl | what's the bugnumber again? | 16:47 |
lkcl | 885? | 16:47 |
markos | 887 | 16:47 |
lkcl | off of 234 i remember | 16:48 |
lkcl | > <markos> # however we are out of space with opcode 22 | 16:49 |
lkcl | that line can go, because this one is in fact going into EXT022 | 16:49 |
lkcl | it's the sandbox but hey | 16:49 |
markos | cool | 16:49 |
lkcl | basically you're on the right lines | 16:49 |
markos | I can't figure out where to parse the immediate value though | 16:50 |
lkcl | that's already done | 16:50 |
markos | oh nice | 16:50 |
lkcl | you treat it as "just yet another number comma-separated" | 16:50 |
lkcl | this stuff's *really* dumb-and-simple | 16:51 |
lkcl | not in the least bit as sophisticated as binutils. | 16:51 |
markos | ok, 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 |
lkcl | please make damn sure to run the *unrelated* unit tests i put in the checklist before git push | 16:52 |
lkcl | https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/sv/trans/svp64.py;h=1625ad98e910195a552d04e17a64f3fcc3683b70;hb=HEAD#l582 | 16:52 |
lkcl | 582 # now find opcode fields | 16:52 |
lkcl | 583 fields = ''.join(ls[1:]).split(',') | 16:52 |
lkcl | so if you have fmvis 0,0x3FC0 | 16:52 |
markos | yes ofc | 16:52 |
lkcl | then fields gets set to | 16:53 |
lkcl | ["0", "0x3FC0"] | 16:53 |
lkcl | theeeen... | 16:53 |
lkcl | where 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 |
lkcl | that converts fields to: | 16:53 |
lkcl | [0, 16320] | 16:53 |
lkcl | and ya done :) | 16:54 |
lkcl | please do put the bugreport number into the commit message(s) | 16:54 |
markos | ok, fingers crossed that should be done today unless I find something else I don't understand | 16:55 |
lkcl | fantastic. easy EUR 2,000 :) | 16:55 |
lkcl | which helps balance some of the other ones which are way too low | 16:55 |
Veera[m] | lkcl: My run of budget-sync is failing. Also will you allot budget for persons in its page. | 17:00 |
lkcl | Veera[m], 1 sec | 17:05 |
lkcl | it shouldn't do. | 17:05 |
lkcl | arg i know why. lower-case email. | 17:06 |
lkcl | git pull | 17:06 |
markos | last couple of questions, which mdwn file for fmvis? fpload/fpmove/other? and similarly for the test cases | 17:11 |
markos | +(last couple of questions) for now :) | 17:12 |
lkcl | markos, in the bugreport. av.mdwn | 17:12 |
markos | ah missed that, ok thx | 17:12 |
lkcl | * run "pywriter noall av" after each edit to av.mdwn, to produce | 17:13 |
lkcl | av.py | 17:13 |
lkcl | you'll find av.py gets created in the same directory as caller.py | 17:13 |
lkcl | consider adding to av.mdwn to be a "checkpoint" (commit-and-push-wise) | 17:15 |
lkcl | if you get to the point of having added to: | 17:17 |
lkcl | * power_enums.py | 17:17 |
lkcl | * sv/trans/svp64.py | 17:18 |
lkcl | * major_22.csv | 17:18 |
lkcl | * caller.py | 17:18 |
lkcl | * av.mdwn | 17:18 |
lkcl | then run the "safety" (no damage) checks and do "git push" on that. | 17:18 |
lkcl | we can consider it a checkpoint and the unit test (test_caller_fmvis.py) can be done in a second round | 17:19 |
lkcl | Veera[m], i can't see any differences in bug numbers. 878, 839, 847 are the 3. was there one more? | 17:21 |
lkcl | found it. | 17:22 |
Veera[m] | lkcl: 883 | 17:22 |
lkcl | budget for you missing | 17:22 |
lkcl | done (edit) | 17:23 |
lkcl | veera=800 | 17: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 later | 17:24 | |
lkcl | that's *three* separate RFPs, three separate messages, send them to me for review first ok? | 17:24 |
lkcl | octavius, enjoy. i always got lost :) | 17:24 |
lkcl | Veera[m], run completed, emailed you | 17:25 |
Veera[m] | ok | 17:25 |
markos | getting an error processing av, here's the major_22.csv diff: | 17:29 |
markos | +++ b/openpower/isatables/major.csv | 17: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 ou | 17: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 |
markos | the error is at KeyError: 'CONST_UI' | 17:29 |
markos | Traceback (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 |
markos | KeyError: (False, 'X', False, False) | 17:29 |
lkcl | markos, ok those are fun. 1 sec... | 17:33 |
lkcl | check the column headings | 17:33 |
lkcl | ah, you've added to major.csv | 17:33 |
lkcl | don't do that | 17:33 |
lkcl | that takes over the *ENTIRETY* of EXT022 for the purposes of one operation: OP_FMVIS | 17:34 |
markos | ok, initially I added it to minor_22.csv | 17:34 |
markos | but the bug refers to major_22.csv and I got confused :) | 17:34 |
lkcl | ah :) | 17:34 |
lkcl | doh | 17:34 |
lkcl | nggh where is it... | 17:34 |
lkcl | minor_22.csv sorry | 17:35 |
lkcl | https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/minor_22.csv;hb=HEAD | 17:35 |
markos | yup, will replace it | 17:35 |
lkcl | i edited the comment 0 https://bugs.libre-soc.org/show_bug.cgi?id=887#c0 | 17:36 |
lkcl | now. | 17:36 |
lkcl | look carefully at the column headings: | 17:36 |
lkcl | https://bugs.libre-soc.org/show_bug.cgi?id=887#c0 | 17:36 |
lkcl | whoops | 17:36 |
lkcl | 2 opcode,unit,internal op,in1,in2,in3,out,CR in,CR out, | 17:36 |
lkcl | better | 17:36 |
lkcl | you want something like: | 17:37 |
lkcl | -----00011-,ALU,OP_FMVIS,FRS,CONST_UI,NONE,NONE,..... | 17:38 |
lkcl | which is | 17:38 |
lkcl | opcode=-----00011- | 17:39 |
lkcl | unit=ALU | 17:39 |
lkcl | internal_op=OP_FMVIS | 17:39 |
lkcl | in1=FRS | 17:39 |
lkcl | in2=CONST_UI <<<--- you had this in in1 which is not supported | 17:39 |
lkcl | hang on.... | 17:39 |
lkcl | sorry... | 17:39 |
markos | shouldn't it be FRT? | 17:40 |
markos | for out? | 17:40 |
lkcl | FRS can be an Out as well | 17:40 |
lkcl | and yes | 17:40 |
markos | ah ok | 17:40 |
lkcl | so it is | 17:40 |
lkcl | -----00011-,ALU,OP_FMVIS,NONE,CONST_UI,NONE,FRS,..... | 17:40 |
lkcl | in1=None | 17:40 |
lkcl | in2=CONST_UI | 17:40 |
lkcl | in3=NONE | 17:41 |
markos | yup worked | 17:41 |
lkcl | out=FRS | 17:41 |
lkcl | have a look in power_enums.py | 17:41 |
markos | this 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 wg | 17:41 |
markos | but I guess I should put FRS in out as well | 17:41 |
lkcl | the list of what's supported by in1/in2/in3/out1/out2 is | 17:41 |
lkcl | no, just put FRS in out. | 17:41 |
lkcl | look again at the page | 17:41 |
markos | ok | 17:41 |
lkcl | https://libre-soc.org/openpower/sv/int_fp_mv/#fmvis | 17:42 |
lkcl | Major FRS d1 d0 XO d2 DX-Form | 17:42 |
lkcl | all of these things have to match up | 17:42 |
lkcl | it is quite a long list of moving parts but it all hangs together consistently | 17:42 |
lkcl | https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/decoder/power_enums.py;hb=HEAD#l467 | 17:42 |
markos | will make sure everything is proper before I commit push | 17:43 |
lkcl | that's what "in1" supports (class In1Sel). note how CONST_UI isn't on the list? | 17:43 |
lkcl | this seems arbitrary but it is down to how the hardware works. | 17:43 |
markos | I will get it eventually | 17:44 |
markos | this is exciting | 17:44 |
lkcl | the "Register RB" path (in2) is overloaded inside microwatt and libre-soc (and probably IBM POWER 1 as well) | 17:44 |
lkcl | to take the immediate value | 17:44 |
lkcl | rather than have separate wires wasted | 17:44 |
lkcl | and that goes a long way towards explaining some of the choices of register operand names RA RB RC | 17:45 |
lkcl | you will neverrrrrr see for example "powerinstruction RT, --->RB<---, immediate" | 17:45 |
lkcl | it will alllllways be | 17:45 |
lkcl | powerinstruction RT, --->RA<----, immediate | 17:45 |
lkcl | because it is the *RB* data path that is shared - in the hardware - with getting immediate values to whatever ALu needs them | 17:46 |
lkcl | it's quite fascinating | 17:46 |
lkcl | you think, "oh it's obvious how to design an ISA, just chuck some mnemonics together" | 17:47 |
lkcl | it doesn't work that way | 17:47 |
* lkcl need rest | 17:48 | |
programmerjake | note fmvis should only accept integer immediates ... that's what powerpc already does for instructions with float immediates: https://gcc.godbolt.org/z/fhnnjhr61 | 17:53 |
programmerjake | do note that vsx already has move-immediate-to-float-reg | 17:55 |
programmerjake | (just discovered that) | 17:55 |
markos | programmerjake, yes xxspltidp but that's for vector registers, not for scalars | 18:27 |
markos | unless you mean another one | 18:28 |
markos | re float immediates, that might be something for the assembler as a helper, ie automatic conversion to int constants | 18:29 |
markos | I agree it's not really that big a deal, but it would be convenient | 18:30 |
markos | ah, just saw the comment in the bug report | 18:30 |
markos | so 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 coeffs | 18:32 |
programmerjake | imho float immediates should only be integers or fp, they shouldn't allow both because 1234.0 vs. 1234 (totally different values) is too confusing imho | 18:36 |
markos | a notation could be mandated in that case, eg. scientific notation or a suffix | 18:41 |
markos | in any case, that would be assembler specific | 18:41 |
markos | I am not asking for that feature atm, converting to int is trivial anyway | 18:43 |
programmerjake | scientific notation and/or hexadecimal scientific notation (0x12.34p+5) sound good to me! | 18:43 |
markos | hahaha | 18:43 |
markos | I'm sure people would love converting their trig constants to hex scientific notation :D | 18:44 |
markos | my biggest problem with floats immediates is conversion ambiguity | 18:44 |
markos | it might lead to different ints altogether | 18:45 |
programmerjake | imho hex scientific notation is just as meaningful as decimal...the real number is irrational and the digits aren't any specific pattern... | 18:45 |
markos | I know, but it's not entirely obvious to non-programmers unless it's explained | 18:45 |
programmerjake | use javascript's standard --- round to nearest, ties to even | 18:45 |
markos | otoh, non-programmers would not write SVP64 assembly :D | 18:46 |
markos | and ofc it's already invented by IBM and it's not entirely the same thing https://en.wikipedia.org/wiki/IBM_hexadecimal_floating-point | 18:47 |
programmerjake | that's a totally different thing than hexadecimal literals... | 18:49 |
programmerjake | i meant printf %a format | 18:49 |
markos | yes I know, was just googling for caveats and found the above link | 18:56 |
programmerjake | oh, wow, apparently ibm hex floating point is used in gds ii files | 18:59 |
Veera[m] | lkcl: Hey, emailed the RFPs to you. | 19:30 |
lkcl | Veera[m], looks great | 20:51 |
markos | don't remember, is there a meeting today as well? | 22:02 |
octavius | meeting's on markos | 22:02 |
octavius | waiting for lkcl atm | 22:02 |
lkcl | thank you everyone, apologies there was quite a lot to get through, not the usual "social" meeting style | 23:47 |
programmerjake | np | 23:49 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!