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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel_21/] [or1200/] [rtl/] [verilog/] [or1200_cpu.v] - Blame information for rev 504

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

Line No. Rev Author Line
1 504 lampret
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1200's CPU                                                ////
4
////                                                              ////
5
////  This file is part of the OpenRISC 1200 project              ////
6
////  http://www.opencores.org/cores/or1k/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Instantiation of internal CPU blocks. IFETCH, SPRS, FRZ,    ////
10
////  ALU, EXCEPT, ID, WBMUX, OPERANDMUX, RF etc.                 ////
11
////                                                              ////
12
////  To Do:                                                      ////
13
////   - make it smaller and faster                               ////
14
////                                                              ////
15
////  Author(s):                                                  ////
16
////      - Damjan Lampret, lampret@opencores.org                 ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
21
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any   ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.opencores.org/lgpl.shtml                     ////
42
////                                                              ////
43
//////////////////////////////////////////////////////////////////////
44
//
45
// CVS Revision History
46
//
47
// $Log: not supported by cvs2svn $
48
// Revision 1.19  2001/11/30 18:59:47  simons
49
// *** empty log message ***
50
//
51
// Revision 1.18  2001/11/23 21:42:31  simons
52
// Program counter divided to PPC and NPC.
53
//
54
// Revision 1.17  2001/11/23 08:38:51  lampret
55
// Changed DSR/DRR behavior and exception detection.
56
//
57
// Revision 1.16  2001/11/20 00:57:22  lampret
58
// Fixed width of du_except.
59
//
60
// Revision 1.15  2001/11/18 09:58:28  lampret
61
// Fixed some l.trap typos.
62
//
63
// Revision 1.14  2001/11/18 08:36:28  lampret
64
// For GDB changed single stepping and disabled trap exception.
65
//
66
// Revision 1.13  2001/11/13 10:02:21  lampret
67
// Added 'setpc'. Renamed some signals (except_flushpipe into flushpipe etc)
68
//
69
// Revision 1.12  2001/11/12 01:45:40  lampret
70
// Moved flag bit into SR. Changed RF enable from constant enable to dynamic enable for read ports.
71
//
72
// Revision 1.11  2001/11/10 03:43:57  lampret
73
// Fixed exceptions.
74
//
75
// Revision 1.10  2001/10/21 17:57:16  lampret
76
// Removed params from generic_XX.v. Added translate_off/on in sprs.v and id.v. Removed spr_addr from dc.v and ic.v. Fixed CR+LF.
77
//
78
// Revision 1.9  2001/10/14 13:12:09  lampret
79
// MP3 version.
80
//
81
// Revision 1.1.1.1  2001/10/06 10:18:35  igorm
82
// no message
83
//
84
// Revision 1.4  2001/08/17 08:01:19  lampret
85
// IC enable/disable.
86
//
87
// Revision 1.3  2001/08/13 03:36:20  lampret
88
// Added cfg regs. Moved all defines into one defines.v file. More cleanup.
89
//
90
// Revision 1.2  2001/08/09 13:39:33  lampret
91
// Major clean-up.
92
//
93
// Revision 1.1  2001/07/20 00:46:03  lampret
94
// Development version of RTL. Libraries are missing.
95
//
96
//
97
 
98
// synopsys translate_off
99
`include "timescale.v"
100
// synopsys translate_on
101
`include "or1200_defines.v"
102
 
103
module or1200_cpu(
104
        // Clk & Rst
105
        clk, rst,
106
 
107
        // Insn interface
108
        ic_en,
109
        icpu_adr_o, icpu_cyc_o, icpu_stb_o, icpu_we_o, icpu_sel_o, icpu_tag_o,
110
        icpu_dat_i, icpu_ack_i, icpu_rty_i, icpu_err_i, icpu_adr_i, icpu_tag_i,
111
        immu_en,
112
 
113
        // Debug unit
114
        ex_insn, ex_freeze, branch_op,
115
        du_stall, du_addr, du_dat_du, du_read, du_write, du_dsr, du_except,
116
 
117
        // Data interface
118
        dc_en,
119
        dcpu_adr_o, dcpu_cyc_o, dcpu_stb_o, dcpu_we_o, dcpu_sel_o, dcpu_tag_o, dcpu_dat_o,
120
        dcpu_dat_i, dcpu_ack_i, dcpu_rty_i, dcpu_err_i, dcpu_tag_i,
121
        dmmu_en,
122
 
123
        // Interrupt exceptions
124
        int_high, int_low,
125
 
126
        // SPR interface
127
        supv, spr_addr, spr_dataout, spr_dat_pic, spr_dat_tt, spr_dat_pm,
128
        spr_dat_dmmu, spr_dat_immu, spr_dat_du, spr_cs, spr_we
129
);
130
 
131
parameter dw = `OR1200_OPERAND_WIDTH;
132
parameter aw = `OR1200_REGFILE_ADDR_WIDTH;
133
 
134
//
135
// I/O ports
136
//
137
 
138
//
139
// Clk & Rst
140
//
141
input                           clk;
142
input                           rst;
143
 
144
//
145
// Insn (IC) interface
146
//
147
output                          ic_en;
148
output  [31:0]                   icpu_adr_o;
149
output                          icpu_cyc_o;
150
output                          icpu_stb_o;
151
output                          icpu_we_o;
152
output  [3:0]                    icpu_sel_o;
153
output  [3:0]                    icpu_tag_o;
154
input   [31:0]                   icpu_dat_i;
155
input                           icpu_ack_i;
156
input                           icpu_rty_i;
157
input                           icpu_err_i;
158
input   [31:0]                   icpu_adr_i;
159
input   [3:0]                    icpu_tag_i;
160
 
161
//
162
// Insn (IMMU) interface
163
//
164
output                          immu_en;
165
 
166
//
167
// Debug interface
168
//
169
output  [31:0]                   ex_insn;
170
output                          ex_freeze;
171
output  [`OR1200_BRANCHOP_WIDTH-1:0]     branch_op;
172
input                           du_stall;
173
input   [dw-1:0]         du_addr;
174
input   [dw-1:0]         du_dat_du;
175
input                           du_read;
176
input                           du_write;
177
input   [`OR1200_DU_DSR_WIDTH-1:0]       du_dsr;
178
output  [12:0]                   du_except;
179
 
180
//
181
// Data (DC) interface
182
//
183
output  [31:0]                   dcpu_adr_o;
184
output                          dcpu_cyc_o;
185
output                          dcpu_stb_o;
186
output                          dcpu_we_o;
187
output  [3:0]                    dcpu_sel_o;
188
output  [3:0]                    dcpu_tag_o;
189
output  [31:0]                   dcpu_dat_o;
190
input   [31:0]                   dcpu_dat_i;
191
input                           dcpu_ack_i;
192
input                           dcpu_rty_i;
193
input                           dcpu_err_i;
194
input   [3:0]                    dcpu_tag_i;
195
output                          dc_en;
196
 
197
//
198
// Data (DMMU) interface
199
//
200
output                          dmmu_en;
201
 
202
//
203
// SPR interface
204
//
205
output                          supv;
206
input   [dw-1:0]         spr_dat_pic;
207
input   [dw-1:0]         spr_dat_tt;
208
input   [dw-1:0]         spr_dat_pm;
209
input   [dw-1:0]         spr_dat_dmmu;
210
input   [dw-1:0]         spr_dat_immu;
211
input   [dw-1:0]         spr_dat_du;
212
output  [dw-1:0]         spr_addr;
213
output  [dw-1:0]         spr_dataout;
214
output  [31:0]                   spr_cs;
215
output                          spr_we;
216
 
217
//
218
// Interrupt exceptions
219
//
220
input                           int_high;
221
input                           int_low;
222
 
223
//
224
// Internal wires
225
//
226
wire    [31:0]                   if_insn;
227
wire    [31:0]                   if_pc;
228
wire    [31:2]                  lr_sav;
229
wire    [aw-1:0]         rf_addrw;
230
wire    [aw-1:0]                 rf_addra;
231
wire    [aw-1:0]                 rf_addrb;
232
wire                            rf_rda;
233
wire                            rf_rdb;
234
wire    [dw-1:0]         simm;
235
wire    [dw-1:2]                branch_addrofs;
236
wire    [`OR1200_ALUOP_WIDTH-1:0]        alu_op;
237
wire    [`OR1200_SHROTOP_WIDTH-1:0]      shrot_op;
238
wire    [`OR1200_COMPOP_WIDTH-1:0]       comp_op;
239
wire    [`OR1200_BRANCHOP_WIDTH-1:0]     branch_op;
240
wire    [`OR1200_LSUOP_WIDTH-1:0]        lsu_op;
241
wire                            if_freeze;
242
wire                            id_freeze;
243
wire                            ex_freeze;
244
wire                            wb_freeze;
245
wire    [`OR1200_SEL_WIDTH-1:0]  sel_a;
246
wire    [`OR1200_SEL_WIDTH-1:0]  sel_b;
247
wire    [`OR1200_RFWBOP_WIDTH-1:0]       rfwb_op;
248
wire    [dw-1:0]         rf_dataw;
249
wire    [dw-1:0]         rf_dataa;
250
wire    [dw-1:0]         rf_datab;
251
wire    [dw-1:0]         muxed_b;
252
wire    [dw-1:0]         wb_forw;
253
wire                            wbforw_valid;
254
wire    [dw-1:0]         operand_a;
255
wire    [dw-1:0]         operand_b;
256
wire    [dw-1:0]         alu_dataout;
257
wire    [dw-1:0]         lsu_dataout;
258
wire    [dw-1:0]         sprs_dataout;
259
wire    [31:0]                   lsu_addrofs;
260
wire    [`OR1200_MULTICYCLE_WIDTH-1:0]   multicycle;
261
wire    [`OR1200_EXCEPT_WIDTH-1:0]       except_type;
262
wire                            flushpipe;
263
wire                            extend_flush;
264
wire                            branch_taken;
265
wire                            flag;
266
wire                            flagforw;
267
wire                            flag_we;
268
wire                            lsu_stall;
269
wire                            epcr_we;
270
wire                            eear_we;
271
wire                            esr_we;
272
wire                            pc_we;
273
wire    [31:0]                   epcr;
274
wire    [31:0]                   eear;
275
wire    [`OR1200_SR_WIDTH-1:0]           esr;
276
wire    [`OR1200_SR_WIDTH-1:0]           sr;
277
wire                            except_start;
278
wire                            except_started;
279
wire    [31:0]                   wb_insn;
280
wire    [15:0]                   spr_addrimm;
281
wire                            sig_syscall;
282
wire                            sig_trap;
283
wire    [31:0]                   spr_dat_cfgr;
284
wire    [31:0]                   spr_dat_rf;
285
wire    [31:0]                  spr_dat_npc;
286
wire    [31:0]                   spr_dat_ppc;
287
wire    [31:0]                   spr_dat_mac;
288
wire                            force_dslot_fetch;
289
wire                            has_dslot;
290
wire                            if_stall;
291
wire                            id_macrc_op;
292
wire                            ex_macrc_op;
293
wire    [`OR1200_MACOP_WIDTH-1:0] mac_op;
294
wire    [31:0]                   mult_mac_result;
295
wire                            mac_stall;
296
wire    [12:0]                   except_stop;
297
wire                            genpc_refetch;
298
wire                            rfe;
299
wire                            lsu_unstall;
300
wire                            except_align;
301
wire                            except_dtlbmiss;
302
wire                            except_dmmufault;
303
wire                            except_illegal;
304
wire                            except_itlbmiss;
305
wire                            except_immufault;
306
wire                            except_ibuserr;
307
wire                            except_dbuserr;
308
 
309
//
310
// icpu_we_o
311
//
312
assign icpu_we_o = 1'b0;
313
 
314
//
315
// Send exceptions to Debug Unit
316
//
317
assign du_except = except_stop;
318
 
319
//
320
// Data cache enable
321
//
322
assign dc_en = sr[`OR1200_SR_DCE];
323
 
324
//
325
// Instruction cache enable
326
//
327
assign ic_en = sr[`OR1200_SR_ICE];
328
 
329
//
330
// DMMU enable
331
//
332
assign dmmu_en = sr[`OR1200_SR_DME];
333
 
334
//
335
// IMMU enable
336
//
337
assign immu_en = sr[`OR1200_SR_IME];
338
 
339
//
340
// SUPV bit
341
//
342
assign supv = sr[`OR1200_SR_SUPV];
343
 
344
//
345
// Instantiation of instruction fetch block
346
//
347
or1200_genpc or1200_genpc(
348
        .clk(clk),
349
        .rst(rst),
350
        .icpu_adr_o(icpu_adr_o),
351
        .icpu_cyc_o(icpu_cyc_o),
352
        .icpu_stb_o(icpu_stb_o),
353
        .icpu_sel_o(icpu_sel_o),
354
        .icpu_tag_o(icpu_tag_o),
355
        .icpu_ack_i(icpu_ack_i),
356
        .icpu_rty_i(icpu_rty_i),
357
        .icpu_err_i(icpu_err_i),
358
        .icpu_adr_i(icpu_adr_i),
359
 
360
        .branch_op(branch_op),
361
        .except_type(except_type),
362
        .except_start(except_start),
363
        .branch_addrofs(branch_addrofs),
364
        .lr_restor(operand_b),
365
        .flag(flag),
366
        .taken(branch_taken),
367
        .binsn_addr(lr_sav),
368
        .epcr(epcr),
369
        .spr_dat_i(spr_dataout),
370
        .spr_pc_we(pc_we),
371
        .genpc_refetch(genpc_refetch)
372
);
373
 
374
//
375
// Instantiation of instruction fetch block
376
//
377
or1200_if or1200_if(
378
        .clk(clk),
379
        .rst(rst),
380
        .icpu_dat_i(icpu_dat_i),
381
        .icpu_ack_i(icpu_ack_i),
382
        .icpu_rty_i(icpu_rty_i),
383
        .icpu_err_i(icpu_err_i),
384
        .icpu_adr_i(icpu_adr_i),
385
        .icpu_tag_i(icpu_tag_i),
386
 
387
        .if_freeze(if_freeze),
388
        .if_insn(if_insn),
389
        .if_pc(if_pc),
390
        .flushpipe(flushpipe),
391
        .if_stall(if_stall),
392
        .has_dslot(has_dslot),
393
        .taken(branch_taken),
394
        .genpc_refetch(genpc_refetch),
395
        .rfe(rfe),
396
        .except_itlbmiss(except_itlbmiss),
397
        .except_immufault(except_immufault),
398
        .except_ibuserr(except_ibuserr)
399
);
400
 
401
//
402
// Instantiation of instruction decode/control logic
403
//
404
or1200_ctrl or1200_ctrl(
405
        .clk(clk),
406
        .rst(rst),
407
        .id_freeze(id_freeze),
408
        .ex_freeze(ex_freeze),
409
        .wb_freeze(wb_freeze),
410
        .flushpipe(flushpipe),
411
        .if_insn(if_insn),
412
        .ex_insn(ex_insn),
413
        .branch_op(branch_op),
414
        .rf_addra(rf_addra),
415
        .rf_addrb(rf_addrb),
416
        .rf_rda(rf_rda),
417
        .rf_rdb(rf_rdb),
418
        .alu_op(alu_op),
419
        .mac_op(mac_op),
420
        .shrot_op(shrot_op),
421
        .comp_op(comp_op),
422
        .rf_addrw(rf_addrw),
423
        .rfwb_op(rfwb_op),
424
        .wb_insn(wb_insn),
425
        .simm(simm),
426
        .branch_addrofs(branch_addrofs),
427
        .lsu_addrofs(lsu_addrofs),
428
        .sel_a(sel_a),
429
        .sel_b(sel_b),
430
        .lsu_op(lsu_op),
431
        .multicycle(multicycle),
432
        .spr_addrimm(spr_addrimm),
433
        .wbforw_valid(wbforw_valid),
434
        .sig_syscall(sig_syscall),
435
        .sig_trap(sig_trap),
436
        .force_dslot_fetch(force_dslot_fetch),
437
        .has_dslot(has_dslot),
438
        .id_macrc_op(id_macrc_op),
439
        .ex_macrc_op(ex_macrc_op),
440
        .rfe(rfe),
441
        .except_illegal(except_illegal)
442
);
443
 
444
//
445
// Instantiation of register file
446
//
447
or1200_rf or1200_rf(
448
        .clk(clk),
449
        .rst(rst),
450
        .supv(sr[`OR1200_SR_SUPV]),
451
        .wb_freeze(wb_freeze),
452
        .addrw(rf_addrw),
453
        .dataw(rf_dataw),
454
        .id_freeze(id_freeze),
455
        .we(rfwb_op[0]),
456
        .flushpipe(flushpipe),
457
        .addra(rf_addra),
458
        .rda(rf_rda),
459
        .dataa(rf_dataa),
460
        .addrb(rf_addrb),
461
        .rdb(rf_rdb),
462
        .datab(rf_datab),
463
        .spr_cs(spr_cs[`OR1200_SPR_GROUP_SYS]),
464
        .spr_write(spr_we),
465
        .spr_addr(spr_addr),
466
        .spr_dat_i(spr_dataout),
467
        .spr_dat_o(spr_dat_rf)
468
);
469
 
470
//
471
// Instantiation of operand muxes
472
//
473
or1200_operandmuxes or1200_operandmuxes(
474
        .clk(clk),
475
        .rst(rst),
476
        .id_freeze(id_freeze),
477
        .ex_freeze(ex_freeze),
478
        .rf_dataa(rf_dataa),
479
        .rf_datab(rf_datab),
480
        .ex_forw(rf_dataw),
481
        .wb_forw(wb_forw),
482
        .simm(simm),
483
        .sel_a(sel_a),
484
        .sel_b(sel_b),
485
        .operand_a(operand_a),
486
        .operand_b(operand_b),
487
        .muxed_b(muxed_b)
488
);
489
 
490
//
491
// Instantiation of CPU's ALU
492
//
493
or1200_alu or1200_alu(
494
        .a(operand_a),
495
        .b(operand_b),
496
        .mult_mac_result(mult_mac_result),
497
        .macrc_op(ex_macrc_op),
498
        .alu_op(alu_op),
499
        .shrot_op(shrot_op),
500
        .comp_op(comp_op),
501
        .result(alu_dataout),
502
        .flagforw(flagforw),
503
        .flag_we(flag_we)
504
);
505
 
506
//
507
// Instantiation of CPU's ALU
508
//
509
or1200_mult_mac or1200_mult_mac(
510
        .clk(clk),
511
        .rst(rst),
512
        .ex_freeze(ex_freeze),
513
        .id_macrc_op(id_macrc_op),
514
        .macrc_op(ex_macrc_op),
515
        .a(operand_a),
516
        .b(operand_b),
517
        .mac_op(mac_op),
518
        .alu_op(alu_op),
519
        .result(mult_mac_result),
520
        .mac_stall_r(mac_stall),
521
        .spr_cs(spr_cs[`OR1200_SPR_GROUP_MAC]),
522
        .spr_write(spr_we),
523
        .spr_addr(spr_addr),
524
        .spr_dat_i(spr_dataout),
525
        .spr_dat_o(spr_dat_mac)
526
);
527
 
528
//
529
// Instantiation of CPU's SPRS block
530
//
531
or1200_sprs or1200_sprs(
532
        .clk(clk),
533
        .rst(rst),
534
        .addrbase(operand_a),
535
        .addrofs(spr_addrimm),
536
        .dat_i(operand_b),
537
        .alu_op(alu_op),
538
        .flagforw(flagforw),
539
        .flag_we(flag_we),
540
        .flag(flag),
541
        .to_wbmux(sprs_dataout),
542
 
543
        .du_addr(du_addr),
544
        .du_dat_du(du_dat_du),
545
        .du_read(du_read),
546
        .du_write(du_write),
547
 
548
        .spr_addr(spr_addr),
549
        .spr_dat_pic(spr_dat_pic),
550
        .spr_dat_tt(spr_dat_tt),
551
        .spr_dat_pm(spr_dat_pm),
552
        .spr_dat_cfgr(spr_dat_cfgr),
553
        .spr_dat_rf(spr_dat_rf),
554
        .spr_dat_npc(spr_dat_npc),
555
        .spr_dat_ppc(spr_dat_ppc),
556
        .spr_dat_mac(spr_dat_mac),
557
        .spr_dat_dmmu(spr_dat_dmmu),
558
        .spr_dat_immu(spr_dat_immu),
559
        .spr_dat_du(spr_dat_du),
560
        .spr_dataout(spr_dataout),
561
        .spr_cs(spr_cs),
562
        .spr_we(spr_we),
563
 
564
        .epcr_we(epcr_we),
565
        .eear_we(eear_we),
566
        .esr_we(esr_we),
567
        .pc_we(pc_we),
568
        .epcr(epcr),
569
        .eear(eear),
570
        .esr(esr),
571
        .except_start(except_start),
572
        .except_started(except_started),
573
 
574
        .sr(sr),
575
        .branch_op(branch_op)
576
);
577
 
578
//
579
// Instantiation of load/store unit
580
//
581
or1200_lsu or1200_lsu(
582
        .clk(clk),
583
        .rst(rst),
584
        .addrbase(operand_a),
585
        .addrofs(lsu_addrofs),
586
        .lsu_op(lsu_op),
587
        .lsu_datain(operand_b),
588
        .lsu_dataout(lsu_dataout),
589
        .lsu_stall(lsu_stall),
590
        .lsu_unstall(lsu_unstall),
591
        .du_stall(du_stall),
592
        .except_align(except_align),
593
        .except_dtlbmiss(except_dtlbmiss),
594
        .except_dmmufault(except_dmmufault),
595
        .except_dbuserr(except_dbuserr),
596
 
597
        .dcpu_adr_o(dcpu_adr_o),
598
        .dcpu_cyc_o(dcpu_cyc_o),
599
        .dcpu_stb_o(dcpu_stb_o),
600
        .dcpu_we_o(dcpu_we_o),
601
        .dcpu_sel_o(dcpu_sel_o),
602
        .dcpu_tag_o(dcpu_tag_o),
603
        .dcpu_dat_o(dcpu_dat_o),
604
        .dcpu_dat_i(dcpu_dat_i),
605
        .dcpu_ack_i(dcpu_ack_i),
606
        .dcpu_rty_i(dcpu_rty_i),
607
        .dcpu_err_i(dcpu_err_i),
608
        .dcpu_tag_i(dcpu_tag_i)
609
);
610
 
611
//
612
// Instantiation of write-back muxes
613
//
614
or1200_wbmux or1200_wbmux(
615
        .clk(clk),
616
        .rst(rst),
617
        .wb_freeze(wb_freeze),
618
        .rfwb_op(rfwb_op),
619
        .muxin_a(alu_dataout),
620
        .muxin_b(lsu_dataout),
621
        .muxin_c(sprs_dataout),
622
        .muxin_d({lr_sav, 2'b0}),
623
        .muxout(rf_dataw),
624
        .muxreg(wb_forw),
625
        .muxreg_valid(wbforw_valid)
626
);
627
 
628
//
629
// Instantiation of freeze logic
630
//
631
or1200_freeze or1200_freeze(
632
        .clk(clk),
633
        .rst(rst),
634
        .multicycle(multicycle),
635
        .flushpipe(flushpipe),
636
        .extend_flush(extend_flush),
637
        .lsu_stall(lsu_stall),
638
        .if_stall(if_stall),
639
        .lsu_unstall(lsu_unstall),
640
        .force_dslot_fetch(force_dslot_fetch),
641
        .du_stall(du_stall),
642
        .mac_stall(mac_stall),
643
        .if_freeze(if_freeze),
644
        .id_freeze(id_freeze),
645
        .ex_freeze(ex_freeze),
646
        .wb_freeze(wb_freeze)
647
);
648
 
649
//
650
// Instantiation of exception block
651
//
652
or1200_except or1200_except(
653
        .clk(clk),
654
        .rst(rst),
655
        .sig_ibuserr(except_ibuserr),
656
        .sig_dbuserr(except_dbuserr),
657
        .sig_illegal(except_illegal),
658
        .sig_align(except_align),
659
        .sig_range(1'b0),
660
        .sig_dtlbmiss(except_dtlbmiss),
661
        .sig_dmmufault(except_dmmufault),
662
        .sig_inthigh(int_high),
663
        .sig_syscall(sig_syscall),
664
        .sig_trap(sig_trap),
665
        .sig_itlbmiss(except_itlbmiss),
666
        .sig_immufault(except_immufault),
667
        .sig_intlow(int_low),
668
        .branch_taken(branch_taken),
669
        .id_freeze(id_freeze),
670
        .ex_freeze(ex_freeze),
671
        .wb_freeze(wb_freeze),
672
        .if_stall(if_stall),
673
        .if_pc(if_pc),
674
        .lr_sav(lr_sav),
675
        .flushpipe(flushpipe),
676
        .extend_flush(extend_flush),
677
        .except_type(except_type),
678
        .except_start(except_start),
679
        .except_started(except_started),
680
        .except_stop(except_stop),
681
        .wb_pc(spr_dat_ppc),
682
        .ex_pc(spr_dat_npc),
683
 
684
        .datain(operand_b),
685
        .du_dsr(du_dsr),
686
        .epcr_we(epcr_we),
687
        .eear_we(eear_we),
688
        .esr_we(esr_we),
689
        .pc_we(pc_we),
690
        .epcr(epcr),
691
        .eear(eear),
692
        .esr(esr),
693
 
694
        .lsu_addr(dcpu_adr_o),
695
        .sr(sr)
696
);
697
 
698
//
699
// Instantiation of configuration registers
700
//
701
or1200_cfgr or1200_cfgr(
702
        .clk(clk),
703
        .rst(clk),
704
        .spr_addr(spr_addr),
705
        .spr_dat_o(spr_dat_cfgr)
706
);
707
 
708
endmodule

powered by: WebSVN 2.1.0

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