?? xsimtop.cpp
字號:
#include "isim/work/top/top.h"
#include "isim/work/glbl/glbl.h"
static const char * HSimCopyRightNotice = "Copyright 2004-2005, Xilinx Inc. All rights reserved.";
#include "work/top/top.h"
static HSim__s6* IF0(HSim__s6 *Arch,const char* label,int nGenerics,
va_list vap)
{
HSim__s6 *blk = new workMtop(label);
return blk;
}
#include "work/labfirst/labfirst.h"
static HSim__s6* IF1(HSim__s6 *Arch,const char* label,int nGenerics,
va_list vap)
{
HSim__s6 *blk = new workMlabfirst(label);
return blk;
}
#include "work/glbl/glbl.h"
static HSim__s6* IF2(HSim__s6 *Arch,const char* label,int nGenerics,
va_list vap)
{
HSim__s6 *blk = new workMglbl(label);
return blk;
}
class _top : public HSim__s6 {
public:
_top() : HSim__s6(false, "_top", "_top", 0, 0, HSim::VerilogModule) {}
HSimConfigDecl * topModuleInstantiate() {
HSimConfigDecl * cfgvh = 0;
cfgvh = new HSimConfigDecl("default");
(*cfgvh).addVlogModule("top", (HSimInstFactoryPtr)IF0);
(*cfgvh).addVlogModule("labfirst", (HSimInstFactoryPtr)IF1);
(*cfgvh).addVlogModule("glbl", (HSimInstFactoryPtr)IF2);
HSim__s5 * topvl = 0;
topvl = new workMtop("top");
topvl->moduleInstantiate(cfgvh);
addChild(topvl);
topvl = new workMglbl("glbl");
topvl->moduleInstantiate(cfgvh);
addChild(topvl);
return cfgvh;
}
};
main(int argc, char **argv) {
HSimDesign::initDesign();
globalKernel->getOptions(argc,argv);
HSim__s6 * _top_i = 0;
try {
HSimConfigDecl *cfg;
_top_i = new _top();
cfg = _top_i->topModuleInstantiate();
return globalKernel->runTcl(cfg, _top_i, "_top", argc, argv);
}
catch (HSimError& msg){
try {
globalKernel->error(msg.ErrMsg);
return 1;
}
catch(...) {}
return 1;
}
catch (...){
globalKernel->fatalError();
return 1;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -