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

FST tracer produces empty file #61

Open
derchr opened this issue Nov 25, 2024 · 6 comments
Open

FST tracer produces empty file #61

derchr opened this issue Nov 25, 2024 · 6 comments
Assignees
Labels

Comments

@derchr
Copy link

derchr commented Nov 25, 2024

Hello,

I want to confirm that I'm not using the tool incorrectly. When I run one of the examples (e.g., simple_system with the -t flag) that instantiates a tracer, I'm only getting empty fst traces (they are all exactly 119B in size, no matter which example I run). The ftr tracing part seems to be working fine.
However, when I switch the tracing format to SC_VCD, a valid VCD file is generated that can be opened by the regular trace file viewer. Am I doing something wrong?

I tested both the 2024.07 version and also the current development version. My SystemC version is 2.3.4.

@eyck
Copy link
Contributor

eyck commented Nov 25, 2024

Hi Derek, can you briefly describe the environment you are working in (OS, compiler, etc.)?

@eyck eyck self-assigned this Nov 25, 2024
@eyck eyck added the bug label Nov 25, 2024
@derchr
Copy link
Author

derchr commented Nov 25, 2024

Sure, I'm on Fedora 41 and compiled the project using gcc 14.2.1. Both SystemC (2.3.4) itself and SCC is compiled with C++17.
The boost version is 1.83.0 and zlib-ng is 2.1.7. Is there any else information that might be useful?

@eyck
Copy link
Contributor

eyck commented Nov 25, 2024

I cannot verify this. I used a docker container:

docker pull fedora:41 && docker run --rm -ti fedora:41 bash
dnf install gcc g++  cmake ninja git -y
git clone -b develop --recursive https://github.com/Minres/SystemC-Components.git
cd SystemC-Components/
python3 -mvenv .venv
 . .venv/bin/activate
pip3 install 'conan<2.0'
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=17
cmake --build build -j12
build/examples/simple_system/simple_system -t

works well and produces a valid FST file. Even when moving fmt to version 11.0.1 and spdlog to 1.14 (using the changes from #60) the FST file gets created properly.

@derchr
Copy link
Author

derchr commented Nov 26, 2024

I did some tinkering and when enabling conan, it did also work for me. However, as soon as I link my system-installed SystemC instead of the one built by conan, it doesn't work anymore.
My originally used SystemC is just the plain, unmodified 2.3.4 version built and installed with CMake, so I tought it should work.

@eyck
Copy link
Contributor

eyck commented Nov 26, 2024

The problem is a bug in the SystemC cmake setup (accellera-official/systemc#24). You need to add -DENABLE_PHASE_CALLBACKS_TRACING=OFF when installing SystemC.
The other option is to build SCC with -DSC_WITH_PHASE_CALLBACK_TRACING=ON but this is not fully tested.

@derchr
Copy link
Author

derchr commented Nov 27, 2024

I see, thanks for pointing that out! Now it works for me.

Maybe this is something worth noting in the README, as this is a default setting set by SystemC? Other users might stumble upon this too.

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

No branches or pull requests

2 participants