Merge pull request #191 from sergachev/master

Fix interrupt_name in soc_core/add_interrupt
This commit is contained in:
Tim Ansell 2019-06-02 13:00:20 -07:00 committed by GitHub
commit b0d35a49f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -361,7 +361,7 @@ class SoCCore(Module):
# check that interrupt_id is in range
if interrupt_id is not None and interrupt_id >= 32:
raise ValueError("{} Interrupt ID out of range ({}, max=31)".format(
interrupt_namename, interrupt_id))
interrupt_name, interrupt_id))
# interrupt_id not provided: allocate interrupt to the first available id
if interrupt_id is None:
@ -369,7 +369,7 @@ class SoCCore(Module):
if n not in self.soc_interrupt_map.values():
self.soc_interrupt_map.update({interrupt_name: n})
return
raise ValueError("No more space to allocate {} interrupt".format(name))
raise ValueError("No more space to allocate {} interrupt".format(interrupt_name))
# interrupt_id provided: check that interrupt_id is not already used and add interrupt
else:
for _name, _id in self.soc_interrupt_map.items():
@ -397,7 +397,7 @@ class SoCCore(Module):
if n not in self.soc_csr_map.values():
self.soc_csr_map.update({csr_name: n})
return
raise ValueError("No more space to allocate {} csr".format(name))
raise ValueError("No more space to allocate {} csr".format(csr_name))
# csr_id provided: check that csr_id is not already used and add csr
else:
for _name, _id in self.soc_csr_map.items():