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

How to set scp output #14

Open
alpha-beta-user opened this issue Dec 16, 2024 · 1 comment
Open

How to set scp output #14

alpha-beta-user opened this issue Dec 16, 2024 · 1 comment

Comments

@alpha-beta-user
Copy link

This is a great work!

SCP_DEBUG(()) << "ContainerBase Constructor";

based on the above code, I want to know why there is no output on the terminal. or the std::cout.

thanks for your attention!

@tmarcero
Copy link

Hi !
So yes, you can choose which output you want for any SystemC models.
For example if you look the lua file you will see many models in it, you can print the log of any of them or even all of them.
By default the log of the platform are disabled:

cci::cci_param<int> p_log_level{ "log_level", 0, "Default log level", cci::CCI_ABSOLUTE_NAME, orig };

If you change the value of this CCI parameter, it will change the log of the entire platform, you will have the logs for each models.

Instead of changing the value in the source code, you can do it directly in the command line, something like that:

./platforms/platforms-vp -p platform.log_level=5 -l ../platforms/ubuntu/conf_aarch64.lua

If you want specific models, you just need to add the name of the models between "platform" and "log_level", i.e:

./platforms/platforms-vp -p platform.<name_of_the_model>.log_level=5 -l ../platforms/ubuntu/conf_aarch64.lua

./platforms/platforms-vp -p platform.gic_0.log_level=5 -l ../platforms/ubuntu/conf_aarch64.lua

The value of log_level can change, 0 it will print nothing, 1,2 you will have the SCP_ERROR, 3 you will have SCP_WARN, 4 you will have SCP_INFO, 5 you will have SCP_DEBUG and more than 5 you will have SCP_TRACE.

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

2 participants