projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff10b5b
)
(no commit message)
author
lkcl
<lkcl@web>
Sun, 6 Mar 2022 10:01:29 +0000
(10:01 +0000)
committer
IkiWiki
<ikiwiki.info>
Sun, 6 Mar 2022 10:01:29 +0000
(10:01 +0000)
openpower/sv/bitmanip.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/bitmanip.mdwn
b/openpower/sv/bitmanip.mdwn
index 3519fcf6f44b6a6b7d17b2254834917142448d56..9ea7249a11b2e5b6f83e397983be7917174b1edc 100644
(file)
--- a/
openpower/sv/bitmanip.mdwn
+++ b/
openpower/sv/bitmanip.mdwn
@@
-681,7
+681,7
@@
def gf_invert(a, mod=0x1B) :
v = mod
g1 = 1
g2 = 0
- j = gf_degree(a) -
mod_degree
+ j = gf_degree(a) -
8
while (a != 1) :
if (j < 0) :
@@
-692,8
+692,8
@@
def gf_invert(a, mod=0x1B) :
a ^= v << j
g1 ^= g2 << j
- a %= (1<<
mod_degree
) # Emulating 8-bit overflow
- g1 %= (1<<
mod_degree
) # Emulating 8-bit overflow
+ a %= (1<<
8
) # Emulating 8-bit overflow
+ g1 %= (1<<
8
) # Emulating 8-bit overflow
j = gf_degree(a) - gf_degree(v)