
thekamz
Members-
Content Count
5 -
Joined
-
Last visited
About thekamz
-
Rank
Member
Profile Information
-
Gender
Not Telling
-
Philipp -- thanks very much for all the help and effort! I'll follow the steps you recommended and post as I get more info.
-
I have added to the playground. Not getting segfault in the simplified model, but getting another unexpected result. Data seems to be constructed, but I don't generate data anywhere. I'm obviously overlooking something basic. The problem seems to be in the type that I'm passing between modules.
-
There is no error when adding the line after sc_start, so you may be right. Skipping the sc_start results in no segfault. The module does have only the members I listed. Like I said, the my_packet_type does have (one) unique_ptr member, but I'm sure it is used appropriately. Moving your line to before the call to sc_start, then debugging, shows something new. Specifically, inside mod I am trying to wait on a data_written_event to any of the sc_fifo_in contained in sc_vector<sc_fifo_in<my_packet_type>>. The way I am doing that is with this function: template <typena
-
Thank you for your responses dakupoto and Philipp. Philipp - I will post a simple compilable example ASAP. It may take an hour or so because mod, while simple, is connected to a bunch of other stuff in main. In the mean time, mod has: 4 private members (3 unsigned ints and 1 static unsigned int) public sc_vector<sc_fifo_in<my_packet_type>> public sc_vector<sc_fifo_out<my_packet_type>> No pointers or smart pointers. Adding your line to sc_main had no effect (I added it after the call to sc_start, i.e., immediately before the call to return from sc_main). E
-
I am trying to use an sc_vector of modules with a custom creator to pass constructor arguments. It seems to work and run through the entire program, but at exit causes a segfault. GDB shows that this is due to to sc_vector calling the destructor of the module. I have no dynamically-allocated memory or pointers in the module. Here's the overview: outside of sc_main (global -- but I also tried inside of sc_main): -------------------------- struct create_mod { unsigned int m_arg1; unsigned int m_arg2; create_mod(unsigned int arg1, unsigned int arg2) : m_arg1(arg1), m_