mirror of https://github.com/YosysHQ/yosys.git
Added smtc support for top-level state with [], [N:] syntax
This commit is contained in:
parent
1114ce9210
commit
5f6a838823
|
@ -249,7 +249,7 @@ def get_constr_expr(db, state, final=False, getvalues=False):
|
||||||
if state not in db:
|
if state not in db:
|
||||||
return ([], [], []) if getvalues else "true"
|
return ([], [], []) if getvalues else "true"
|
||||||
|
|
||||||
netref_regex = re.compile(r'(^|[( ])\[(-?[0-9]+:|)([^\]]+)\](?=[ )]|$)')
|
netref_regex = re.compile(r'(^|[( ])\[(-?[0-9]+:|)([^\]]*)\](?=[ )]|$)')
|
||||||
|
|
||||||
def replace_netref(match):
|
def replace_netref(match):
|
||||||
state_sel = match.group(2)
|
state_sel = match.group(2)
|
||||||
|
|
|
@ -534,6 +534,8 @@ class SmtIo:
|
||||||
def net_expr(self, mod, base, path):
|
def net_expr(self, mod, base, path):
|
||||||
if len(path) == 1:
|
if len(path) == 1:
|
||||||
assert mod in self.modinfo
|
assert mod in self.modinfo
|
||||||
|
if path[0] == "":
|
||||||
|
return base
|
||||||
if path[0] in self.modinfo[mod].cells:
|
if path[0] in self.modinfo[mod].cells:
|
||||||
return "(|%s_h %s| %s)" % (mod, path[0], base)
|
return "(|%s_h %s| %s)" % (mod, path[0], base)
|
||||||
if path[0] in self.modinfo[mod].wsize:
|
if path[0] in self.modinfo[mod].wsize:
|
||||||
|
|
Loading…
Reference in New Issue