Fix Python 3.11 random change

This commit is contained in:
Bugra Onal 2023-05-23 10:58:17 -07:00
parent 6841de4a50
commit e13cc76ac3
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ class functional(simulation):
def gen_addr(self):
""" Generates a random address value to write to. """
if self.valid_addresses:
random_value = random.sample(self.valid_addresses, 1)[0]
random_value = random.sample(list(self.valid_addresses), 1)[0]
else:
random_value = random.randint(0, self.max_address)
addr_bits = binary_repr(random_value, self.bank_addr_size)