diff --git a/misoclib/tools/litescope/host/driver/etherbone.py b/misoclib/tools/litescope/host/driver/etherbone.py index 0f3efd158..44959887f 100644 --- a/misoclib/tools/litescope/host/driver/etherbone.py +++ b/misoclib/tools/litescope/host/driver/etherbone.py @@ -11,7 +11,8 @@ class LiteScopeEtherboneDriver: self.tx_sock = None self.rx_sock = None - self.regs = build_map(addrmap, busword, self.read, self.write) + if addrmap is not None: + self.regs = build_map(addrmap, busword, self.read, self.write) def open(self): self.tx_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) diff --git a/misoclib/tools/litescope/host/driver/uart.py b/misoclib/tools/litescope/host/driver/uart.py index 4771c989b..da3cd3635 100644 --- a/misoclib/tools/litescope/host/driver/uart.py +++ b/misoclib/tools/litescope/host/driver/uart.py @@ -15,7 +15,8 @@ class LiteScopeUARTDriver: self.baudrate = str(baudrate) self.debug = debug self.uart = serial.Serial(port, baudrate, timeout=0.25) - self.regs = build_map(addrmap, busword, self.read, self.write) + if addrmap is not None: + self.regs = build_map(addrmap, busword, self.read, self.write) def open(self): self.uart.flushOutput()