forked from M-Labs/artiq
remote_csr: add sanity check of CSR CSV type column
This commit is contained in:
parent
e67a289e2b
commit
96b948f57f
@ -13,7 +13,12 @@ def _get_csr_data(csv_file):
|
||||
region_name, csr_name = name.split(".")
|
||||
address = int(address, 0)
|
||||
length = int(length, 0)
|
||||
ro = ro == "ro"
|
||||
if ro == "ro":
|
||||
ro = True
|
||||
elif ro == "rw":
|
||||
ro = False
|
||||
else:
|
||||
raise ValueError
|
||||
if region_name not in csr_data:
|
||||
csr_data[region_name] = []
|
||||
csr_data[region_name].append((csr_name, address, length, ro))
|
||||
|
Loading…
Reference in New Issue
Block a user