mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
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