cast valid addresses to list for python 3.11 requirement

This commit is contained in:
Sam Crow 2023-05-01 17:05:07 -07:00
parent 672c585355
commit 0e781dd224
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,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)