tb: Move BIT to util
This function may be useful for other testbenches. Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
a179ccb9ab
commit
afbb64023e
|
@ -6,8 +6,7 @@ from cocotb.clock import Clock
|
|||
from cocotb.triggers import FallingEdge, Timer
|
||||
from cocotb.types import LogicArray
|
||||
|
||||
def BIT(n):
|
||||
return 1 << n
|
||||
from .util import BIT
|
||||
|
||||
BMCR = 0
|
||||
BMSR = 1
|
||||
|
|
|
@ -16,6 +16,9 @@ async def async_iter(it):
|
|||
for i in it:
|
||||
yield i
|
||||
|
||||
def BIT(n):
|
||||
return 1 << n
|
||||
|
||||
# From https://stackoverflow.com/a/7864317/5086505
|
||||
class classproperty(property):
|
||||
def __get__(self, cls, owner):
|
||||
|
|
Loading…
Reference in New Issue