Closed Milemarco closed 1 year ago
Hello,
There is no enough information to understand the issue. Could you share the project code with me? You can do pull request to this repo or give me link to your code.
-Mikhail.
Hello, Thank you for your quick reply. Here is the link to the Code https://cloud.hs-augsburg.de/s/kj5Dn3cgbjC79ng
-Marco
That works for me after a few fixes. Do you mind if I add it into examples? If so, you will be able to work on it in this repository and update it as well.
The problem was in CMakeLists.txt -- do not need to create a library, just add all the source files to executable:
add_executable(DebugModule dm_tb.cpp dm.cpp base.cpp)
target_include_directories(DebugModule PUBLIC "${PROJECT_SOURCE_DIR}")
svc_target(DebugModule INIT_LOCAL_VARS ELAB_TOP tb.dm)
Another fixes:
PN_WARNINGF
is not synthesizable as soon as there is pointer initialization, commented wait()
added before while(true)
in RegisterMethod
-- suppose that is intended to be reset sectionI still see a few warnings related to unsigned/signed types mix and bitwise operation with boolean, but they are not critical.
Great, that worked for me as well. I updated above cloud link so the Code contains necessary license content.
You can add it to the examples, would be a great thing. I still have to rework the PN_WARNINGF
Macros and i encountered a timing error in the TB Asserts but the synthesis looks fine.
I will look into changing some of the data types to not have these signed/unsigned mixup
This segfault error is hard to debug. I do above restructuring for more Modules and encountered another segfault in a smaller module. Is there a general pattern for running into this error, or what could be a reason for this error
As soon as you are doing some modification, I suggest you to pull it to /examples
when it is ready (of course if you like).
Debugging segfault is not easy, it needs to build the ICSC in debug mode. I hope there will be no more such errors.
I'm unable to biuld the ICSC in debug mode.
The installer wont biuld the ICSC tool inside theinclude
folder.
at the near end of installation I get the Error that Cmake cant find sctcommon and failes.
It can't find it because it get's not build when setting the Debug Flag inside the install.sh
at line 44 -DCMAKE_BUILD_TYPE=Debug
I couldn't figure out what hinders the installer from generating these files because there is no condition or somthing blocking it from doing so.
Is there another way to build it in Debug mode I'm missing?
Do you need to have whole ICSC (ScTool.so and others libraries) in debug mode or only your design and SystemC in debug mode (systemc.so)?
I need the whole ICSC in Debug mode if possible
In this case you need to compile LLVM/Clang and ICSC manually with -DCMAKE_BUILD_TYPE=Debug
, see here. The install.sh
does not support that.
Closing this as soon as segfault issue fixed.
Hello,
I'm trying to convert an existing Open-Source Project to compile it with the ICSC. I rewrote our test bench for this project and changed the source and header files to be synthesize-able with your tool.
I encountered an error when running the ctest or executing the _sctool directly. while the simulation runs correctly the synthesis throws a Segmentation Fault error.
I tried to identify the error by using the GDB and came to the point in code where the sc_start() gets replaced by the runScElab(__sctool_args_str) for synthesis.
The Segmentation Fault is in the initContext() from libSCTool.so
Do you have any ideas what could possibly be a reason for a segfault here?
Heres the GDB output: