Commit 6c5ee926 authored by Andrey Filippov's avatar Andrey Filippov

made trigger-realted parameters to run through the sequencer too, continued more

parent 5125b897
...@@ -1409,6 +1409,7 @@ class X393ExportC(object): ...@@ -1409,6 +1409,7 @@ class X393ExportC(object):
isGenAbs = False): isGenAbs = False):
# name, var_name, address, address_inc, var_range, data_type, rw, comment = define_tuple # name, var_name, address, address_inc, var_range, data_type, rw, comment = define_tuple
name, var_name, address, address_inc, _, data_type, rw, comment = define_tuple name, var_name, address, address_inc, _, data_type, rw, comment = define_tuple
use_address_inc = address_inc or isGenRel or isGenAbs # so address_inc ==0 will work for TRIG_ parameters
multivar = isinstance(address_inc,(list,tuple)) # var_name, var_range are also lists/tuples of the same length multivar = isinstance(address_inc,(list,tuple)) # var_name, var_range are also lists/tuples of the same length
stops=frmt_spcs[('declare','define')[isDefine]] stops=frmt_spcs[('declare','define')[isDefine]]
#TODO: add optional argument range check? #TODO: add optional argument range check?
...@@ -1431,7 +1432,7 @@ class X393ExportC(object): ...@@ -1431,7 +1432,7 @@ class X393ExportC(object):
args += ', int '+ vn.lower() args += ', int '+ vn.lower()
else: else:
arg = var_name.lower() arg = var_name.lower()
if arg and address_inc: if arg and use_address_inc:
args += ', int '+ arg args += ', int '+ arg
s = "void " s = "void "
s = self.str_tab_stop(s,stops[0]) s = self.str_tab_stop(s,stops[0])
...@@ -1476,7 +1477,7 @@ class X393ExportC(object): ...@@ -1476,7 +1477,7 @@ class X393ExportC(object):
else: else:
s+='{writel(%s, mmio_ptr + '%(td) s+='{writel(%s, mmio_ptr + '%(td)
if address_inc: if use_address_inc:
s+='(0x%04x'%(address) s+='(0x%04x'%(address)
if multivar: if multivar:
for vn, vi in zip (var_name, address_inc): for vn, vi in zip (var_name, address_inc):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment