Jump to content

Recommended Posts

Posted

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
  }     ......
  • 3 weeks later...
Posted

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.

Posted

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.

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...