Add production mode flags to Arctic Tern and Sparrowhawk platforms

parent 76b237ce
...@@ -52,6 +52,12 @@ from arcticterngpio.arcticterngpio import ArcticTernSDRHexDriver ...@@ -52,6 +52,12 @@ from arcticterngpio.arcticterngpio import ArcticTernSDRHexDriver
kB = 1024 kB = 1024
mB = 1024*kB 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 ----------------------------------------------------------------------------- # Internal GPIO Output -----------------------------------------------------------------------------
class InternalGPIOOut(Module, AutoCSR): class InternalGPIOOut(Module, AutoCSR):
def __init__(self, data_out, nbits): def __init__(self, data_out, nbits):
...@@ -557,8 +563,9 @@ def main(): ...@@ -557,8 +563,9 @@ def main():
"}\n") "}\n")
# Flash boot setup # Flash boot setup
flash_boot_adr = soc.mem_map["bmcspiflash"] + 0x800000 flash_boot_adr = soc.mem_map["bmcspiflash"]
soc.add_constant("FLASH_BOOT_ADDRESS", flash_boot_adr) if production_mode:
soc.add_constant("FLASH_BOOT_ADDRESS", flash_boot_adr)
soc.set_gateware_dir(builder.gateware_dir) soc.set_gateware_dir(builder.gateware_dir)
...@@ -578,6 +585,9 @@ def main(): ...@@ -578,6 +585,9 @@ def main():
os.path.join(builder.gateware_dir, soc.platform.name + "_stuffed.config"), os.path.join(builder.gateware_dir, soc.platform.name + "_stuffed.config"),
"--svf", os.path.join(builder.gateware_dir, soc.platform.name + ".svf"), "--svf", os.path.join(builder.gateware_dir, soc.platform.name + ".svf"),
"--bit", os.path.join(builder.gateware_dir, soc.platform.name + ".bit"), "--bit", os.path.join(builder.gateware_dir, soc.platform.name + ".bit"),
"--spimode", "fast-read",
"--freq", "38.8",
"--compress",
"--bootaddr", "0"]) "--bootaddr", "0"])
if args.load: if args.load:
......
...@@ -44,6 +44,12 @@ from opencoresi2c.opencoresi2c import OpenCoresI2CMaster ...@@ -44,6 +44,12 @@ from opencoresi2c.opencoresi2c import OpenCoresI2CMaster
kB = 1024 kB = 1024
mB = 1024*kB 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 ---------------------------------------------------------------------------------------------- # CRG ----------------------------------------------------------------------------------------------
class _CRG(Module): class _CRG(Module):
...@@ -446,7 +452,8 @@ def main(): ...@@ -446,7 +452,8 @@ def main():
# Flash boot setup # Flash boot setup
flash_boot_adr = soc.mem_map["bmcspiflash"] + 0x800000 flash_boot_adr = soc.mem_map["bmcspiflash"] + 0x800000
soc.add_constant("FLASH_BOOT_ADDRESS", flash_boot_adr) if production_mode:
soc.add_constant("FLASH_BOOT_ADDRESS", flash_boot_adr)
soc.set_gateware_dir(builder.gateware_dir) soc.set_gateware_dir(builder.gateware_dir)
...@@ -466,6 +473,9 @@ def main(): ...@@ -466,6 +473,9 @@ def main():
os.path.join(builder.gateware_dir, soc.platform.name + "_stuffed.config"), os.path.join(builder.gateware_dir, soc.platform.name + "_stuffed.config"),
"--svf", os.path.join(builder.gateware_dir, soc.platform.name + ".svf"), "--svf", os.path.join(builder.gateware_dir, soc.platform.name + ".svf"),
"--bit", os.path.join(builder.gateware_dir, soc.platform.name + ".bit"), "--bit", os.path.join(builder.gateware_dir, soc.platform.name + ".bit"),
"--spimode", "fast-read",
"--freq", "38.8",
"--compress",
"--bootaddr", "0"]) "--bootaddr", "0"])
if args.load: 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