-
Notifications
You must be signed in to change notification settings - Fork 0
/
ALU_tb.vvp
255 lines (255 loc) · 9.3 KB
/
ALU_tb.vvp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#! /c/Source/iverilog-install/bin/vvp
:ivl_version "12.0 (devel)" "(s20150603-1539-g2693dd32b)";
:ivl_delay_selection "TYPICAL";
:vpi_time_precision - 12;
:vpi_module "C:\iverilog\lib\ivl\system.vpi";
:vpi_module "C:\iverilog\lib\ivl\vhdl_sys.vpi";
:vpi_module "C:\iverilog\lib\ivl\vhdl_textio.vpi";
:vpi_module "C:\iverilog\lib\ivl\v2005_math.vpi";
:vpi_module "C:\iverilog\lib\ivl\va_math.vpi";
S_000001f22ae664e0 .scope module, "ALU_tb" "ALU_tb" 2 3;
.timescale -9 -12;
v000001f22af22840_0 .var "A", 31 0;
v000001f22af22020_0 .var "ALUControl", 3 0;
v000001f22af222a0_0 .var "Accumulator", 31 0;
v000001f22af22de0_0 .var "B", 31 0;
v000001f22af22340_0 .net "Carry", 0 0, v000001f22af225c0_0; 1 drivers
v000001f22af22480_0 .net "Negative", 0 0, v000001f22af22200_0; 1 drivers
v000001f22af81430_0 .net "OverFlow", 0 0, v000001f22af22a20_0; 1 drivers
v000001f22af81b10_0 .net "Result", 31 0, v000001f22af22ac0_0; 1 drivers
v000001f22af812f0_0 .net "Zero", 0 0, v000001f22af227a0_0; 1 drivers
S_000001f22ae66670 .scope module, "uut" "ALU" 2 14, 3 1 0, S_000001f22ae664e0;
.timescale 0 0;
.port_info 0 /INPUT 32 "A";
.port_info 1 /INPUT 32 "B";
.port_info 2 /INPUT 32 "Accumulator";
.port_info 3 /OUTPUT 32 "Result";
.port_info 4 /INPUT 4 "ALUControl";
.port_info 5 /OUTPUT 1 "OverFlow";
.port_info 6 /OUTPUT 1 "Carry";
.port_info 7 /OUTPUT 1 "Zero";
.port_info 8 /OUTPUT 1 "Negative";
L_000001f22af81eb8 .functor BUFT 1, C4<0>, C4<0>, C4<0>, C4<0>;
L_000001f22ae6b5c0 .functor XNOR 1, L_000001f22af80210, L_000001f22af81eb8, C4<0>, C4<0>;
L_000001f22ae6b9b0 .functor NOT 32, v000001f22af22de0_0, C4<00000000000000000000000000000000>, C4<00000000000000000000000000000000>, C4<00000000000000000000000000000000>;
v000001f22af1c440_0 .net "A", 31 0, v000001f22af22840_0; 1 drivers
v000001f22ae6ef20_0 .net "ALUControl", 3 0, v000001f22af22020_0; 1 drivers
v000001f22af7f030_0 .net "Accumulator", 31 0, v000001f22af222a0_0; 1 drivers
v000001f22af7f0d0_0 .net "B", 31 0, v000001f22af22de0_0; 1 drivers
v000001f22af225c0_0 .var "Carry", 0 0;
v000001f22af22c00_0 .net "MultResult", 63 0, L_000001f22af802b0; 1 drivers
v000001f22af22200_0 .var "Negative", 0 0;
v000001f22af22a20_0 .var "OverFlow", 0 0;
v000001f22af22ac0_0 .var "Result", 31 0;
v000001f22af220c0_0 .net "Sum", 31 0, L_000001f22af805d0; 1 drivers
v000001f22af227a0_0 .var "Zero", 0 0;
v000001f22af228e0_0 .net *"_ivl_1", 0 0, L_000001f22af80210; 1 drivers
L_000001f22af81f00 .functor BUFT 1, C4<00000000000000000000000000000001>, C4<0>, C4<0>, C4<0>;
v000001f22af22ca0_0 .net/2u *"_ivl_10", 31 0, L_000001f22af81f00; 1 drivers
v000001f22af223e0_0 .net *"_ivl_12", 31 0, L_000001f22af80f30; 1 drivers
v000001f22af22980_0 .net *"_ivl_14", 31 0, L_000001f22af80530; 1 drivers
v000001f22af21ee0_0 .net *"_ivl_18", 63 0, L_000001f22af80670; 1 drivers
v000001f22af22700_0 .net/2u *"_ivl_2", 0 0, L_000001f22af81eb8; 1 drivers
L_000001f22af81f48 .functor BUFT 1, C4<00000000000000000000000000000000>, C4<0>, C4<0>, C4<0>;
v000001f22af22160_0 .net *"_ivl_21", 31 0, L_000001f22af81f48; 1 drivers
v000001f22af21f80_0 .net *"_ivl_22", 63 0, L_000001f22af80b70; 1 drivers
L_000001f22af81f90 .functor BUFT 1, C4<00000000000000000000000000000000>, C4<0>, C4<0>, C4<0>;
v000001f22af22b60_0 .net *"_ivl_25", 31 0, L_000001f22af81f90; 1 drivers
v000001f22af22520_0 .net *"_ivl_4", 0 0, L_000001f22ae6b5c0; 1 drivers
v000001f22af22660_0 .net *"_ivl_6", 31 0, L_000001f22af808f0; 1 drivers
v000001f22af22d40_0 .net *"_ivl_8", 31 0, L_000001f22ae6b9b0; 1 drivers
E_000001f22af17f30/0 .event anyedge, v000001f22ae6ef20_0, v000001f22af220c0_0, v000001f22af1c440_0, v000001f22af7f0d0_0;
E_000001f22af17f30/1 .event anyedge, v000001f22af22c00_0, v000001f22af7f030_0, v000001f22af22ac0_0;
E_000001f22af17f30 .event/or E_000001f22af17f30/0, E_000001f22af17f30/1;
L_000001f22af80210 .part v000001f22af22020_0, 0, 1;
L_000001f22af808f0 .arith/sum 32, v000001f22af22840_0, v000001f22af22de0_0;
L_000001f22af80f30 .arith/sum 32, L_000001f22ae6b9b0, L_000001f22af81f00;
L_000001f22af80530 .arith/sum 32, v000001f22af22840_0, L_000001f22af80f30;
L_000001f22af805d0 .functor MUXZ 32, L_000001f22af80530, L_000001f22af808f0, L_000001f22ae6b5c0, C4<>;
L_000001f22af80670 .concat [ 32 32 0 0], v000001f22af22840_0, L_000001f22af81f48;
L_000001f22af80b70 .concat [ 32 32 0 0], v000001f22af22de0_0, L_000001f22af81f90;
L_000001f22af802b0 .arith/mult 64, L_000001f22af80670, L_000001f22af80b70;
.scope S_000001f22ae66670;
T_0 ;
%wait E_000001f22af17f30;
%load/vec4 v000001f22ae6ef20_0;
%dup/vec4;
%pushi/vec4 0, 0, 4;
%cmp/u;
%jmp/1 T_0.0, 6;
%dup/vec4;
%pushi/vec4 1, 0, 4;
%cmp/u;
%jmp/1 T_0.1, 6;
%dup/vec4;
%pushi/vec4 2, 0, 4;
%cmp/u;
%jmp/1 T_0.2, 6;
%dup/vec4;
%pushi/vec4 3, 0, 4;
%cmp/u;
%jmp/1 T_0.3, 6;
%dup/vec4;
%pushi/vec4 5, 0, 4;
%cmp/u;
%jmp/1 T_0.4, 6;
%dup/vec4;
%pushi/vec4 4, 0, 4;
%cmp/u;
%jmp/1 T_0.5, 6;
%pushi/vec4 0, 0, 32;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%jmp T_0.7;
T_0.0 ;
%load/vec4 v000001f22af220c0_0;
%pad/u 33;
%split/vec4 32;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%store/vec4 v000001f22af225c0_0, 0, 1;
%load/vec4 v000001f22af220c0_0;
%parti/s 1, 31, 6;
%load/vec4 v000001f22af1c440_0;
%parti/s 1, 31, 6;
%xor;
%load/vec4 v000001f22ae6ef20_0;
%parti/s 1, 0, 2;
%load/vec4 v000001f22af7f0d0_0;
%parti/s 1, 31, 6;
%xor;
%load/vec4 v000001f22af1c440_0;
%parti/s 1, 31, 6;
%xor;
%inv;
%and;
%load/vec4 v000001f22ae6ef20_0;
%parti/s 1, 1, 2;
%inv;
%and;
%store/vec4 v000001f22af22a20_0, 0, 1;
%jmp T_0.7;
T_0.1 ;
%load/vec4 v000001f22af220c0_0;
%pad/u 33;
%split/vec4 32;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%store/vec4 v000001f22af225c0_0, 0, 1;
%load/vec4 v000001f22af220c0_0;
%parti/s 1, 31, 6;
%load/vec4 v000001f22af1c440_0;
%parti/s 1, 31, 6;
%xor;
%load/vec4 v000001f22ae6ef20_0;
%parti/s 1, 0, 2;
%load/vec4 v000001f22af7f0d0_0;
%parti/s 1, 31, 6;
%xor;
%load/vec4 v000001f22af1c440_0;
%parti/s 1, 31, 6;
%xor;
%inv;
%and;
%load/vec4 v000001f22ae6ef20_0;
%parti/s 1, 1, 2;
%inv;
%and;
%store/vec4 v000001f22af22a20_0, 0, 1;
%jmp T_0.7;
T_0.2 ;
%load/vec4 v000001f22af1c440_0;
%load/vec4 v000001f22af7f0d0_0;
%and;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%jmp T_0.7;
T_0.3 ;
%load/vec4 v000001f22af1c440_0;
%load/vec4 v000001f22af7f0d0_0;
%or;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%jmp T_0.7;
T_0.4 ;
%pushi/vec4 0, 0, 32;
%load/vec4 v000001f22af220c0_0;
%parti/s 1, 31, 6;
%concat/vec4; draw_concat_vec4
%pad/u 32;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%jmp T_0.7;
T_0.5 ;
%load/vec4 v000001f22af22c00_0;
%parti/s 32, 0, 2;
%load/vec4 v000001f22af7f030_0;
%add;
%store/vec4 v000001f22af22ac0_0, 0, 32;
%jmp T_0.7;
T_0.7 ;
%pop/vec4 1;
%load/vec4 v000001f22af22ac0_0;
%inv;
%and/r;
%store/vec4 v000001f22af227a0_0, 0, 1;
%load/vec4 v000001f22af22ac0_0;
%parti/s 1, 31, 6;
%store/vec4 v000001f22af22200_0, 0, 1;
%jmp T_0;
.thread T_0, $push;
.scope S_000001f22ae664e0;
T_1 ;
%pushi/vec4 0, 0, 32;
%store/vec4 v000001f22af22840_0, 0, 32;
%pushi/vec4 0, 0, 32;
%store/vec4 v000001f22af22de0_0, 0, 32;
%pushi/vec4 0, 0, 32;
%store/vec4 v000001f22af222a0_0, 0, 32;
%pushi/vec4 0, 0, 4;
%store/vec4 v000001f22af22020_0, 0, 4;
%pushi/vec4 15, 0, 32;
%store/vec4 v000001f22af22840_0, 0, 32;
%pushi/vec4 10, 0, 32;
%store/vec4 v000001f22af22de0_0, 0, 32;
%pushi/vec4 0, 0, 4;
%store/vec4 v000001f22af22020_0, 0, 4;
%delay 10000, 0;
%pushi/vec4 20, 0, 32;
%store/vec4 v000001f22af22840_0, 0, 32;
%pushi/vec4 15, 0, 32;
%store/vec4 v000001f22af22de0_0, 0, 32;
%pushi/vec4 1, 0, 4;
%store/vec4 v000001f22af22020_0, 0, 4;
%delay 10000, 0;
%pushi/vec4 2863311530, 0, 32;
%store/vec4 v000001f22af22840_0, 0, 32;
%pushi/vec4 1431655765, 0, 32;
%store/vec4 v000001f22af22de0_0, 0, 32;
%pushi/vec4 2, 0, 4;
%store/vec4 v000001f22af22020_0, 0, 4;
%delay 10000, 0;
%pushi/vec4 2863311530, 0, 32;
%store/vec4 v000001f22af22840_0, 0, 32;
%pushi/vec4 1431655765, 0, 32;
%store/vec4 v000001f22af22de0_0, 0, 32;
%pushi/vec4 3, 0, 4;
%store/vec4 v000001f22af22020_0, 0, 4;
%delay 10000, 0;
%pushi/vec4 5, 0, 32;
%store/vec4 v000001f22af22840_0, 0, 32;
%pushi/vec4 3, 0, 32;
%store/vec4 v000001f22af22de0_0, 0, 32;
%pushi/vec4 7, 0, 32;
%store/vec4 v000001f22af222a0_0, 0, 32;
%pushi/vec4 4, 0, 4;
%store/vec4 v000001f22af22020_0, 0, 4;
%delay 10000, 0;
%end;
.thread T_1;
.scope S_000001f22ae664e0;
T_2 ;
%vpi_call 2 67 "$dumpfile", "ALU.vcd" {0 0 0};
%vpi_call 2 68 "$dumpvars", 32'sb00000000000000000000000000000000 {0 0 0};
%end;
.thread T_2;
# The file index is used to find the file name in the following table.
:file_names 4;
"N/A";
"<interactive>";
"ALU_tb.v";
"ALU.v";