Add production mode flags to Arctic Tern and Sparrowhawk platforms

parent 76b237ce
......@@ -52,6 +52,12 @@ from arcticterngpio.arcticterngpio import ArcticTernSDRHexDriver
kB = 1024
mB = 1024*kB
# Production mode
# When enabled, boot time is prioritized
# and internal Flash is used as the boot source
# Various self-tests are disabled as well
production_mode = False
# Internal GPIO Output -----------------------------------------------------------------------------
class InternalGPIOOut(Module, AutoCSR):
def __init__(self, data_out, nbits):
......@@ -557,7 +563,8 @@ def main():
"}\n")
# Flash boot setup
flash_boot_adr = soc.mem_map["bmcspiflash"] + 0x800000
flash_boot_adr = soc.mem_map["bmcspiflash"]
if production_mode:
soc.add_constant("FLASH_BOOT_ADDRESS", flash_boot_adr)
......@@ -578,6 +585,9 @@ def main():
os.path.join(builder.gateware_dir, soc.platform.name + "_stuffed.config"),
"--svf", os.path.join(builder.gateware_dir, soc.platform.name + ".svf"),
"--bit", os.path.join(builder.gateware_dir, soc.platform.name + ".bit"),
"--spimode", "fast-read",
"--freq", "38.8",
"--compress",
"--bootaddr", "0"])
if args.load:
......
......@@ -44,6 +44,12 @@ from opencoresi2c.opencoresi2c import OpenCoresI2CMaster
kB = 1024
mB = 1024*kB
# Production mode
# When enabled, boot time is prioritized
# and internal Flash is used as the boot source
# Various self-tests are disabled as well
production_mode = False
# CRG ----------------------------------------------------------------------------------------------
class _CRG(Module):
......@@ -446,6 +452,7 @@ def main():
# Flash boot setup
flash_boot_adr = soc.mem_map["bmcspiflash"] + 0x800000
if production_mode:
soc.add_constant("FLASH_BOOT_ADDRESS", flash_boot_adr)
......@@ -466,6 +473,9 @@ def main():
os.path.join(builder.gateware_dir, soc.platform.name + "_stuffed.config"),
"--svf", os.path.join(builder.gateware_dir, soc.platform.name + ".svf"),
"--bit", os.path.join(builder.gateware_dir, soc.platform.name + ".bit"),
"--spimode", "fast-read",
"--freq", "38.8",
"--compress",
"--bootaddr", "0"])
if args.load:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment