def __init__(self, insname, *args, execute=True, read_status=False,
loop=0, delay=0, **kwargs):
super(RunInstruction, self).__init__(*args, **kwargs)
self.isBH = False
if (self.data or self.read) and not self.bitcount:
desc = self.dev._desc
regname = desc._instruction_register_map.get(insname)
self.bitcount = desc._registers.get(regname)
if self.bitcount is None:
#print("Dealing with a Blackhole Register")
self.isBH = True
self.bitcount = len(self.data)
if not self.data and self.bitcount:
self.data = NoCareBitarray(self.bitcount)
if self.data is not None and len(self.data) != self.bitcount:
import ipdb
ipdb.set_trace()
raise ValueError("")
self.read_status = read_status
self.insname = insname
self.execute = execute
self.delay = delay
self.loop = loop
评论列表
文章目录