Jump to content
Gilbert Pajela

SystemC Parsing?

Recommended Posts

Hello all,

Sorry if this is not the right forum for this message, but I was wondering what tool is most commonly used to parse SystemC? I am looking for a freely available tool, if possible. I did some of my own searching and came across several tools such as Pinapa/PinaVM, KaSCPar, SystemPerl, etc., but none of them seems to have been updated in the past five years or so. I've tried installing some of them, but I invariably get errors most likely because they haven't been kept up to date with the latest versions of SystemC, g++, etc. Does anyone know of a tool that is actively maintained and is commonly used to parse SystemC? There must be at least one tool out there. Any help is greatly appreciated.

Thanks,

Gilbert

Share this post


Link to post
Share on other sites

Clang AST is the best opensource option, but some extra work will be required to support SystemC. With Clang you can quite easily reproduce Pinapa approach.  Don't recommend going PinaVM way with using LLVM IR - It is too low level for most SystemC analysis tasks.

Share this post


Link to post
Share on other sites

Hello @Gilbert Pajela,

SystemC is C++, so it would be better to utilize C++ Tooling support to parse SystemC.

And since @Roman Popov already mentioned Clang and LLVM tooling infrastructure you would have to fiddle with it to get necessary results.

After Googling a bit found a reference to this paper: https://ieeexplore.ieee.org/document/6646649,

and this project on GitHub: https://github.com/anikau31/systemc-clang

Which have been updated quite recently.

Hope it helps.

Regards,

Ameya Vikram Singh

Share this post


Link to post
Share on other sites

If you need more flexibility than systemc-clang allows you may use libclang. This is a Python binding of the Clang library (some intro can be found here: https://shaharmike.com/cpp/libclang/ or here: https://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang). This way you can easily deal with the Clang AST and its cross references  and alike.

Best regards

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...