- Joined
- Aug 4, 2009
- Messages
- 2
- Reaction score
- 0
hi all,
i have a top class in which three diffrent classes are instantiated
#include <traffic_generator.h>
#include <switch.h>
#include <fabric.h>
class top : public sc_core::sc_module {
public:
/// Constructor
top ( sc_core::sc_module_name name);
traffic_generator traffic_generator_i;
switch_m switch_i;
fabric fabric_i;
};
#include "top.h"
class top;
int sc_main (int argc ,char *argv[] )
{
top top_i("top_i");
sc_core::sc_start();
return 0;
}
i am geting
error: expected class-name before "class"
../src/main.cpp: In function `int sc_main(int, char**)':
../src/main.cpp:6: error: `top' was not declared in this scope
../src/main.cpp:6: error: expected `;' before "top_i"
if i remove the fabric class its working fine if i add the fabric class above error i am getting
and also for every header i have added the
#ifndef _H_
#define _H_
#endif
any body please help me .......
thanks in advance .......
i have a top class in which three diffrent classes are instantiated
#include <traffic_generator.h>
#include <switch.h>
#include <fabric.h>
class top : public sc_core::sc_module {
public:
/// Constructor
top ( sc_core::sc_module_name name);
traffic_generator traffic_generator_i;
switch_m switch_i;
fabric fabric_i;
};
#include "top.h"
class top;
int sc_main (int argc ,char *argv[] )
{
top top_i("top_i");
sc_core::sc_start();
return 0;
}
i am geting
error: expected class-name before "class"
../src/main.cpp: In function `int sc_main(int, char**)':
../src/main.cpp:6: error: `top' was not declared in this scope
../src/main.cpp:6: error: expected `;' before "top_i"
if i remove the fabric class its working fine if i add the fabric class above error i am getting
and also for every header i have added the
#ifndef _H_
#define _H_
#endif
any body please help me .......
thanks in advance .......