Jump to content
ciccio.greco88

warning at simulation time

Recommended Posts

my code has a waring when running :

Warning: (W5) out of bounds: sc_uint[_base]: value does not fit into a length of 4

In file: ../../../../../src/sysc/datatypes/int/sc_uint_base.cpp:374

In process: tg0.traffic_generator_thread @ 0 s

what is the reason? Is it a bug? Reading a post in the old forum KMLM List i have seen that a user has solved this problem using gdb debugger writing "sc_report_handler::force(SC_INTERRUPT);" in the sc_main of his code and putting a breakpoint for sc_interrupt_here. i've tried to do this, but i don't know how to fix the breakpoint, in fact i write the command " b sc_interrupt_here" but i receive the message "Function "sc_interrupt_here()" not defined." what is the correct method to do this? or how can i solve the warning with another method?

Thanks.

:)

Share this post


Link to post
Share on other sites

Perhaps showing us a sample of the code in your traffic_generator_thread and the declarations of the sc_uint member data used therein would help us to be able to help.

Did you build your SystemC for debug (thus exposing the symbol names in the core)?

Share this post


Link to post
Share on other sites

You seem to assign a value bigger than 31 to a 4-bit sc_uint, and you have built your SystemC library with DEBUG_SYSTEMC defined. With this symbol defined, the library adds some additional bound (and value) checks.

To add a breakpoint in your debugger, you may need to add the namespace to the symbol as well:

b sc_core::sc_interrupt_here

Alternatively, you can break on the reported file:line position directly (since you know precisely, which error you want to look at).

Greetings from Oldenburg,

Philipp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×