Friday, 2021-03-12

cesar[m]2Maybe of interest: OpenHW Group and Mitacs announce a $22.5M research program for open-source processors.10:40
cesar[m]2https://www.openhwgroup.org/news/2021/03/09/openhw-group-and-mitacs-announce-openhw-accelerate/10:40
cesar[m]2The whole organization seems RISC-V centered, though.10:46
lkcl_nice!10:58
lkcl_oh dear :)10:59
lkcl_ah it's the ariane core11:00
lkcl_https://github.com/openhwgroup/core-v-cores11:00
lkcl_cesar[m]2: just sorting out 7-bit detection of RA_IS_ZERO11:01
lkcl_i think we do predication, next11:01
lkcl_(simultaneously with LD/ST but hey)11:01
lkcl_can you take a look at decoding the SVP64.RM modes enough to detect the predicates?11:02
lkcl_sorry, i mean the CR/INT predication fields11:03
lkcl_i put this in place to detect/decode the modes11:03
lkcl_https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_svp64_rm.py;hb=HEAD11:03
lkcl_but it is not in use yet, also not yet matched up with these11:05
lkcl_https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_enums.py;h=1254534d41aaa3e5ece31c8f2bafa21229f035f9;hb=2a77b489fee86c159214e5c0a33a2a2ce386eb82#l14611:05
cesar[m]2Sure, I'll take a look.11:06
lkcl_star.11:06
lkcl_i will need to do ISACaller first, but i need PowerDecoder2 to recognise the RM.Modes (power_enums.SVP64RMMode) first11:08
lkcl_btw you'll see i made SVP64 optional in PowerDecoder211:08
cesar[m]2By the way, I finally booted the tablet yesterday. A factory reset did it. Now, to restore the application data from backup.11:14
lkcl_hooray!11:23
lkcl_hmm PowerDecoder2 is not picking up RS properly11:35
lkcl_ahh because on ST it's a source register and i have it qualified as a dest11:36
lkcl_DOH!11:36
lkcl_hoo-rah11:44
lkcl_cesar[m]2: found a bug.  need to check *both* no_in_vec and no_out_vec for LD/ST (which is twin predicated)11:50
lkcl_i'll work that out11:54
programmerjakelkcl_: so, for adding setvl to the csv files, add it to major.csv, right?21:31
programmerjakeSince I'm adding it to use from the c++ header generator rather than from the nmigen code, what values should I fill in for fields like `unit`, `internal op`, `sgl pipe`, etc.?21:32
lkcl_major.csv is for opcodes that take up the entirety of the major opcode.21:35
lkcl_b for example21:36
programmerjakewell, you said to use opcode 22, nothing else uses that iirc21:38
lkcl_in this particular case, it would be a minor_22.csv where we decide that bits 26..30 are XO21:38
programmerjakeoh, ok21:38
lkcl_correct... but we're not allocating the *entirety* of opcode 22 to it21:38
lkcl_so it would be added to the subdecoders around here21:38
lkcl_https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_decoder.py;hb=HEAD#l55821:38
lkcl_where the "bitsel" argument would be .... ermm... 31-30 to 31-2621:39
programmerjakeso, copy minor_19.csv?21:39
lkcl_bitsel=(1,5)21:39
programmerjakeor would a different one be better?21:39
lkcl_or minor_62.csv yes21:39
lkcl_there's less to delete :)21:39
lkcl_notable "things" about the CSV columns21:40
lkcl_* RA_OR_ZERO is in the in1 column21:40
lkcl_* RT_OR_ZERO will have to be in the out column21:41
lkcl_(sigh i will have to add that capability)21:41
programmerjakewe could just change the semantics to always write RT21:41
lkcl_(done)21:42
lkcl_that implicitly removes the ability of setvl to do setvli and setmvli21:42
programmerjakesetvli was RA==0 right?21:43
lkcl_setvli with RA==0 can also have RT==0 as well21:43
lkcl_if it is desired not to have RT be updated with a copy of VL21:43
programmerjakeyeah, but since R0 is treated as a temporary anyway, what's the point?21:44
lkcl_it saves a write to the regfile21:44
programmerjakeis saving a write more costly then adding additional logic since this is the only instruction where RT==0 means don't write?21:45
lkcl_it's quite straightforward.  the logic exists to already not have registers optionally write to the regfile21:45
lkcl_including CRs, XER bits and so on21:46
programmerjakek21:46
lkcl_the other column is the Rc one, which will need to be set to... CR021:46
lkcl_1 sec...21:46
programmerjakeso, are you adding setvl to the csvs, or should I?21:47
lkcl_you do it21:47
lkcl_i'll check it21:47
programmerjakek21:47
programmerjakewhat XO should I use? 0?21:47
lkcl_yeah :)21:47
lkcl_just... bcoz :)21:48
lkcl_19's a good one to start from21:48
lkcl_https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/isatables/minor_19.csv;hb=HEAD21:48
lkcl_oh, err maybe not21:48
lkcl_there's no RA RB RC and no CR021:48
lkcl_ah!21:49
lkcl_https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/isatables/minor_30.csv;hb=HEAD21:49
lkcl_yes.21:49
lkcl_that one.21:49
* lkcl_ just added OP_SETVL21:50
lkcl_MicrOp.OP_SETVL21:51
lkcl_that goes in column... 321:51
lkcl_Function.SV is already there21:51
lkcl_so "SV" goes in column 221:51
lkcl_"CR out" will be CR021:52
lkcl_"rc" column will be RC21:52
* programmerjake < https://matrix.org/_matrix/media/r0/download/matrix.org/rmQAhsfpKmOclNLHQEMcUhYJ/message.txt >21:52
programmerjake+opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry out,ldst len,BR,sgn ext,upd,rsrv,32b,sgn,rc,lk,sgl pipe,comment,form21:53
programmerjake+0,SV,OP_SETVL,RA_OR_ZERO,CONST_SVI,NONE,RT_OR_ZERO,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,1,setvl,SVL21:53
lkcl_oo that was too log21:53
lkcl_ah better21:53
programmerjakelook good?21:54
lkcl_better 0b00000 for the first column.  Function (2nd) is VL, CONST_SVI should be None21:54
lkcl_RC,0,1,setvl,SVL21:54
lkcl_that "1" should be "0" towards the end21:54
lkcl_i have no idea what the "sgl pipe" field is in microwatt :)21:55
lkcl_i left it in21:55
programmerjakeso, sgl pipe just gets filled with whatever?21:55
lkcl_0,VL,OP_SETVL,RA_OR_ZERO,NONE,NONE,RT_OR_ZERO,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,setvl,SVL21:56
lkcl_totally ignored, yeah :)21:56
lkcl_i left it in, just in case the microwatt team ever want to use the same csv files21:56
programmerjake+opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry out,ldst len,BR,sgn ext,upd,rsrv,32b,sgn,rc,lk,sgl pipe,comment,form21:56
programmerjake+0b00000,VL,OP_SETVL,RA_OR_ZERO,NONE,NONE,RT_OR_ZERO,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,setvl,SVL21:56
lkcl_perfect21:56
lkcl_that shouuuld work fine21:57
lkcl_of course darn it binutils won't recognise this at all *sigh* so SVP64Asm will have to recognise it and perform a conversion to .long *sigh*21:57
programmerjakeoh, the code I already have does the conversion manually, since when we emit the C++ header file, the registers aren't known, so they have to be substituted into the assembly text by gcc, then the assembler does the math in the argument to the .long21:59
lkcl_you should be able to execute decoder/power_decoder.py and have it parse successfully and generate decoder.il21:59
programmerjakepushed21:59
lkcl_nice21:59
lkcl_ok let's try it21:59
programmerjakeyou'll probably have to update the submodule, since I just pushed the wiki, not soc22:00
lkcl_do you want to add it to power_decoder.py just to be able to say "i did"? :)22:00
programmerjakeidk, whatever you like22:00
lkcl_go for it.  it's 22:00 here i'm kinda winding down22:01
programmerjakek22:01
programmerjakedid you push your modifications to soc.git yet?22:01
lkcl_yehyeh22:02
lkcl_https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=HEAD22:02
programmerjakealso, in fields.txt, what's OPCD? the OpenPower spec calls that PO (primary opcode)22:02
lkcl_yyeaah one version of the spec uses OPCD, another uses PO22:03
lkcl_sigh22:03
programmerjakewait, which version uses OPCD?22:03
programmerjakeI've only ever seen PO22:04
lkcl_it might have been v2.0722:04
lkcl_it was a long time ago already :)22:04
programmerjakeyup, it is v2.07B22:06
programmerjakeI think we should do search/replace with PO since that's what the 3.x specs use22:06
lkcl_deep breath on that one22:08
lkcl_i can do it tomorrow22:08
programmerjakek, sounds good22:08
programmerjaketo be clear, replace OPCD with PO22:09
lkcl_ack22:09
lkcl_lkcl@fizzy:~/src/libresoc/soc/src/soc$ grep -r OPCD | wc22:09
lkcl_    820    7065   594022:09
lkcl_*splutter*22:09
lkcl_:)22:09
lkcl_that's because i have a ton of files where something with OPCD in it has ended up in some compiled output22:10
lkcl_.v, .il, litex verilator binaries (even!), gtkw and vcd files22:10
programmerjakesed -i 's/([^A-Z])OPCD([^A-Z])/\1PO  \2/g' fields.text22:10
lkcl_dang22:10
lkcl_acep->declBus(c+3456,"sim test_issuer ti core dec_BRANCH dec all_OPCD", false,-1, 5,0);22:11
lkcl_programmerjake: thx22:11
lkcl_need to check all the unit tests to make sure it's not having some unintended effect22:12
lkcl_hilariously it doesn't actually look like it's used in any nmigen code22:12
lkcl_urrr22:12
programmerjakethen delete the OPCD section in the list of fields to avoid redundant definitions22:12
programmerjake    OPCD (0:5)22:12
programmerjake        Primary opcode field.22:12
programmerjake        Formats: all22:12
lkcl_no, that would make it "not conformant to the spec"22:13
lkcl_section 1.722:13
programmerjakeumm, it still conforms to the spec since you renamed all ocurrences of OPCD to PO.22:13
lkcl_'ang on...22:13
programmerjakethen you just delete the definition of OPCD22:13
programmerjakethe v3.x specs don't even refer to OPCD iirc22:14
lkcl_OPCD would have been renamed to PO in the later section22:14
lkcl_    OPCD (0:5)22:14
lkcl_        Primary opcode field.22:14
lkcl_        Formats: all22:14
lkcl_becomes22:14
lkcl_      OP (0:5)22:14
lkcl_which _is_ in there, just in a different location (alphabetical)22:15
lkcl_i'll sort it tomorrow.22:15
* programmerjake < https://matrix.org/_matrix/media/r0/download/matrix.org/KWKTAXKDMkhCOstprMPBDamd/message.txt >22:16
programmerjakeoh, wow, matrix really messed up the formatting, hope it looks ok on irc22:16
lkcl_nope :) posts a link to matrix.org22:17
lkcl_https://matrix.org/_matrix/media/r0/download/matrix.org/KWKTAXKDMkhCOstprMPBDamd/message.txt22:17
programmerjakeoh, well22:18
lkcl_:)22:18
programmerjakealso, if you like you could access irc through matrix, that would allow you to see messages on your phone too, rather than having to go to your laptop22:19
programmerjakehttps://f-droid.org/packages/im.vector.app22:21
lkcl_yeah i'm looking for an irc client through f-droid.  first one i found, not so hot22:21
programmerjakefdroid's search doesn't work that well22:22
* lkcl_ running down. need sofa, tea and toast :)22:22
programmerjakeusing matrix's irc bridge: https://github.com/matrix-org/matrix-appservice-irc/wiki/Guide:-How-to-use-Matrix-to-participate-in-IRC-rooms22:23
lxodominant mobile operating systems seem to hate irc.  I sense a push for centralized IM platforms behind that.  we need more GNU-running mobiles22:23
programmerjakematrix's nice in that you can host your matrix acct on your own server and it works just fine22:24
lxo*but* AFAIK its IRC bridge is centralized, and it keeps your password22:25
programmerjakeyeah, but it's just as centralized as freenode is...you can always run your own irc bridge instance22:25
programmerjakesource for matrix/irc bridge: https://github.com/matrix-org/matrix-appservice-irc22:27
lxobut then you depend on *two* centralized platforms, and might miss the fact that it's not your own synapse that's keeping your IRC password22:27
lxoOTOH, most people don't even bother running their own synapse, and just go through with the Google CAPTCHA that matrix.org requires22:28
programmerjakeit does? I forgot22:29
lxothat's why we need more P2P IM.  if people can decide not to install and run their own separate server, they probably won't22:29
programmerjakeI'd guess that using the android app, you can bypass needing the captcha, though I havn't tried and could be wrong22:30
lxoI can't say that it does; I know that it did.  I was shocked, because I'd encouraged my daughter to install it and set up an account, and it led her to the google captcha22:30
lxothat was with riot on android22:31
programmerjakeok, well, sorry about that...22:31
lxoshe ended up setting up an account on the same server I used, libreplanetbr.org, but it sunset last month, so now I'm out of the matrix.  that's supposed to be good, right? :-)22:32
lxoI co-ran that server, in the spirit of "no cloud but that we make for ourselves".  I managed to move my diaspora and gnu social contacts, but I never used matrix seriously, so I didn't even realize I'd have to do something about it before the server went down22:35
lxoso now I don't have to ;-)22:36
programmerjakelkcl_: added subdecoder and missing Function.VL22:54
lkcl_ah! doh, column 2 in minor_22.csv was supposed to be the "SV" pipeline.  doh :)23:16
* lkcl_ just running a couple of quick tests23:18
lkcl_yosys "show dec22" on decode.il looks great23:18
lkcl_quick test_issuer_svp64.py works...23:18
* lkcl_ running the longer test_issuer.py...23:18
lkcl_looks great jacob.  test_issuer.py is gonna be a while :)23:20
programmerjakek, assuming you removed Function.VL then23:41

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