mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
make.py: use ternary getattr
This commit is contained in:
parent
410a162841
commit
69a0c597ad
1 changed files with 1 additions and 5 deletions
6
make.py
6
make.py
|
@ -158,11 +158,7 @@ CPU type: {}
|
||||||
if hasattr(soc, sdram_phy):
|
if hasattr(soc, sdram_phy):
|
||||||
sdram_phy_header = initsequence.get_sdram_phy_header(getattr(soc, sdram_phy))
|
sdram_phy_header = initsequence.get_sdram_phy_header(getattr(soc, sdram_phy))
|
||||||
write_to_file("software/include/generated/sdram_phy.h", boilerplate + sdram_phy_header)
|
write_to_file("software/include/generated/sdram_phy.h", boilerplate + sdram_phy_header)
|
||||||
try:
|
mem_header = cpuif.get_mem_header(soc.memory_regions, getattr(soc, "flash_boot_address", None))
|
||||||
flash_boot_address = soc.flash_boot_address
|
|
||||||
except AttributeError:
|
|
||||||
flash_boot_address = None
|
|
||||||
mem_header = cpuif.get_mem_header(soc.memory_regions, flash_boot_address)
|
|
||||||
write_to_file("software/include/generated/mem.h", boilerplate + mem_header)
|
write_to_file("software/include/generated/mem.h", boilerplate + mem_header)
|
||||||
csr_header = cpuif.get_csr_header(soc.csr_regions, soc.interrupt_map)
|
csr_header = cpuif.get_csr_header(soc.csr_regions, soc.interrupt_map)
|
||||||
write_to_file("software/include/generated/csr.h", boilerplate + csr_header)
|
write_to_file("software/include/generated/csr.h", boilerplate + csr_header)
|
||||||
|
|
Loading…
Reference in a new issue