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.

How to convert and connect sc_clock to sc_in<sc_logic>

Status
Not open for further replies.

yeewang

Full Member level 2
Joined
Feb 4, 2002
Messages
128
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,298
Activity points
1,042
systemc question

what 's the easiest way to convert and connect sc_clock to sc_in<sc_logic> port.

eg.

sc_clock clk;

....
....

inst *a;

a = new inst("instance");

a->clk( ***** ); // in a, clk is declared as sc_in<sc_logic>

I need to connect sc_clock to this a->clk but due to the different types, the compile forbids me from doing that.

any ideas?

THX
 

Re: systemc question

Your statement itself
Code:
sc_clock clk;
is wrong!
It should be something like
Code:
sc_clock clk ("clk", 10, SC_NS, 0.5);
Checkout this and let us know!
 

systemc question

sorry, i just typed in an example, the sc_clock constructor is NOT complete....

in the real code, I did use the code piece like you wrote.

that's not what my question is about.
 

Re: systemc question

Can you post ur complete code here ??
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top