From: lkcl Date: Wed, 9 Mar 2022 09:07:32 +0000 (+0000) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~3111 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fcf1817a104d2704dec4b2b5c06c97a75800f0b2;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index 0a9e6df0c..b8eb5922a 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -623,7 +623,7 @@ if __name__ == "__main__": # Evaluate the product (x^7)(x^7 + x + 1) print("{:02x}".format(multGF2(0b10000000, 0b10000011))) ``` -## GF div and mod +## GF2 (carryless) div and mod ``` def gf_degree(a) : @@ -659,11 +659,10 @@ def FullDivision(self, f, v): mask >>= 1 return (res, rem) ``` - -| 0.5|6.10|11.15|16.20|21.25| 26..30 |31| name | -| -- | -- | --- | --- | --- | ------- |--| ----- | -| NN | RS | RA | deg | RC | 0 1 011 |Rc| gfaddi | -| NN | RS | RA | RB | RC | 1 1 111 |Rc| gfadd | +| 0.5|6.10|11.15|16.20| 21 | 22.23 | 24....30 |31| name | +| -- | -- | --- | --- | -- | ----- | -------- |--| ---- | +| NN | RT | RA | RB | 1 | 00 | 0001 110 |Rc| cldiv | +| NN | RT | RA | RB | 1 | 01 | 0001 110 |Rc| clmod | GFMOD is a pseudo-op where RA=0