aboutsummaryrefslogtreecommitdiffstats
path: root/passes/pmgen
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-09-20 12:03:10 -0700
committerEddie Hung <eddie@fpgeh.com>2019-09-20 12:03:10 -0700
commit1809f463fb235a5e4c137ee992712ecc8d235fdc (patch)
treec2c65490aeac63feb8bd06b9c457d04c21dabcb2 /passes/pmgen
parentab46d9017b1a6fe6e376278ca9d3bec2e5673f06 (diff)
downloadyosys-1809f463fb235a5e4c137ee992712ecc8d235fdc.tar.gz
yosys-1809f463fb235a5e4c137ee992712ecc8d235fdc.tar.bz2
yosys-1809f463fb235a5e4c137ee992712ecc8d235fdc.zip
More exceptions
Diffstat (limited to 'passes/pmgen')
-rw-r--r--passes/pmgen/pmgen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/pmgen/pmgen.py b/passes/pmgen/pmgen.py
index d5e667911..39a09991d 100644
--- a/passes/pmgen/pmgen.py
+++ b/passes/pmgen/pmgen.py
@@ -286,7 +286,7 @@ def process_pmgfile(f, filename):
block["gencode"].append(rewrite_cpp(l.rstrip()))
break
- assert False
+ raise RuntimeError("'%s' statement not recognised on line %d" % (a[0], linenr))
if block["optional"]:
assert not block["semioptional"]
@@ -328,7 +328,7 @@ def process_pmgfile(f, filename):
blocks.append(block)
continue
- assert False
+ raise RuntimeError("'%s' command not recognised" % cmd)
for fn in pmgfiles:
with open(fn, "r") as f: