def testConcatMixToUnsizedBase(self): bases = [] for base in self.bases: seq = (long(base, 2), Signal(long(base, 2))) bases.append(random.choice(seq)) extslist = [] for exts in self.extslist: newexts = [] for ext in exts: seq = (ext, intbv(ext), Signal(intbv(ext))) newexts.append(random.choice(seq)) extslist.append(newexts) self.ConcatToUnsizedBase(bases, extslist)
def testConcatMixBoolToSizedBase(self): if type(bool) is not type: return bases = [] for base in self.bases: seq = (base, intbv(base), Signal(intbv(base))) bases.append(random.choice(seq)) extslist = [] for exts in self.extslist: newexts = [] for ext in exts: if len(ext) == 1: seq = (ext, bool(int(ext)), Signal(bool(int(ext)))) else: seq = (ext, intbv(ext), Signal(intbv(ext))) newexts.append(random.choice(seq)) extslist.append(newexts) self.ConcatToSizedBase(bases, extslist)
def testConcatStringsToSignalBool(self): if type(bool) is not type: return bases = [] for base in self.bases: if len(base) == 1: bases.append(Signal(bool(int(base)))) else: bases.append(intbv(base)) extslist = self.extslist self.ConcatToSizedBase(bases, extslist)
def testConcatStringsToSignalIntbv(self): bases = [Signal(intbv(base)) for base in self.bases] extslist = self.extslist self.ConcatToSizedBase(bases, extslist)
def testConcatStringsToSignalInt(self): bases = [Signal(long(base, 2)) for base in self.bases] extslist = self.extslist self.ConcatToUnsizedBase(bases, extslist)
def testConcatSignalIntbvsToSignalInt(self): bases = [Signal(long(base, 2)) for base in self.bases] extslist = [] for exts in self.extslist: extslist.append([Signal(intbv(ext)) for ext in exts]) self.ConcatToUnsizedBase(bases, extslist)
def testConcatIntbvsToSignalIntbv(self): bases = [Signal(intbv(base)) for base in self.bases] extslist = [] for exts in self.extslist: extslist.append([intbv(ext) for ext in exts]) self.ConcatToSizedBase(bases, extslist)