Jump to content

vector declaration


meera

Recommended Posts

hi,

 

when i try to assign a particular bti in a vector by using the statement ff=o..it is showing error. Could any one pls tell what the mistake is.

 

.....

 sc_signal<sc_bv<8> > ff;

 

void func(){

sc_int<size>  i;

if(rst){

for(i=0;i<10;i++)
   ff=0;//error
  }     ......
Link to post
Share on other sites
  • 3 weeks later...

The problem is that  square brackets operator is not overloaded in sc_signal.

Because of that you can't do bitwise operations on sc_signals.

 

I don't know the exact technical reason why it is not allowed in SystemC. Implementing it will be challenging, but it does not look impossible.

Link to post
Share on other sites

The problem is that  square brackets operator is not overloaded in sc_signal.

Because of that you can't do bitwise operations on sc_signals.

 

I don't know the exact technical reason why it is not allowed in SystemC. Implementing it will be challenging, but it does not look impossible.

 

Hello Sir,

This has nothing to do with sc_signal. It is a question of accessing and writing to specific

vector locations. The vector manipulation is always done inside a module, NOT inside a

sc_signal or any other signal channel. The sc_signal simply transfers the bit vector from

one module to another, nothing else. Adding/removing data bits from the bit vector ocurs

exclusively inside a module.

Link to post
Share on other sites

Hello Sir,

This has nothing to do with sc_signal. It is a question of accessing and writing to specific

vector locations. The vector manipulation is always done inside a module, NOT inside a

sc_signal or any other signal channel. The sc_signal simply transfers the bit vector from

one module to another, nothing else. Adding/removing data bits from the bit vector ocurs

exclusively inside a module.

 

I don't understand your comment.

I'm constantly using sc_signals for thread synchronization inside single module.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...