Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pysimCoder support for Silicon-Heaven infrastructure #44

Closed
michallenc opened this issue Apr 25, 2022 · 0 comments
Closed

pysimCoder support for Silicon-Heaven infrastructure #44

michallenc opened this issue Apr 25, 2022 · 0 comments

Comments

@michallenc
Copy link
Contributor

michallenc commented Apr 25, 2022

Silicon-Heaven (SHV) is an open source communication infrastructure that implements an open protocol for data serialization. Support of SHV in pysimCoder allows the runtime tuning of model parameters and runtime block diagram introspection. This issue is an introduction to upcoming commits bringing SHV support to pysimCoder mainline. The complete manual will be presented on pysimCoder wiki.

Code Generation process changes

The SHV support brings following major changes to code generation files:

  • SHVgen.py: new file taking care of SHV related C code generation. Implements generation of required SHV headers, env variables, entry point function or static tree generation if selected. The generation functions are called from RCPgen.py.
  • RCPgen.py: added SHVgen.py functions calls.
  • scene.py: Function generateCCode newly defines additional parameters like block name or parameters' names, also sets environmental variables with SHV setting.
  • dialg.py, pyEdit.py: added GUI window for SHV parameters setting.

ExtLibs

New folder ExtLibs was added to pysimCoder root directory. Additional external libraries are downloaded into this folder if required.

Template Makefile

LinuxRT and NuttX template makefiles were changed to include header files from SHV related external libraries if libraries are downloaded.

CodeGen/Common

SHV related code is located in new folder CodeGen/Common/shv. The source code consists of four files:

  • shv_com.c: implements TCP communication interface with the server.
  • shv_tree.c: common functions with tree operations (search, add...)
  • shv_methods.c: implementation of supported methods (get, set, ls, dir) that can search in the tree or change model's parameters
  • shv_pysim.c: contains entry point function shv_tree_init called from generated C code. Takes care of tree initialization if dynamic tree selected.

pyblock.h

Two additional structures added to pyblock.h for SHV support.

Documentation

Documentation describing pysimCoder setting for SHV support and compilation of required additional applications can be found on pysimCoder wiki.

Future Improvements

SHV can currently only read and write double parameters, integer parameters and lists are not supported.

CC @robertobucher @ppisa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant