OpenCores
URL https://opencores.org/ocsvn/cpu8080/cpu8080/trunk

Subversion Repositories cpu8080

[/] [cpu8080/] [trunk/] [project/] [isim/] [work/] [cpu__tbw/] [xsimcpu__tbw.cpp] - Blame information for rev 12

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 samiam9512
#include "isim/work/cpu__tbw/cpu__tbw.h"
2
#include "isim/work/glbl/glbl.h"
3
static const char * HSimCopyRightNotice = "Copyright 2004-2005, Xilinx Inc. All rights reserved.";
4 11 samiam9512
#include "C:/Xilinx/vhdl/hdp/nt/ieee/std_logic_1164/std_logic_1164.h"
5
#include "C:/Xilinx/vhdl/hdp/nt/ieee/numeric_std/numeric_std.h"
6
#include "isim/work/common/common.h"
7
#include "isim/unisim.auxlib/vcomponents/vcomponents.h"
8 2 samiam9512
 
9
 
10
#include "work/cpu__tbw/cpu__tbw.h"
11
static HSim__s6* IF0(HSim__s6 *Arch,const char* label,int nGenerics,
12
va_list vap)
13
{
14
    HSim__s6 *blk = new workMcpu__tbw(label);
15
    return blk;
16
}
17
 
18
 
19 11 samiam9512
#include "work/chrrom/chrrom.h"
20 2 samiam9512
static HSim__s6* IF1(HSim__s6 *Arch,const char* label,int nGenerics,
21
va_list vap)
22
{
23 11 samiam9512
    HSim__s6 *blk = new workMchrrom(label);
24
    return blk;
25
}
26
 
27
 
28
#include "work/alu/alu.h"
29
static HSim__s6* IF2(HSim__s6 *Arch,const char* label,int nGenerics,
30
va_list vap)
31
{
32 2 samiam9512
    HSim__s6 *blk = new workMalu(label);
33
    return blk;
34
}
35
 
36
 
37
#include "work/selectone/selectone.h"
38 11 samiam9512
static HSim__s6* IF3(HSim__s6 *Arch,const char* label,int nGenerics,
39 2 samiam9512
va_list vap)
40
{
41
    HSim__s6 *blk = new workMselectone(label);
42
    return blk;
43
}
44
 
45
 
46 11 samiam9512
#include "work/chrmemmap/chrmemmap.h"
47
static HSim__s6* IF4(HSim__s6 *Arch,const char* label,int nGenerics,
48
va_list vap)
49
{
50
    HSim__s6 *blk = new workMchrmemmap(label);
51
    return blk;
52
}
53
 
54
 
55
#include "work/terminal/terminal.h"
56
static HSim__s6* IF5(HSim__s6 *Arch,const char* label,int nGenerics,
57
va_list vap)
58
{
59
    HSim__s6 *blk = new workMterminal(label);
60
    return blk;
61
}
62
 
63
 
64 2 samiam9512
#include "work/select/select.h"
65 11 samiam9512
static HSim__s6* IF6(HSim__s6 *Arch,const char* label,int nGenerics,
66 2 samiam9512
va_list vap)
67
{
68
    HSim__s6 *blk = new workMselect(label);
69
    return blk;
70
}
71
 
72
 
73
#include "work/rom/rom.h"
74 11 samiam9512
static HSim__s6* IF7(HSim__s6 *Arch,const char* label,int nGenerics,
75 2 samiam9512
va_list vap)
76
{
77
    HSim__s6 *blk = new workMrom(label);
78
    return blk;
79
}
80
 
81
 
82
#include "work/ram/ram.h"
83 11 samiam9512
static HSim__s6* IF8(HSim__s6 *Arch,const char* label,int nGenerics,
84 2 samiam9512
va_list vap)
85
{
86
    HSim__s6 *blk = new workMram(label);
87
    return blk;
88
}
89
 
90
 
91 9 samiam9512
#include "work/intcontrol/intcontrol.h"
92 11 samiam9512
static HSim__s6* IF9(HSim__s6 *Arch,const char* label,int nGenerics,
93 2 samiam9512
va_list vap)
94
{
95 9 samiam9512
    HSim__s6 *blk = new workMintcontrol(label);
96
    return blk;
97
}
98
 
99
 
100
#include "work/cpu8080/cpu8080.h"
101 11 samiam9512
static HSim__s6* IF10(HSim__s6 *Arch,const char* label,int nGenerics,
102 9 samiam9512
va_list vap)
103
{
104 2 samiam9512
    HSim__s6 *blk = new workMcpu8080(label);
105
    return blk;
106
}
107
 
108
 
