From 91df3d729001156ef45bf98824d37665174577e0 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Mon, 31 Aug 2020 21:44:27 +0200 Subject: [PATCH] build_soc: override identifier_str only for gateware --- artiq/build_soc.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/artiq/build_soc.py b/artiq/build_soc.py index 2770c2ff3..e49d1b862 100644 --- a/artiq/build_soc.py +++ b/artiq/build_soc.py @@ -47,12 +47,11 @@ class ReprogrammableIdentifier(Module, AutoCSR): def add_identifier(soc, *args, identifier_str=None, **kwargs): if hasattr(soc, "identifier"): raise ValueError - if identifier_str is None: - # not overridden with --identifier-str - identifier_str = get_identifier_string(soc, *args, **kwargs) - soc.submodules.identifier = ReprogrammableIdentifier(identifier_str) - soc.config["IDENTIFIER_STR"] = identifier_str + software_identifier_str = get_identifier_string(soc, *args, **kwargs) + gateware_identifier_str = identifier_str or software_identifier_str + soc.submodules.identifier = ReprogrammableIdentifier(gateware_identifier_str) + soc.config["IDENTIFIER_STR"] = software_identifier_str def build_artiq_soc(soc, argdict):