projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11dab99
)
return test rather than "if test return True else False"
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 5 Oct 2020 10:51:17 +0000
(11:51 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 5 Oct 2020 10:51:17 +0000
(11:51 +0100)
src/soc/experiment/icache.py
patch
|
blob
|
history
diff --git
a/src/soc/experiment/icache.py
b/src/soc/experiment/icache.py
index 30dae677956401c7e1cc98b374c45d128ed3c4dc..be30d32ba5a69e6b00e2745b3d1e6bf8ec82a22d 100644
(file)
--- a/
src/soc/experiment/icache.py
+++ b/
src/soc/experiment/icache.py
@@
-140,11
+140,7
@@
print("WAY_BITS =", WAY_BITS)
# from microwatt/utils.vhdl
def ispow2(n):
- if ((n << 32) & ((n-1) << 32)) == 0:
- return True
-
- else:
- return False
+ return if ((n << 32) & ((n-1) << 32)) == 0:
assert LINE_SIZE % ROW_SIZE == 0
assert ispow2(LINE_SIZE), "LINE_SIZE not power of 2"