Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

systemc vector assignment

Status
Not open for further replies.

Vonn

Full Member level 4
Joined
Oct 6, 2002
Messages
230
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Activity points
2,458
Hi guys , i have a problem when I try to assign a value to bit victor in system c
my bit vector decleration is :
sc_in <sc_bv<8> > A,B;
and I tried to assign a value to this vector using the following statment
A = "01001000";
the compiler gives me a message
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'char [9]' (or there is no acceptable conversion)

any body can help!
 

Hi,
With which systemC version you are working?? On what platform and OS you are
working??? Can you give example of ur systemC code here?? So that we can faithfully
reproduce the problem here on our side to help you out!
 

sure thank you for your help
actually Iam using systemc-2.1.v1 under VC (visual studio 6) with windows OS

about my code, well it's a simple mux , and the problem is in the stim file below :

#include "systemc.h"

SC_MODULE(stim) {

sc_in <sc_bv<8> > A,B;
sc_in <bool> sel;
sc_in_clk CLK;

void stimgen() {

A = "01001000";
B = "00001111";
sel.write(false);
wait();

A="01001000";
B="00001111";
sel.write(true);
wait();

sc_stop();

}


SC_CTOR(stim)
{
SC_CTHREAD(stimgen,CLK.pos());
}

};
 

Do the following change in ur code and check!

Code:
sc_out <sc_bv<8> > A,B; 
 sc_out <bool> sel;
 

    Vonn

    Points: 2
    Helpful Answer Positive Rating
I got the problem now It should be declared as output as you said ... thanx
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top