Merge pull request #270 from gsomlo/gls-csr-upper

soc/integration: ensure CSR constants are in uppercase
This commit is contained in:
enjoy-digital 2019-10-01 21:40:56 +02:00 committed by GitHub
commit 960b25a541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -445,7 +445,8 @@ class SoCCore(Module):
# Add CSRs / Config items to constants
for name, constant in self.csrbankarray.constants:
self.add_constant(name + "_" + constant.name, constant.value.value)
self.add_constant(name.upper() + "_" + constant.name.upper(),
constant.value.value)
for name, value in sorted(self.config.items(), key=itemgetter(0)):
self.add_constant("CONFIG_" + name.upper(), value)
if isinstance(value, str):