Hi,
Can anyone offer any advice on enabling MTS using PYNQ?
Previously I was running a bare metal application which had adcMTS and dacMTS functions defined.
I’ve seen this post:
and this one:
That talk about editing the xrfdc init.py (I assume that is init.py in /usr/local/share/pynq-venv/lib/python3.8/site-packages/xrfdc?)
I’ve attempted that method but i’m getting the following error when I attempt to RunMTS:
rfdc.RunMTS()
KeyError Traceback (most recent call last)
/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/api.py in _typeof(self, cdecl, consider_function_as_funcptr)
182 try:
→ 183 result = self._parsed_types[cdecl]
184 except KeyError:KeyError: ‘XRFdc_MultiConverter_Sync_Config*’
During handling of the above exception, another exception occurred:
ParseError Traceback (most recent call last)
/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/cparser.py in _parse(self, csource)
335 try:
→ 336 ast = _get_parser().parse(fullcsource)
337 except pycparser.c_parser.ParseError as e:/usr/lib/python3/dist-packages/pycparser/c_parser.py in parse(self, text, filename, debuglevel)
148 self._last_yielded_token = None
→ 149 return self.cparser.parse(
150 input=text,/usr/lib/python3/dist-packages/ply/yacc.py in parse(self, input, lexer, debug, tracking, tokenfunc)
332 else:
→ 333 return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
334/usr/lib/python3/dist-packages/ply/yacc.py in parseopt_notrack(self, input, lexer, debug, tracking, tokenfunc)
1200 self.state = state
→ 1201 tok = call_errorfunc(self.errorfunc, errtoken, self)
1202 if self.errorok:/usr/lib/python3/dist-packages/ply/yacc.py in call_errorfunc(errorfunc, token, parser)
191 _restart = parser.restart
→ 192 r = errorfunc(token)
193 try:/usr/lib/python3/dist-packages/pycparser/c_parser.py in p_error(self, p)
1844 if p:
→ 1845 self._parse_error(
1846 ‘before: %s’ % p.value,/usr/lib/python3/dist-packages/pycparser/plyparser.py in _parse_error(self, msg, coord)
66 def _parse_error(self, msg, coord):
—> 67 raise ParseError(“%s: %s” % (coord, msg))
68ParseError: :2:33: before: *
During handling of the above exception, another exception occurred:
CDefError Traceback (most recent call last)
in
----> 1 rfdc.RunMTS()/usr/local/share/pynq-venv/lib/python3.8/site-packages/xrfdc/init.py in RunMTS(self)
404
405 def RunMTS(self):
→ 406 self._DAC_Sync_Config = _ffi.new(“XRFdc_MultiConverter_Sync_Config*”)
407 self._ADC_Sync_Config = _ffi.new(“XRFdc_MultiConverter_Sync_Config*”)
408 _lib.XRFdc_MultiConverter_Init(self._DAC_Sync_Config, _ffi.new(“int*”), _ffi.new(“int*”))/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/api.py in new(self, cdecl, init)
264 “”"
265 if isinstance(cdecl, basestring):
→ 266 cdecl = self._typeof(cdecl)
267 return self._backend.newp(cdecl, init)
268/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/api.py in _typeof(self, cdecl, consider_function_as_funcptr)
184 except KeyError:
185 with self._lock:
→ 186 result = self._typeof_locked(cdecl)
187 #
188 btype, really_a_function_type = result/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/api.py in _typeof_locked(self, cdecl)
169 cdecl = cdecl.encode(‘ascii’)
170 #
→ 171 type = self._parser.parse_type(cdecl)
172 really_a_function_type = type.is_raw_function
173 if really_a_function_type:/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/cparser.py in parse_type(self, cdecl)
550
551 def parse_type(self, cdecl):
→ 552 return self.parse_type_and_quals(cdecl)[0]
553
554 def parse_type_and_quals(self, cdecl):/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/cparser.py in parse_type_and_quals(self, cdecl)
553
554 def parse_type_and_quals(self, cdecl):
→ 555 ast, macros = self._parse(‘void __dummy(\n%s\n);’ % cdecl)[:2]
556 assert not macros
557 exprnode = ast.ext[-1].type.args.params[0]/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/cparser.py in _parse(self, csource)
336 ast = _get_parser().parse(fullcsource)
337 except pycparser.c_parser.ParseError as e:
→ 338 self.convert_pycparser_error(e, csource)
339 finally:
340 if lock is not None:/usr/local/share/pynq-venv/lib/python3.8/site-packages/cffi/cparser.py in convert_pycparser_error(self, e, csource)
365 else:
366 msg = ‘parse error\n%s’ % (msg,)
→ 367 raise CDefError(msg)
368
369 def parse(self, csource, override=False, packed=False, pack=None,CDefError: cannot parse “XRFdc_MultiConverter_Sync_Config*”
:2:33: before: *