acc_sysC Posted June 25, 2022 Report Posted June 25, 2022 I'm trying to instantiate mux multiple times that is also parameterized. It gives me Segmentation fault (core dumped) error. I can't figure out why this is happening. This is the EDA link to the code: https://www.edaplayground.com/x/Et_C Please guide me. Thanks Quote
karthickg Posted June 26, 2022 Report Posted June 26, 2022 Try running with gdb and check the backtrace $ gdb <executable name> gdb> run (after segfault) gdb> bt Quote
Eyck Posted June 27, 2022 Report Posted June 27, 2022 Your sc_vector sOUT_bit_select is not properly initialized and the sc_vector sIN_segment has the wrong size. In general I would siggest to use something like this: sc_vector<multiplexer<(1<<N)> > bit_mux{bit_mux"",M}; sc_vector<sc_signal<sc_biguint<(1<<N)>>> sIN_segment{"sIN_segment",M}; sc_vector<sc_signal<bool> > sOUT_bit_select{"sOUT_bit_select",M}; instead of putting them intit the constructor initializer list. Quote
acc_sysC Posted June 27, 2022 Author Report Posted June 27, 2022 @Eyck it works! But can you tell me what's the difference between inititializing like this and initializing in the constructor list? Quote
Eyck Posted July 22, 2022 Report Posted July 22, 2022 Since the edaplayground code changed I cannot tell since I do not remember what 'like this' was Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.