Jump to content

Where is sc_link_mp defined?


ruwan2

Recommended Posts

Hi,

 

I try to run the following code from 

 

FUNCTIONAL SPECIFICATION
FOR
SYSTEMC 2 . 0

 

There are several key words are undefined. For example, "sc_link_mp" "sc_outmaster" etc. are not recognized by the compiler.

 

What is wrong with this? Those keywords are not supported now?

 

 

 

Thanks,

 

 

 

 

#include <systemc.h>
#include "key.h"
#include "ctrl.h"
#include "fun.h"
#include "disp.h"
 
int key::array1[MYMAX] = { 1,2,3,4,5 };
int key::array2[MYMAX] = {1,3,5,7,9 };
 
int sc_main(int argc, char* argv[])
{
sc_link_mp<int > cmd;
sc_link_mp<int > in1;
sc_link_mp<int > in2;
sc_link_mp<int > op1out;
sc_link_mp<int > op2out;
sc_link_mp<int > cmd_out;
sc_link_mp<int > result;
sc_link_mp<int > display;
key k1("key");
k1.cmd(cmd);
k1.op1(in1);
k1.op2(in2);
k1.clk(clock);
ctrl c1("ctrl");
c1.cmd_in(cmd);
c1.op1_in(in1);
c1.op2_in(in2);
c1.op1_out(op1out);
c1.op2_out(op2out);
c1.cmd_out(cmd_out);
c1.result(result);
c1.display(display);
fun f1("fun");
f1.op1(op1out);
f1.op2(op2out);
f1.cmd(cmd_out);
f1.result(result);
disp d1("display");
d1.din(display);
sc_start(50);
return (0);
};
Link to comment
Share on other sites

 

Hi,

 

I try to run the following code from 

 

FUNCTIONAL SPECIFICATION
FOR
SYSTEMC 2 . 0

 

There are several key words are undefined. For example, "sc_link_mp" "sc_outmaster" etc. are not recognized by the compiler.

 

What is wrong with this? Those keywords are not supported now?

 

 

 

Thanks,

 

 

 

 

#include <systemc.h>
#include "key.h"
#include "ctrl.h"
#include "fun.h"
#include "disp.h"
 
int key::array1[MYMAX] = { 1,2,3,4,5 };
int key::array2[MYMAX] = {1,3,5,7,9 };
 
int sc_main(int argc, char* argv[])
{
sc_link_mp<int > cmd;
sc_link_mp<int > in1;
sc_link_mp<int > in2;
sc_link_mp<int > op1out;
sc_link_mp<int > op2out;
sc_link_mp<int > cmd_out;
sc_link_mp<int > result;
sc_link_mp<int > display;
key k1("key");
k1.cmd(cmd);
k1.op1(in1);
k1.op2(in2);
k1.clk(clock);
ctrl c1("ctrl");
c1.cmd_in(cmd);
c1.op1_in(in1);
c1.op2_in(in2);
c1.op1_out(op1out);
c1.op2_out(op2out);
c1.cmd_out(cmd_out);
c1.result(result);
c1.display(display);
fun f1("fun");
f1.op1(op1out);
f1.op2(op2out);
f1.cmd(cmd_out);
f1.result(result);
disp d1("display");
d1.din(display);
sc_start(50);
return (0);
};

 

Hello Sir,

Please note that you are using a very old version of SystemC. The latest one, I believe

is 2.3.1. Please fix this issue.

Link to comment
Share on other sites

Hi,

I download 2.3.1, compile the new library. Then, change the new library path in Microsoft Visio Studio Express 10.0 project path for the include files and library systemc.lib.The problem is still there. I search "sc_outmaster" from 2.3.1 systemc.h (and systemc) and tlm.h (and tlm). There is no such definition.

 

What is wrong? Can you compile a file having variable "sc_outmaster"?

 

 

Thanks,

Link to comment
Share on other sites

sc_link_mp, sc_inslave, sc_outmaster are elements of the old "SystemC Master-Slave library".  This library has been an early approach to transaction-level modeling in SystemC.  The original implementation will most likely not compile with IEEE 1666-20xx standard-compliant simulators.

 

For high-level modeling, you should look into the TLM-1 and TLM-2 APIs, that are now part of the IEEE standard for SystemC.

 

/Philipp

Link to comment
Share on other sites

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...