How do I go about implementing a modulus 12 counter in SystemC? I am new to the library and do not have much experience with it. please help.
Asked
Active
Viewed 206 times
1 Answers
0
well you just have to code it up there is nothing special going to help. Something like this...
sc_uint<4> counter;
sc_uint<4> increment(){
counter++;
if(counter >=12){
counter =0;
}
return (counter);
}
Things are a lot better if you can avoid having none power of 2 stuff.

Ifor
- 2,825
- 1
- 22
- 25