acc_sysC Posted June 16, 2022 Report Share Posted June 16, 2022 I am getting 'nbit_multiplexer' was not declared in this scope error even though I have included the header file and the path looks fine. I am trying to debug the code. The module does not even get instantiated for me to debug. Here is the link to the code in EDA playground: https://www.edaplayground.com/x/Et_C Please guide me. Quote Link to comment Share on other sites More sharing options...
karthickg Posted June 17, 2022 Report Share Posted June 17, 2022 Check your include guards. Quote Link to comment Share on other sites More sharing options...
Eyck Posted June 17, 2022 Report Share Posted June 17, 2022 Your inlcude guard in nbit_multiplexer.h is wrong. Instead of #ifdef NBIT_MUX_H #define NBIT_MUX_H yous should write #ifndef NBIT_MUX_H #define NBIT_MUX_H Quote Link to comment Share on other sites More sharing options...
acc_sysC Posted June 19, 2022 Author Report Share Posted June 19, 2022 @Eyck That worked. Thanks! Can port declaration can be done like this: sc_in<sc_biguint<pow(2,N)*M> > IN; I tried storing pow(2,N) is another variable and and used it in the port declaration but that didn't work. Is there a way to do this? Quote Link to comment Share on other sites More sharing options...
karthickg Posted June 20, 2022 Report Share Posted June 20, 2022 5 hours ago, acc_sysC said: @Eyck That worked. Thanks! Can port declaration can be done like this: sc_in<sc_biguint<pow(2,N)*M> > IN; I tried storing pow(2,N) is another variable and and used it in the port declaration but that didn't work. Is there a way to do this? Did you check the response to your own other post: Quote Link to comment Share on other sites More sharing options...
acc_sysC Posted June 22, 2022 Author Report Share Posted June 22, 2022 @karthickg I couldn't see the reply when I checked it for some reason. So I asked it again here. Thanks it works Quote Link to comment Share on other sites More sharing options...
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.