mirror of https://github.com/VLSIDA/OpenRAM.git
Fix Python 3.11 random change
This commit is contained in:
parent
6841de4a50
commit
e13cc76ac3
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue