mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-11-01 18:04:12 +08:00
Updating to mirror new macro structure used in #684
This commit is contained in:
1 parent
2ecef98263
commit
9088e73acb
1 file changed
+10
-2
+10
-2
@@ -564,9 +564,8 @@ def loadMachineConfig(c_file):
|
||||
|
||||
patterns = [
|
||||
r"\.(isRTL8373)\s*=\s*(\d+)\s*",
|
||||
r"\.(min_port)\s*=\s*(\d+)\s*",
|
||||
r"\.(max_port)\s*=\s*(\d+)\s*",
|
||||
r"\.(n_sfp)\s*=\s*(\d+)\s*",
|
||||
r"\.(MACHINE_CHIPSET)\s+(\S+)\s*",
|
||||
r"\.(log_to_phys_port)\s*=\s*("+regexForCArrayLiteral+r")\s*",
|
||||
r"\.(phys_to_log_port)\s*=\s*("+regexForCArrayLiteral+r")\s*",
|
||||
r"\.(is_sfp)\s*=\s*("+regexForCArrayLiteral+r")\s*",
|
||||
@@ -584,6 +583,15 @@ def loadMachineConfig(c_file):
|
||||
value = list(map(int, value[1:-1].split(",")))
|
||||
machine_config[bits[0]] = value
|
||||
|
||||
if machine_config["MACHINE_CHIPSET"] == "RTL8372":
|
||||
machine_config["min_port"] = 3
|
||||
else:
|
||||
machine_config["min_port"] = 0
|
||||
if machine_config["MACHINE_CHIPSET"] == "RTL8370":
|
||||
machine_config["max_port"] = 7
|
||||
else:
|
||||
machine_config["max_port"] = 8
|
||||
|
||||
if "max_port" in machine_config and "min_port" in machine_config:
|
||||
PORTS = int(machine_config["max_port"]) - int(machine_config["min_port"])
|
||||
if "n_sftp" in machine_config:
|
||||
|
||||
Reference in new issue
Block a user