projects
/
nmigen-gf.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Move files from libreriscv.git/openpower/sv/bitmanip/
[nmigen-gf.git]
/
gf_reference
/
clmul.py
1
def
clmul
(
a
,
b
):
2
x
=
0
3
i
=
0
4
while
b
>>
i
!=
0
:
5
if
(
b
>>
i
) &
1
:
6
x ^
=
a
<<
i
7
i
+=
1
8
return
x