chetha
Newbie level 1
Hi
I am trying to implement a 40 bit counter in systemC
I had ttried with the following code
sc_bv <40> counter;
............
............
counter = counter.to_ulong()+1;
Even I tried counter.to_uint64()+1 also
The issue I am facing is after FFFFFFFF the counter value is 0 but not 1FFFFFFFF
Is there any short cut other than splitting the counter into 8 and 32 bit wide vectors ans incrementing them separately
Regards
Chethan
I am trying to implement a 40 bit counter in systemC
I had ttried with the following code
sc_bv <40> counter;
............
............
counter = counter.to_ulong()+1;
Even I tried counter.to_uint64()+1 also
The issue I am facing is after FFFFFFFF the counter value is 0 but not 1FFFFFFFF
Is there any short cut other than splitting the counter into 8 and 32 bit wide vectors ans incrementing them separately
Regards
Chethan