forked from M-Labs/artiq
1
0
Fork 0

coredevice/analyzer: log TTL decoding in debug mode

This commit is contained in:
Sebastien Bourdeauducq 2015-12-23 18:56:23 +08:00
parent e4d73c0302
commit 58d0e2c0b8
1 changed files with 3 additions and 0 deletions

View File

@ -128,12 +128,15 @@ class VCDManager:
class TTLHandler: class TTLHandler:
def __init__(self, vcd_manager, name): def __init__(self, vcd_manager, name):
self.name = name
self.channel_value = vcd_manager.get_channel(name, 1) self.channel_value = vcd_manager.get_channel(name, 1)
self.last_value = "X" self.last_value = "X"
self.oe = True self.oe = True
def process_message(self, message): def process_message(self, message):
if isinstance(message, OutputMessage): if isinstance(message, OutputMessage):
logger.debug("TTL write @%d %d to %d, name: %s",
message.timestamp, message.data, message.address, self.name)
if message.address == 0: if message.address == 0:
self.last_value = str(message.data) self.last_value = str(message.data)
if self.oe: if self.oe: