mark.johnstone Posted September 22, 2014 Report Share Posted September 22, 2014 Hello all, I am writing some template code which manipulates some SystemC values, and I came across a place where I am having problems deducing the bit-width of an sc_uint. In looking over the source code for sc_uint (and sc_uint_base), I see that while the width must be specified as a template parameter, it is stored in a (non-const) member variable of every instance. I was wondering why the length is implemented this way, and not as a static method which returns the template parameter? I can't find any place where the width can be changed dynamically. If the length were implemented as a reference to the template parameter, template code would be easier to write, and every object would be smaller. Thanks, --Mark Quote Link to comment Share on other sites More sharing options...
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.