mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +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
|