Gilbert Pajela Posted September 23, 2019 Report Share Posted September 23, 2019 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 Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted September 24, 2019 Report Share Posted September 24, 2019 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. Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted September 24, 2019 Report Share Posted September 24, 2019 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 Quote Link to comment Share on other sites More sharing options...
Eyck Posted September 24, 2019 Report Share Posted September 24, 2019 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.