mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-05 14:04:07 +00:00
sby: core: fixed up the engines
section parser
This commit is contained in:
parent
2f841e5d55
commit
ad4f506d2a
|
@ -293,18 +293,22 @@ class SbyConfig:
|
||||||
# [engines (MODE)]
|
# [engines (MODE)]
|
||||||
if section == "engines":
|
if section == "engines":
|
||||||
mode = "engines"
|
mode = "engines"
|
||||||
if len(entries) > 2:
|
|
||||||
self.error(f"sby file syntax error: [engine] sections expects at most 1 argument, got more '{line}'")
|
|
||||||
|
|
||||||
if len(entries) == 2 and entries[1] not in ("bmc", "prove", "cover", "live"):
|
if args is not None:
|
||||||
self.error(f"sby file syntax error: Expected one of 'bmc, prove, cover, live' not '{entries[1]}'")
|
section_args = args.split()
|
||||||
elif len(entries) == 2:
|
|
||||||
pass
|
if len(section_args) > 1:
|
||||||
# if entries[1] not in self.engines:
|
self.error(f"sby file syntax error: '[engine]' sections expects at most 1 argument, got '{len(section_args)}'")
|
||||||
# self.engines[entries[1]] = list()
|
|
||||||
# engine_mode = entries[1]
|
if section_args[0] not in ("bmc", "prove", "cover", "live"):
|
||||||
# else:
|
self.error(f"sby file syntax error: Expected one of 'bmc, prove, cover, live' as '[engine]` argument, not '{section_args[0]}'")
|
||||||
# self.error(f"Already defined engine block for mode '{entries[1]}'")
|
|
||||||
|
if section_args[0] in self.engines:
|
||||||
|
self.error(f"Already defined engine block for mode '{section_args[0]}'")
|
||||||
|
else:
|
||||||
|
self.engines[section_args[0]] = list()
|
||||||
|
engine_mode = section_args[0]
|
||||||
|
continue
|
||||||
|
|
||||||
# [setup]
|
# [setup]
|
||||||
if section == "setup":
|
if section == "setup":
|
||||||
|
|
Loading…
Reference in a new issue