chetha
Newbie level 1
- Joined
- Aug 4, 2009
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,288
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