primitive_defaults.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:proteusisc 作者: diamondman 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号