meera Posted February 28, 2016 Report Posted February 28, 2016 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 } ...... Quote
Roman Popov Posted March 19, 2016 Report Posted March 19, 2016 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. Quote
dakupoto Posted March 23, 2016 Report Posted March 23, 2016 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. Quote
Roman Popov Posted March 23, 2016 Report Posted March 23, 2016 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. Quote
Recommended Posts
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.