Dear Sir,
I am new to SystemC.
Pl. advise how to access ex1[0] etc. in the following program:
#include "systemc.h"
#include <stdio.h>
SC_MODULE(exfifo)
{
SC_CTOR(exfifo)
{
SC_METHOD(fifo_pop);
sc_fifo<int> packet_fifo(5);
}
void fifo_pop(void)
{
int val;
if ((ex1[0].packet_fifo).nbread(val))
cout << "\n hi \n";
WAIT(2, SC_NS);
}
};
int sc_main(int argc, char* argv[])
{
cout << "Maha Ganapatim Veera Nangai Gnanananda\n";
sc_vector<exfifo>("ex1", 4);
sc_start(10, SC_NS);
return 0;
}
Throwing ex1 undeclared identifier. Left side of packet_fifo must have class/struct/union
Appreciate your help. If things are to be done differently, pl. indicate complete steps as I am a newbie.
Thanks.