mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
13 lines
194 B
Python
13 lines
194 B
Python
|
SLOW, MEDIUM, FAST = range(3)
|
||
|
|
||
|
BEHAVIOR, STRUCTURE = range(2)
|
||
|
|
||
|
def log2ceil(n):
|
||
|
m = 0
|
||
|
p = 1
|
||
|
for i in range(n+1):
|
||
|
if p < n:
|
||
|
m += 1
|
||
|
p *= 2
|
||
|
return m
|