Remove inherit from object
This commit is contained in:
@@ -47,7 +47,7 @@ AxiReadRespCmd = namedtuple("AxiReadRespCmd", ["address", "length", "size", "cyc
|
||||
AxiReadResp = namedtuple("AxiReadResp", ["address", "data", "resp", "user"])
|
||||
|
||||
|
||||
class AxiMasterWrite(object):
|
||||
class AxiMasterWrite:
|
||||
def __init__(self, entity, name, clock, reset=None, max_burst_len=256):
|
||||
self.log = logging.getLogger(f"cocotb.{entity._name}.{name}")
|
||||
|
||||
@@ -361,7 +361,7 @@ class AxiMasterWrite(object):
|
||||
self.in_flight_operations -= 1
|
||||
|
||||
|
||||
class AxiMasterRead(object):
|
||||
class AxiMasterRead:
|
||||
def __init__(self, entity, name, clock, reset=None, max_burst_len=256):
|
||||
self.log = logging.getLogger(f"cocotb.{entity._name}.{name}")
|
||||
|
||||
@@ -658,7 +658,7 @@ class AxiMasterRead(object):
|
||||
self.in_flight_operations -= 1
|
||||
|
||||
|
||||
class AxiMaster(object):
|
||||
class AxiMaster:
|
||||
def __init__(self, entity, name, clock, reset=None, max_burst_len=256):
|
||||
self.write_if = None
|
||||
self.read_if = None
|
||||
|
||||
@@ -43,7 +43,7 @@ AxiLiteReadRespCmd = namedtuple("AxiLiteReadRespCmd", ["address", "length", "cyc
|
||||
AxiLiteReadResp = namedtuple("AxiLiteReadResp", ["address", "data", "resp"])
|
||||
|
||||
|
||||
class AxiLiteMasterWrite(object):
|
||||
class AxiLiteMasterWrite:
|
||||
def __init__(self, entity, name, clock, reset=None):
|
||||
self.log = logging.getLogger(f"cocotb.{entity._name}.{name}")
|
||||
|
||||
@@ -228,7 +228,7 @@ class AxiLiteMasterWrite(object):
|
||||
self.in_flight_operations -= 1
|
||||
|
||||
|
||||
class AxiLiteMasterRead(object):
|
||||
class AxiLiteMasterRead:
|
||||
def __init__(self, entity, name, clock, reset=None):
|
||||
self.log = logging.getLogger(f"cocotb.{entity._name}.{name}")
|
||||
|
||||
@@ -398,7 +398,7 @@ class AxiLiteMasterRead(object):
|
||||
self.in_flight_operations -= 1
|
||||
|
||||
|
||||
class AxiLiteMaster(object):
|
||||
class AxiLiteMaster:
|
||||
def __init__(self, entity, name, clock, reset=None):
|
||||
self.write_if = None
|
||||
self.read_if = None
|
||||
|
||||
@@ -33,7 +33,7 @@ from cocotb.bus import Bus
|
||||
from .version import __version__
|
||||
|
||||
|
||||
class AxiStreamFrame(object):
|
||||
class AxiStreamFrame:
|
||||
def __init__(self, tdata=b'', tkeep=None, tid=None, tdest=None, tuser=None):
|
||||
self.tdata = bytearray()
|
||||
self.tkeep = None
|
||||
@@ -216,7 +216,7 @@ class AxiStreamFrame(object):
|
||||
return bytes(self.tdata)
|
||||
|
||||
|
||||
class AxiStreamSource(object):
|
||||
class AxiStreamSource:
|
||||
|
||||
_signals = ["tdata"]
|
||||
_optional_signals = ["tvalid", "tready", "tlast", "tkeep", "tid", "tdest", "tuser"]
|
||||
@@ -433,7 +433,7 @@ class AxiStreamSource(object):
|
||||
await RisingEdge(self.clock)
|
||||
|
||||
|
||||
class AxiStreamSink(object):
|
||||
class AxiStreamSink:
|
||||
|
||||
_signals = ["tdata"]
|
||||
_optional_signals = ["tvalid", "tready", "tlast", "tkeep", "tid", "tdest", "tuser"]
|
||||
@@ -647,7 +647,7 @@ class AxiStreamSink(object):
|
||||
await RisingEdge(self.clock)
|
||||
|
||||
|
||||
class AxiStreamMonitor(object):
|
||||
class AxiStreamMonitor:
|
||||
|
||||
_signals = ["tdata"]
|
||||
_optional_signals = ["tvalid", "tready", "tlast", "tkeep", "tid", "tdest", "tuser"]
|
||||
|
||||
@@ -27,7 +27,7 @@ import mmap
|
||||
from .utils import hexdump, hexdump_lines, hexdump_str
|
||||
|
||||
|
||||
class Memory(object):
|
||||
class Memory:
|
||||
def __init__(self, size=1024, mem=None, *args, **kwargs):
|
||||
if mem is not None:
|
||||
self.mem = mem
|
||||
|
||||
@@ -30,7 +30,7 @@ from cocotb.triggers import RisingEdge, Event, First, Timer
|
||||
from cocotb.bus import Bus
|
||||
|
||||
|
||||
class StreamTransaction(object):
|
||||
class StreamTransaction:
|
||||
|
||||
_signals = ["data"]
|
||||
|
||||
@@ -48,7 +48,7 @@ class StreamTransaction(object):
|
||||
return f"{type(self).__name__}({', '.join(f'{s}={int(getattr(self, s))}' for s in self._signals)})"
|
||||
|
||||
|
||||
class StreamBase(object):
|
||||
class StreamBase:
|
||||
|
||||
_signals = ["data", "valid", "ready"]
|
||||
_optional_signals = []
|
||||
@@ -108,7 +108,7 @@ class StreamBase(object):
|
||||
self.queue.clear()
|
||||
|
||||
|
||||
class StreamPause(object):
|
||||
class StreamPause:
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user