109
#include "work/testbench/testbench.h"
110 11 samiam9512
static HSim__s6* IF11(HSim__s6 *Arch,const char* label,int nGenerics,
111 2 samiam9512
va_list vap)
112
{
113
    HSim__s6 *blk = new workMtestbench(label);
114
    return blk;
115
}
116
 
117
 
118
#include "work/glbl/glbl.h"
119 11 samiam9512
static HSim__s6* IF12(HSim__s6 *Arch,const char* label,int nGenerics,
120 2 samiam9512
va_list vap)
121
{
122
    HSim__s6 *blk = new workMglbl(label);
123
    return blk;
124
}
125
 
126 11 samiam9512
 
127
static HSim__s6* IF13(HSim__s6 *Arch,const char* label,int nGenerics,va_list vap)
128
{
129
    extern HSim__s6* createWork_vga_vga_arch(const char*);
130
    HSim__s6 *blk = createWork_vga_vga_arch(label);
131
    return blk;
132
}
133
 
134
 
135
static HSim__s6* IF14(HSim__s6 *Arch,const char* label,int nGenerics,va_list vap)
136
{
137
    extern HSim__s6* createWork_vga_vga_arch(const char*);
138
    HSim__s6 *blk = createWork_vga_vga_arch(label);
139
    return blk;
140
}
141
 
142 2 samiam9512
class _top : public HSim__s6 {
143
public:
144
    _top() : HSim__s6(false, "_top", "_top", 0, 0, HSim::VerilogModule) {}
145
    HSimConfigDecl * topModuleInstantiate() {
146
        HSimConfigDecl * cfgvh = 0;
147
        cfgvh = new HSimConfigDecl("default");
148
        (*cfgvh).addVlogModule("cpu_tbw", (HSimInstFactoryPtr)IF0);
149 11 samiam9512
        (*cfgvh).addVlogModule("chrrom", (HSimInstFactoryPtr)IF1);
150
        (*cfgvh).addVlogModule("alu", (HSimInstFactoryPtr)IF2);
151
        (*cfgvh).addVlogModule("selectone", (HSimInstFactoryPtr)IF3);
152
        (*cfgvh).addVlogModule("chrmemmap", (HSimInstFactoryPtr)IF4);
153
        (*cfgvh).addVlogModule("terminal", (HSimInstFactoryPtr)IF5);
154
        (*cfgvh).addVlogModule("select", (HSimInstFactoryPtr)IF6);
155
        (*cfgvh).addVlogModule("rom", (HSimInstFactoryPtr)IF7);
156
        (*cfgvh).addVlogModule("ram", (HSimInstFactoryPtr)IF8);
157
        (*cfgvh).addVlogModule("intcontrol", (HSimInstFactoryPtr)IF9);
158
        (*cfgvh).addVlogModule("cpu8080", (HSimInstFactoryPtr)IF10);
159
        (*cfgvh).addVlogModule("testbench", (HSimInstFactoryPtr)IF11);
160
        (*cfgvh).addVlogModule("glbl", (HSimInstFactoryPtr)IF12);
161
        (*cfgvh).addVlogModule("vga/vga_arch", (HSimInstFactoryPtr)IF13, true);
162
        (*cfgvh).addVlogModule("vga", (HSimInstFactoryPtr)IF14, true);
163 2 samiam9512
        HSim__s5 * topvl = 0;
164
        topvl = new workMcpu__tbw("cpu_tbw");
165
        topvl->moduleInstantiate(cfgvh);
166
        addChild(topvl);
167
        topvl = new workMglbl("glbl");
168
        topvl->moduleInstantiate(cfgvh);
169
        addChild(topvl);
170
        return cfgvh;
171
}
172
};
173
 
174
main(int argc, char **argv) {
175
  HSimDesign::initDesign();
176
  globalKernel->getOptions(argc,argv);
177
  HSim__s6 * _top_i = 0;
178
  try {
179 11 samiam9512
    IeeeStd_logic_1164=new Ieee_std_logic_1164("Std_logic_1164");
180
    IeeeNumeric_std=new Ieee_numeric_std("Numeric_std");
181
    WorkCommon=new Work_common("Common");
182
    UnisimVcomponents=new Unisim_vcomponents("Vcomponents");
183 2 samiam9512
    HSimConfigDecl *cfg;
184
 _top_i = new _top();
185
  cfg =  _top_i->topModuleInstantiate();
186
    return globalKernel->runTcl(cfg, _top_i, "_top", argc, argv);
187
  }
188
  catch (HSimError& msg){
189
    try {
190
      globalKernel->error(msg.ErrMsg);
191
      return 1;
192
    }
193
    catch(...) {}
194
      return 1;
195
  }
196
  catch (...){
197
    globalKernel->fatalError();
198
    return 1;
199
  }
200
}

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.