1 |
14 |
robfinch |
module Raptor64mc_tb();
|
2 |
|
|
parameter IDLE = 8'd1;
|
3 |
|
|
parameter DOCMD = 8'd2;
|
4 |
|
|
|
5 |
|
|
reg clk;
|
6 |
|
|
reg rst;
|
7 |
|
|
reg nmi;
|
8 |
|
|
wire sys_cyc;
|
9 |
|
|
wire sys_stb;
|
10 |
|
|
wire sys_we;
|
11 |
|
|
wire [7:0] sys_sel;
|
12 |
|
|
wire [31:0] sys_adr;
|
13 |
|
|
wire [31:0] sys_dbo;
|
14 |
|
|
wire [31:0] sys_dbi;
|
15 |
|
|
wire sys_ack;
|
16 |
|
|
wire cmd_en;
|
17 |
|
|
wire [2:0] cmd_instr;
|
18 |
|
|
wire [5:0] cmd_bl;
|
19 |
|
|
wire [29:0] cmd_byte_addr;
|
20 |
|
|
reg cmd_full;
|
21 |
|
|
reg [5:0] tb_cmd_bl;
|
22 |
|
|
reg [2:0] tb_cmd_instr;
|
23 |
|
|
reg [29:0] tb_cmd_byte_addr;
|
24 |
|
|
wire rd_en;
|
25 |
|
|
reg rd_empty;
|
26 |
|
|
reg [31:0] rd_data;
|
27 |
|
|
reg [7:0] cnt;
|
28 |
|
|
wire wr_en;
|
29 |
|
|
wire [31:0] wr_data;
|
30 |
|
|
wire wr_empty = 1'b1;
|
31 |
|
|
wire wr_full;
|
32 |
|
|
reg [31:0] iromout;
|
33 |
|
|
|
34 |
|
|
assign sys_ack = sys_stb;
|
35 |
|
|
|
36 |
|
|
initial begin
|
37 |
|
|
clk = 1;
|
38 |
|
|
rst = 0;
|
39 |
|
|
nmi = 0;
|
40 |
|
|
#100 rst = 1;
|
41 |
|
|
#100 rst = 0;
|
42 |
|
|
#1300 nmi = 1;
|
43 |
|
|
#100 nmi = 0;
|
44 |
|
|
end
|
45 |
|
|
|
46 |
|
|
always #10 clk = ~clk; // 50 MHz
|
47 |
|
|
|
48 |
|
|
always @(sys_adr)
|
49 |
|
|
case(sys_adr | 64'hFFFF_FFFF_FFFF_0000)
|
50 |
20 |
robfinch |
64'h70: iromout <= 32'h00000020;
|
51 |
|
|
64'h74: iromout <= 32'h00000000;
|
52 |
|
|
64'h78: iromout <= 32'h000DE000;
|
53 |
|
|
64'h7C: iromout <= 32'h37800000;
|
54 |
|
|
64'h80: iromout <= 32'h00000000;
|
55 |
|
|
64'h84: iromout <= 32'h00000378;
|
56 |
|
|
64'h88: iromout <= 32'h000DE000;
|
57 |
|
|
64'h8C: iromout <= 32'h37800000;
|
58 |
|
|
64'hFFFFFFFFFFFFF000: iromout <= 32'h02000AA8;
|
59 |
|
|
64'hFFFFFFFFFFFFF004: iromout <= 32'h00062408;
|
60 |
|
|
64'hFFFFFFFFFFFFF008: iromout <= 32'h210BE100;
|
61 |
|
|
64'hFFFFFFFFFFFFF00C: iromout <= 32'h0A176543;
|
62 |
|
|
64'hFFFFFFFFFFFFF010: iromout <= 32'h400008A9;
|
63 |
|
|
64'hFFFFFFFFFFFFF014: iromout <= 32'h0026A408;
|
64 |
|
|
64'hFFFFFFFFFFFFF018: iromout <= 32'hA9802100;
|
65 |
|
|
64'hFFFFFFFFFFFFF01C: iromout <= 32'h0A1FEDCB;
|
66 |
|
|
64'hFFFFFFFFFFFFF020: iromout <= 32'h40000929;
|
67 |
|
|
64'hFFFFFFFFFFFFF024: iromout <= 32'h0028A408;
|
68 |
|
|
64'hFFFFFFFFFFFFF028: iromout <= 32'h08802100;
|
69 |
|
|
64'hFFFFFFFFFFFFF02C: iromout <= 32'h2F800000;
|
70 |
|
|
64'hFFFFFFFFFFFFF030: iromout <= 32'h020013FD;
|
71 |
|
|
64'hFFFFFFFFFFFFF034: iromout <= 32'h0010AC58;
|
72 |
|
|
64'hFFFFFFFFFFFFF038: iromout <= 32'h01816010;
|
73 |
|
|
64'hFFFFFFFFFFFFF03C: iromout <= 32'h01044500;
|
74 |
|
|
64'hFFFFFFFFFFFFF040: iromout <= 32'hFFFFFFFF;
|
75 |
|
|
64'hFFFFFFFFFFFFF044: iromout <= 32'h400003FF;
|
76 |
|
|
64'hFFFFFFFFFFFFF048: iromout <= 32'h0321600F;
|
77 |
|
|
64'hFFFFFFFFFFFFF04C: iromout <= 32'h05804000;
|
78 |
|
|
64'hFFFFFFFFFFFFF050: iromout <= 32'h06000014;
|
79 |
|
|
64'hFFFFFFFFFFFFF054: iromout <= 32'h00000058;
|
80 |
|
|
64'hFFFFFFFFFFFFF058: iromout <= 32'h00262110;
|
81 |
|
|
64'hFFFFFFFFFFFFF05C: iromout <= 32'h02842000;
|
82 |
|
|
64'hFFFFFFFFFFFFF060: iromout <= 32'hC6000001;
|
83 |
|
|
64'hFFFFFFFFFFFFF064: iromout <= 32'hFFFEA430;
|
84 |
|
|
64'hFFFFFFFFFFFFF068: iromout <= 32'hC24BE307;
|
85 |
|
|
64'hFFFFFFFFFFFFF06C: iromout <= 32'h0C7FFFFF;
|
86 |
|
|
64'hFFFFFFFFFFFFF070: iromout <= 32'h00000000;
|
87 |
|
|
64'hFFFFFFFFFFFFF074: iromout <= 32'h00000378;
|
88 |
|
|
64'hFFFFFFFFFFFFF078: iromout <= 32'h000DE000;
|
89 |
|
|
64'hFFFFFFFFFFFFF07C: iromout <= 32'h37800000;
|
90 |
|
|
64'hFFFFFFFFFFFFF090: iromout <= 32'hFFFFFFFF;
|
91 |
|
|
64'hFFFFFFFFFFFFF094: iromout <= 32'h700003FF;
|
92 |
|
|
64'hFFFFFFFFFFFFF098: iromout <= 32'h0001600F;
|
93 |
|
|
64'hFFFFFFFFFFFFF09C: iromout <= 32'h10044000;
|
94 |
|
|
64'hFFFFFFFFFFFFF0A0: iromout <= 32'h81FFFFC1;
|
95 |
|
|
64'hFFFFFFFFFFFFF0A4: iromout <= 32'h000006F8;
|
96 |
|
|
64'hFFFFFFFFFFFFF0A8: iromout <= 32'h00040100;
|
97 |
|
|
64'hFFFFFFFFFFFFF0AC: iromout <= 32'h0D83E000;
|
98 |
|
|
64'hFFFFFFFFFFFFF0B0: iromout <= 32'h00800009;
|
99 |
|
|
64'hFFFFFFFFFFFFF0B4: iromout <= 32'hAAAB5410;
|
100 |
|
|
64'hFFFFFFFFFFFFF0B8: iromout <= 32'h555F5554;
|
101 |
|
|
64'hFFFFFFFFFFFFF0BC: iromout <= 32'h05802AA5;
|
102 |
|
|
64'hFFFFFFFFFFFFF0C0: iromout <= 32'h02000000;
|
103 |
|
|
64'hFFFFFFFFFFFFF0C4: iromout <= 32'h0000019A;
|
104 |
|
|
64'hFFFFFFFFFFFFF0C8: iromout <= 32'h00646810;
|
105 |
|
|
64'hFFFFFFFFFFFFF0CC: iromout <= 32'h01044300;
|
106 |
|
|
64'hFFFFFFFFFFFFF0D0: iromout <= 32'hC00000A9;
|
107 |
|
|
64'hFFFFFFFFFFFFF0D4: iromout <= 32'h000022F8;
|
108 |
|
|
64'hFFFFFFFFFFFFF0D8: iromout <= 32'h0000A840;
|
109 |
|
|
64'hFFFFFFFFFFFFF0DC: iromout <= 32'h04206000;
|
110 |
|
|
64'hFFFFFFFFFFFFF0E0: iromout <= 32'hC1FFFF00;
|
111 |
|
|
64'hFFFFFFFFFFFFF0E4: iromout <= 32'h800026F8;
|
112 |
|
|
64'hFFFFFFFFFFFFF0E8: iromout <= 32'h00904802;
|
113 |
|
|
64'hFFFFFFFFFFFFF0EC: iromout <= 32'h01000800;
|
114 |
|
|
64'hFFFFFFFFFFFFF0F0: iromout <= 32'h04000000;
|
115 |
|
|
64'hFFFFFFFFFFFFF0F4: iromout <= 32'hA955551A;
|
116 |
|
|
64'hFFFFFFFFFFFFF0F8: iromout <= 32'h1091021A;
|
117 |
|
|
64'hFFFFFFFFFFFFF0FC: iromout <= 32'h2F8C0000;
|
118 |
|
|
64'hFFFFFFFFFFFFF100: iromout <= 32'h10000008;
|
119 |
|
|
64'hFFFFFFFFFFFFF104: iromout <= 32'h00000022;
|
120 |
|
|
64'hFFFFFFFFFFFFF108: iromout <= 32'hF801081C;
|
121 |
|
|
64'hFFFFFFFFFFFFF10C: iromout <= 32'h2F8C1FFF;
|
122 |
|
|
64'hFFFFFFFFFFFFF110: iromout <= 32'h14000329;
|
123 |
|
|
64'hFFFFFFFFFFFFF114: iromout <= 32'h000026FA;
|
124 |
|
|
64'hFFFFFFFFFFFFF118: iromout <= 32'h52A04002;
|
125 |
|
|
64'hFFFFFFFFFFFFF11C: iromout <= 32'h3AAAAD55;
|
126 |
|
|
64'hFFFFFFFFFFFFF120: iromout <= 32'h0355AAAA;
|
127 |
|
|
64'hFFFFFFFFFFFFF124: iromout <= 32'h00000058;
|
128 |
|
|
64'hFFFFFFFFFFFFF128: iromout <= 32'h00066808;
|
129 |
|
|
64'hFFFFFFFFFFFFF12C: iromout <= 32'h11A04000;
|
130 |
|
|
64'hFFFFFFFFFFFFF130: iromout <= 32'h44300006;
|
131 |
|
|
64'hFFFFFFFFFFFFF134: iromout <= 32'h00032410;
|
132 |
|
|
64'hFFFFFFFFFFFFF138: iromout <= 32'h008BE300;
|
133 |
|
|
64'hFFFFFFFFFFFFF13C: iromout <= 32'h02210000;
|
134 |
|
|
64'hFFFFFFFFFFFFF140: iromout <= 32'h07000000;
|
135 |
|
|
64'hFFFFFFFFFFFFF144: iromout <= 32'hFFFC8042;
|
136 |
|
|
64'hFFFFFFFFFFFFF148: iromout <= 32'h009BE307;
|
137 |
|
|
64'hFFFFFFFFFFFFF14C: iromout <= 32'h01200B00;
|
138 |
|
|
64'hFFFFFFFFFFFFF150: iromout <= 32'h00800009;
|
139 |
|
|
64'hFFFFFFFFFFFFF154: iromout <= 32'h00000010;
|
140 |
|
|
64'hFFFFFFFFFFFFF158: iromout <= 32'hAAA46810;
|
141 |
|
|
64'hFFFFFFFFFFFFF15C: iromout <= 32'h0408755A;
|
142 |
|
|
64'hFFFFFFFFFFFFF160: iromout <= 32'hC00000A9;
|
143 |
|
|
64'hFFFFFFFFFFFFF164: iromout <= 32'h000022F8;
|
144 |
|
|
64'hFFFFFFFFFFFFF168: iromout <= 32'h00008840;
|
145 |
|
|
64'hFFFFFFFFFFFFF16C: iromout <= 32'h04207000;
|
146 |
|
|
64'hFFFFFFFFFFFFF170: iromout <= 32'hC1FFFF20;
|
147 |
|
|
64'hFFFFFFFFFFFFF174: iromout <= 32'h000222F8;
|
148 |
|
|
64'hFFFFFFFFFFFFF178: iromout <= 32'h014BE858;
|
149 |
|
|
64'hFFFFFFFFFFFFF17C: iromout <= 32'h01216800;
|
150 |
|
|
64'hFFFFFFFFFFFFF180: iromout <= 32'h14000048;
|
151 |
|
|
64'hFFFFFFFFFFFFF184: iromout <= 32'h000052FA;
|
152 |
|
|
64'hFFFFFFFFFFFFF188: iromout <= 32'h40004852;
|
153 |
|
|
64'hFFFFFFFFFFFFF18C: iromout <= 32'h19810000;
|
154 |
|
|
64'hFFFFFFFFFFFFF190: iromout <= 32'h3E000000;
|
155 |
|
|
64'hFFFFFFFFFFFFF194: iromout <= 32'h000080D8;
|
156 |
|
|
64'hFFFFFFFFFFFFF198: iromout <= 32'h03400000;
|
157 |
|
|
64'hFFFFFFFFFFFFF19C: iromout <= 32'h00802000;
|
158 |
|
|
64'hFFFFFFFFFFFFF1A0: iromout <= 32'h41FFFFC9;
|
159 |
|
|
64'hFFFFFFFFFFFFF1A4: iromout <= 32'hFC0002F8;
|
160 |
|
|
64'hFFFFFFFFFFFFF1A8: iromout <= 32'h0086600F;
|
161 |
|
|
64'hFFFFFFFFFFFFF1AC: iromout <= 32'h19805FF0;
|
162 |
|
|
64'hFFFFFFFFFFFFF1B0: iromout <= 32'h02000228;
|
163 |
|
|
64'hFFFFFFFFFFFFF1B4: iromout <= 32'h0010A008;
|
164 |
|
|
64'hFFFFFFFFFFFFF1B8: iromout <= 32'hFA902010;
|
165 |
|
|
64'hFFFFFFFFFFFFF1BC: iromout <= 32'hFFFFFFFF;
|
166 |
|
|
64'hFFFFFFFFFFFFF1C0: iromout <= 32'h84680001;
|
167 |
|
|
64'hFFFFFFFFFFFFF1C4: iromout <= 32'h40000C18;
|
168 |
|
|
64'hFFFFFFFFFFFFF1C8: iromout <= 32'h00004110;
|
169 |
|
|
64'hFFFFFFFFFFFFF1CC: iromout <= 32'h11844000;
|
170 |
|
|
64'hFFFFFFFFFFFFF1D0: iromout <= 32'hFFFFFFA9;
|
171 |
|
|
64'hFFFFFFFFFFFFF1D4: iromout <= 32'h0000CFFF;
|
172 |
|
|
64'hFFFFFFFFFFFFF1D8: iromout <= 32'h03502000;
|
173 |
|
|
64'hFFFFFFFFFFFFF1DC: iromout <= 32'h00800000;
|
174 |
|
|
64'hFFFFFFFFFFFFF1E0: iromout <= 32'h03FF0000;
|
175 |
|
|
64'hFFFFFFFFFFFFF1E4: iromout <= 32'hFC002118;
|
176 |
|
|
64'hFFFFFFFFFFFFF1E8: iromout <= 32'h02046017;
|
177 |
|
|
64'hFFFFFFFFFFFFF1EC: iromout <= 32'h00000000;
|
178 |
|
|
64'hFFFFFFFFFFFFFFB0: iromout <= 32'hFFFFFC66;
|
179 |
14 |
robfinch |
64'hFFFFFFFFFFFFFFB4: iromout <= 32'h000000CF;
|
180 |
|
|
64'hFFFFFFFFFFFFFFB8: iromout <= 32'h000DE000;
|
181 |
|
|
64'hFFFFFFFFFFFFFFBC: iromout <= 32'h37800000;
|
182 |
20 |
robfinch |
64'hFFFFFFFFFFFFFFC0: iromout <= 32'hFFFFFC66;
|
183 |
|
|
64'hFFFFFFFFFFFFFFC4: iromout <= 32'h000000CF;
|
184 |
14 |
robfinch |
64'hFFFFFFFFFFFFFFC8: iromout <= 32'h000DE000;
|
185 |
|
|
64'hFFFFFFFFFFFFFFCC: iromout <= 32'h37800000;
|
186 |
|
|
64'hFFFFFFFFFFFFFFD0: iromout <= 32'h00000000;
|
187 |
|
|
64'hFFFFFFFFFFFFFFD4: iromout <= 32'h00000378;
|
188 |
|
|
64'hFFFFFFFFFFFFFFD8: iromout <= 32'h000DE000;
|
189 |
|
|
64'hFFFFFFFFFFFFFFDC: iromout <= 32'h37800000;
|
190 |
20 |
robfinch |
64'hFFFFFFFFFFFFFFE0: iromout <= 32'hFFFFFC65;
|
191 |
14 |
robfinch |
64'hFFFFFFFFFFFFFFE4: iromout <= 32'h000000CF;
|
192 |
|
|
64'hFFFFFFFFFFFFFFE8: iromout <= 32'h000DE000;
|
193 |
|
|
64'hFFFFFFFFFFFFFFEC: iromout <= 32'h37800000;
|
194 |
|
|
64'hFFFFFFFFFFFFFFF0: iromout <= 32'hFFFFFC00;
|
195 |
|
|
64'hFFFFFFFFFFFFFFF4: iromout <= 32'h000000CF;
|
196 |
|
|
64'hFFFFFFFFFFFFFFF8: iromout <= 32'h00000000;
|
197 |
|
|
64'hFFFFFFFFFFFFFFFC: iromout <= 32'h00000000;
|
198 |
|
|
endcase
|
199 |
|
|
assign sys_dbi = iromout;
|
200 |
|
|
|
201 |
|
|
reg [7:0] state;
|
202 |
|
|
always @(posedge clk)
|
203 |
|
|
if (rst) begin
|
204 |
|
|
state <= IDLE;
|
205 |
|
|
cmd_full <= 1'b0;
|
206 |
|
|
rd_empty <= 1'b1;
|
207 |
|
|
end
|
208 |
|
|
else begin
|
209 |
|
|
case(state)
|
210 |
|
|
IDLE:
|
211 |
|
|
if (cmd_en) begin
|
212 |
|
|
tb_cmd_instr <= cmd_instr;
|
213 |
|
|
tb_cmd_bl <= cmd_bl;
|
214 |
|
|
tb_cmd_byte_addr <= cmd_byte_addr;
|
215 |
|
|
cmd_full <= 1'b1;
|
216 |
|
|
rd_empty <= 1'b1;
|
217 |
|
|
cnt <= 8'd0;
|
218 |
|
|
state <= DOCMD;
|
219 |
|
|
end
|
220 |
|
|
DOCMD:
|
221 |
|
|
case(tb_cmd_instr)
|
222 |
|
|
3'b000:
|
223 |
|
|
begin
|
224 |
|
|
cmd_full <= 1'b0;
|
225 |
|
|
state <= IDLE;
|
226 |
|
|
end
|
227 |
|
|
2'b001:
|
228 |
|
|
begin
|
229 |
|
|
cmd_full <= 1'b0;
|
230 |
|
|
state <= IDLE;
|
231 |
|
|
end
|
232 |
|
|
endcase
|
233 |
|
|
default: state <= IDLE;
|
234 |
|
|
endcase
|
235 |
|
|
if (rd_en) begin
|
236 |
|
|
if (cnt>=3) begin
|
237 |
|
|
rd_empty <= 1'b0;
|
238 |
|
|
case(tb_cmd_byte_addr | 64'hFFFF_FFFF_FFFF_0000)
|
239 |
|
|
64'hFFFFFFFFFFFFF000: rd_data <= 32'h020013FD;
|
240 |
|
|
64'hFFFFFFFFFFFFF004: rd_data <= 32'h00006050;
|
241 |
|
|
64'hFFFFFFFFFFFFF008: rd_data <= 32'h01802120;
|
242 |
|
|
64'hFFFFFFFFFFFFF00C: rd_data <= 32'h00848000;
|
243 |
|
|
64'hFFFFFFFFFFFFF010: rd_data <= 32'h0400042B;
|
244 |
|
|
64'hFFFFFFFFFFFFF014: rd_data <= 32'h40006050;
|
245 |
|
|
64'hFFFFFFFFFFFFF018: rd_data <= 32'hFFF04111;
|
246 |
|
|
64'hFFFFFFFFFFFFF01C: rd_data <= 32'h3FFFFFFF;
|
247 |
|
|
64'hFFFFFFFFFFFFF020: rd_data <= 32'h03D00000;
|
248 |
|
|
64'hFFFFFFFFFFFFF024: rd_data <= 32'h0000C850;
|
249 |
|
|
64'hFFFFFFFFFFFFF028: rd_data <= 32'h64C14010;
|
250 |
|
|
64'hFFFFFFFFFFFFF02C: rd_data <= 32'h05006000;
|
251 |
|
|
64'hFFFFFFFFFFFFF030: rd_data <= 32'h44000000;
|
252 |
|
|
64'hFFFFFFFFFFFFF034: rd_data <= 32'h00000988;
|
253 |
|
|
64'hFFFFFFFFFFFFF038: rd_data <= 32'h0010A108;
|
254 |
|
|
64'hFFFFFFFFFFFFF03C: rd_data <= 32'h030C6000;
|
255 |
|
|
64'hFFFFFFFFFFFFF040: rd_data <= 32'hC1FFFF81;
|
256 |
|
|
64'hFFFFFFFFFFFFF044: rd_data <= 32'hFFF062F8;
|
257 |
|
|
64'hFFFFFFFFFFFFF048: rd_data <= 32'h00031FFF;
|
258 |
|
|
64'hFFFFFFFFFFFFF04C: rd_data <= 32'h37800000;
|
259 |
|
|
64'hFFFFFFFFFFFFF050: rd_data <= 32'h00000000;
|
260 |
|
|
64'hFFFFFFFFFFFFF054: rd_data <= 32'h00000378;
|
261 |
|
|
64'hFFFFFFFFFFFFF058: rd_data <= 32'h000DE000;
|
262 |
|
|
64'hFFFFFFFFFFFFF05C: rd_data <= 32'h37800000;
|
263 |
|
|
64'hFFFFFFFFFFFFF060: rd_data <= 32'hFFFFFFFF;
|
264 |
|
|
64'hFFFFFFFFFFFFF064: rd_data <= 32'h700003FF;
|
265 |
|
|
64'hFFFFFFFFFFFFF068: rd_data <= 32'h0001400F;
|
266 |
|
|
64'hFFFFFFFFFFFFF06C: rd_data <= 32'h10044000;
|
267 |
|
|
64'hFFFFFFFFFFFFF070: rd_data <= 32'h81FFFFC5;
|
268 |
|
|
64'hFFFFFFFFFFFFF074: rd_data <= 32'h000006F8;
|
269 |
|
|
64'hFFFFFFFFFFFFF078: rd_data <= 32'h00040100;
|
270 |
|
|
64'hFFFFFFFFFFFFF07C: rd_data <= 32'h0D83E000;
|
271 |
|
|
64'hFFFFFFFFFFFFF080: rd_data <= 32'h00800009;
|
272 |
|
|
64'hFFFFFFFFFFFFF084: rd_data <= 32'hAAAB5410;
|
273 |
|
|
64'hFFFFFFFFFFFFF088: rd_data <= 32'h555F5554;
|
274 |
|
|
64'hFFFFFFFFFFFFF08C: rd_data <= 32'h05002AA5;
|
275 |
|
|
64'hFFFFFFFFFFFFF090: rd_data <= 32'h02000000;
|
276 |
|
|
64'hFFFFFFFFFFFFF094: rd_data <= 32'h0000019A;
|
277 |
|
|
64'hFFFFFFFFFFFFF098: rd_data <= 32'h00646810;
|
278 |
|
|
64'hFFFFFFFFFFFFF09C: rd_data <= 32'h01044300;
|
279 |
|
|
64'hFFFFFFFFFFFFF0A0: rd_data <= 32'hC00000A1;
|
280 |
|
|
64'hFFFFFFFFFFFFF0A4: rd_data <= 32'h000022F8;
|
281 |
|
|
64'hFFFFFFFFFFFFF0A8: rd_data <= 32'h0000A840;
|
282 |
|
|
64'hFFFFFFFFFFFFF0AC: rd_data <= 32'h03A06000;
|
283 |
|
|
64'hFFFFFFFFFFFFF0B0: rd_data <= 32'hC1FFFF02;
|
284 |
|
|
64'hFFFFFFFFFFFFF0B4: rd_data <= 32'h800026F8;
|
285 |
|
|
64'hFFFFFFFFFFFFF0B8: rd_data <= 32'h00904802;
|
286 |
|
|
64'hFFFFFFFFFFFFF0BC: rd_data <= 32'h01000800;
|
287 |
|
|
64'hFFFFFFFFFFFFF0C0: rd_data <= 32'h04000000;
|
288 |
|
|
64'hFFFFFFFFFFFFF0C4: rd_data <= 32'hA955551A;
|
289 |
|
|
64'hFFFFFFFFFFFFF0C8: rd_data <= 32'h1010E21A;
|
290 |
|
|
64'hFFFFFFFFFFFFF0CC: rd_data <= 32'h2F8C0000;
|
291 |
|
|
64'hFFFFFFFFFFFFF0D0: rd_data <= 32'h10000008;
|
292 |
|
|
64'hFFFFFFFFFFFFF0D4: rd_data <= 32'h00000022;
|
293 |
|
|
64'hFFFFFFFFFFFFF0D8: rd_data <= 32'hF820E81C;
|
294 |
|
|
64'hFFFFFFFFFFFFF0DC: rd_data <= 32'h2F8C1FFF;
|
295 |
|
|
64'hFFFFFFFFFFFFF0E0: rd_data <= 32'h14000321;
|
296 |
|
|
64'hFFFFFFFFFFFFF0E4: rd_data <= 32'h000026FA;
|
297 |
|
|
64'hFFFFFFFFFFFFF0E8: rd_data <= 32'h52A04002;
|
298 |
|
|
64'hFFFFFFFFFFFFF0EC: rd_data <= 32'h3AAAAD55;
|
299 |
|
|
64'hFFFFFFFFFFFFF0F0: rd_data <= 32'h0355AAAA;
|
300 |
|
|
64'hFFFFFFFFFFFFF0F4: rd_data <= 32'h00000050;
|
301 |
|
|
64'hFFFFFFFFFFFFF0F8: rd_data <= 32'h00066808;
|
302 |
|
|
64'hFFFFFFFFFFFFF0FC: rd_data <= 32'h11A04000;
|
303 |
|
|
64'hFFFFFFFFFFFFF100: rd_data <= 32'h44300006;
|
304 |
|
|
64'hFFFFFFFFFFFFF104: rd_data <= 32'h00030410;
|
305 |
|
|
64'hFFFFFFFFFFFFF108: rd_data <= 32'h008BE300;
|
306 |
|
|
64'hFFFFFFFFFFFFF10C: rd_data <= 32'h02210000;
|
307 |
|
|
64'hFFFFFFFFFFFFF110: rd_data <= 32'h07000000;
|
308 |
|
|
64'hFFFFFFFFFFFFF114: rd_data <= 32'hFFFC883A;
|
309 |
|
|
64'hFFFFFFFFFFFFF118: rd_data <= 32'h009BE307;
|
310 |
|
|
64'hFFFFFFFFFFFFF11C: rd_data <= 32'h01200B00;
|
311 |
|
|
64'hFFFFFFFFFFFFF120: rd_data <= 32'h00800009;
|
312 |
|
|
64'hFFFFFFFFFFFFF124: rd_data <= 32'h00000010;
|
313 |
|
|
64'hFFFFFFFFFFFFF128: rd_data <= 32'hAAA46810;
|
314 |
|
|
64'hFFFFFFFFFFFFF12C: rd_data <= 32'h0388755A;
|
315 |
|
|
64'hFFFFFFFFFFFFF130: rd_data <= 32'hC00000A1;
|
316 |
|
|
64'hFFFFFFFFFFFFF134: rd_data <= 32'h000022F8;
|
317 |
|
|
64'hFFFFFFFFFFFFF138: rd_data <= 32'h00008840;
|
318 |
|
|
64'hFFFFFFFFFFFFF13C: rd_data <= 32'h03A07000;
|
319 |
|
|
64'hFFFFFFFFFFFFF140: rd_data <= 32'hC1FFFF22;
|
320 |
|
|
64'hFFFFFFFFFFFFF144: rd_data <= 32'h000202F8;
|
321 |
|
|
64'hFFFFFFFFFFFFF148: rd_data <= 32'h014BE858;
|
322 |
|
|
64'hFFFFFFFFFFFFF14C: rd_data <= 32'h01216800;
|
323 |
|
|
64'hFFFFFFFFFFFFF150: rd_data <= 32'h14000040;
|
324 |
|
|
64'hFFFFFFFFFFFFF154: rd_data <= 32'h000052FA;
|
325 |
|
|
64'hFFFFFFFFFFFFF158: rd_data <= 32'h40004852;
|
326 |
|
|
64'hFFFFFFFFFFFFF15C: rd_data <= 32'h19810000;
|
327 |
|
|
64'hFFFFFFFFFFFFF160: rd_data <= 32'h3E000000;
|
328 |
|
|
64'hFFFFFFFFFFFFF164: rd_data <= 32'h0000C8D8;
|
329 |
|
|
64'hFFFFFFFFFFFFF168: rd_data <= 32'h02102008;
|
330 |
|
|
64'hFFFFFFFFFFFFF16C: rd_data <= 32'h2F840000;
|
331 |
|
|
64'hFFFFFFFFFFFFF170: rd_data <= 32'h03FF0000;
|
332 |
|
|
64'hFFFFFFFFFFFFF174: rd_data <= 32'hFC002198;
|
333 |
|
|
64'hFFFFFFFFFFFFF178: rd_data <= 32'h22866017;
|
334 |
|
|
64'hFFFFFFFFFFFFF17C: rd_data <= 32'h00802000;
|
335 |
|
|
64'hFFFFFFFFFFFFF180: rd_data <= 32'h04000428;
|
336 |
|
|
64'hFFFFFFFFFFFFF184: rd_data <= 32'h0016A408;
|
337 |
|
|
64'hFFFFFFFFFFFFF188: rd_data <= 32'h00102200;
|
338 |
|
|
64'hFFFFFFFFFFFFF18C: rd_data <= 32'h01884680;
|
339 |
|
|
64'hFFFFFFFFFFFFF190: rd_data <= 32'h44100003;
|
340 |
|
|
64'hFFFFFFFFFFFFF194: rd_data <= 32'h00000010;
|
341 |
|
|
64'hFFFFFFFFFFFFF198: rd_data <= 32'h52946110;
|
342 |
|
|
64'hFFFFFFFFFFFFF19C: rd_data <= 32'h00880000;
|
343 |
|
|
64'hFFFFFFFFFFFFF1A0: rd_data <= 32'h00000034;
|
344 |
|
|
64'hFFFFFFFFFFFFF1A4: rd_data <= 32'h0000CC08;
|
345 |
|
|
64'hFFFFFFFFFFFFF1A8: rd_data <= 32'h00002000;
|
346 |
|
|
64'hFFFFFFFFFFFFF1AC: rd_data <= 32'h11803FF0;
|
347 |
|
|
64'hFFFFFFFFFFFFF1B0: rd_data <= 32'h05FF0008;
|
348 |
|
|
64'hFFFFFFFFFFFFF1B4: rd_data <= 32'h00008118;
|
349 |
|
|
64'hFFFFFFFFFFFFF1B8: rd_data <= 32'h00000000;
|
350 |
|
|
64'hFFFFFFFFFFFFF1BC: rd_data <= 32'h37800000;
|
351 |
|
|
64'hFFFFFFFFFFFFFFB0: rd_data <= 32'hFFFFFC59;
|
352 |
|
|
64'hFFFFFFFFFFFFFFB4: rd_data <= 32'h000000CF;
|
353 |
|
|
64'hFFFFFFFFFFFFFFB8: rd_data <= 32'h000DE000;
|
354 |
|
|
64'hFFFFFFFFFFFFFFBC: rd_data <= 32'h37800000;
|
355 |
|
|
64'hFFFFFFFFFFFFFFC0: rd_data <= 32'h00000000;
|
356 |
|
|
64'hFFFFFFFFFFFFFFC4: rd_data <= 32'h00000378;
|
357 |
|
|
64'hFFFFFFFFFFFFFFC8: rd_data <= 32'h000DE000;
|
358 |
|
|
64'hFFFFFFFFFFFFFFCC: rd_data <= 32'h37800000;
|
359 |
|
|
64'hFFFFFFFFFFFFFFD0: rd_data <= 32'h00000000;
|
360 |
|
|
64'hFFFFFFFFFFFFFFD4: rd_data <= 32'h00000378;
|
361 |
|
|
64'hFFFFFFFFFFFFFFD8: rd_data <= 32'h000DE000;
|
362 |
|
|
64'hFFFFFFFFFFFFFFDC: rd_data <= 32'h37800000;
|
363 |
|
|
64'hFFFFFFFFFFFFFFE0: rd_data <= 32'h00000000;
|
364 |
|
|
64'hFFFFFFFFFFFFFFE4: rd_data <= 32'h00000378;
|
365 |
|
|
64'hFFFFFFFFFFFFFFE8: rd_data <= 32'h000DE000;
|
366 |
|
|
64'hFFFFFFFFFFFFFFEC: rd_data <= 32'h37800000;
|
367 |
|
|
64'hFFFFFFFFFFFFFFF0: rd_data <= 32'hFFFFFC00;
|
368 |
|
|
64'hFFFFFFFFFFFFFFF4: rd_data <= 32'h000000CF;
|
369 |
|
|
64'hFFFFFFFFFFFFFFF8: rd_data <= 32'h00000000;
|
370 |
|
|
64'hFFFFFFFFFFFFFFFC: rd_data <= 32'h00000000;
|
371 |
|
|
|
372 |
|
|
// 30'h0: rd_data <= 32'h00000000;
|
373 |
|
|
// 30'h4: rd_data <= 32'h00002378;
|
374 |
|
|
// 30'h8: rd_data <= 32'h00030000;
|
375 |
|
|
// 30'hC: rd_data <= 32'h37800000;
|
376 |
|
|
// 30'h10: rd_data <= 32'h00000000;
|
377 |
|
|
// 30'h14: rd_data <= 32'h00000378;
|
378 |
|
|
// 30'h18: rd_data <= 32'h000DE000;
|
379 |
|
|
// 30'h1C: rd_data <= 32'h37800000;
|
380 |
|
|
// 30'h20: rd_data <= 32'hFFFFFFFF;
|
381 |
|
|
// 30'h24: rd_data <= 32'h700003FF;
|
382 |
|
|
// 30'h28: rd_data <= 32'h0001200F;
|
383 |
|
|
// 30'h2C: rd_data <= 32'h0D83E000;
|
384 |
|
|
endcase
|
385 |
|
|
tb_cmd_byte_addr <= tb_cmd_byte_addr + 30'd4;
|
386 |
|
|
tb_cmd_bl <= tb_cmd_bl - 6'd1;
|
387 |
|
|
if (tb_cmd_bl==6'h0) rd_empty <= 1'b1;
|
388 |
|
|
end
|
389 |
|
|
else
|
390 |
|
|
cnt <= cnt + 1;
|
391 |
|
|
end
|
392 |
|
|
end
|
393 |
|
|
|
394 |
|
|
Raptor64mc u1
|
395 |
|
|
(
|
396 |
|
|
.rst_i(rst),
|
397 |
|
|
.clk_i(clk),
|
398 |
|
|
.nmi_i(nmi),
|
399 |
|
|
.irq_i(1'b0),
|
400 |
|
|
.bte_o(),
|
401 |
|
|
.cti_o(),
|
402 |
|
|
.cyc_o(sys_cyc),
|
403 |
|
|
.stb_o(sys_stb),
|
404 |
|
|
.ack_i(sys_ack),
|
405 |
|
|
.we_o(sys_we),
|
406 |
|
|
.sel_o(sys_sel),
|
407 |
|
|
.adr_o(sys_adr),
|
408 |
|
|
.dat_i(sys_dbi),
|
409 |
|
|
.dat_o(sys_dbo),
|
410 |
|
|
|
411 |
|
|
.cmd_en(cmd_en),
|
412 |
|
|
.cmd_instr(cmd_instr),
|
413 |
|
|
.cmd_bl(cmd_bl),
|
414 |
|
|
.cmd_byte_addr(cmd_byte_addr),
|
415 |
|
|
.cmd_full(cmd_full),
|
416 |
|
|
|
417 |
|
|
.rd_en(rd_en),
|
418 |
|
|
.rd_data(rd_data),
|
419 |
|
|
.rd_empty(rd_empty),
|
420 |
|
|
|
421 |
|
|
.wr_en(wr_en),
|
422 |
|
|
.wr_data(wr_data),
|
423 |
|
|
.wr_full(1'b0),
|
424 |
|
|
.wr_empty(1'b1),
|
425 |
|
|
|
426 |
|
|
.sys_adv(1'b0),
|
427 |
|
|
.sys_adr(59'd0)
|
428 |
|
|
);
|
429 |
|
|
endmodule
|