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

Subversion Repositories minimips_superscalar

[/] [minimips_superscalar/] [tags/] [P1/] [sources/] [pack_mips.vhd] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 mcafruni
------------------------------------------------------------------------------------
2
--                                                                                --
3
--    Copyright (c) 2004, Hangouet Samuel                                         --
4
--                  , Jan Sebastien                                               --
5
--                  , Mouton Louis-Marie                                          --
6
--                  , Schneider Olivier     all rights reserved                   --
7
--                                                                                --
8
--    This file is part of miniMIPS.                                              --
9
--                                                                                --
10
--    miniMIPS is free software; you can redistribute it and/or modify            --
11
--    it under the terms of the GNU General Public License as published by        --
12
--    the Free Software Foundation; either version 2 of the License, or           --
13
--    (at your option) any later version.                                         --
14
--                                                                                --
15
--    miniMIPS is distributed in the hope that it will be useful,                 --
16
--    but WITHOUT ANY WARRANTY; without even the implied warranty of              --
17
--    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               --
18
--    GNU General Public License for more details.                                --
19
--                                                                                --
20
--    You should have received a copy of the GNU General Public License           --
21
--    along with miniMIPS; if not, write to the Free Software                     --
22
--    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   --
23
--                                                                                --
24
------------------------------------------------------------------------------------
25
 
26
 
27
-- If you encountered any problem, please contact :
28
--
29
--   lmouton@enserg.fr
30
--   oschneid@enserg.fr
31
--   shangoue@enserg.fr
32
--
33
 
34
 
35
 
36
--------------------------------------------------------------------------
37
--                                                                      --
38
--                                                                      --
39
--     Processor miniMIPS : Enumerations and components declarations    --
40
--                                                                      --
41
--                                                                      --
42
--                                                                      --
43
-- Authors : Hangouet  Samuel                                           --
44
--           Jan       Sébastien                                        --
45
--           Mouton    Louis-Marie                                      --
46
--           Schneider Olivier                                          --
47
--                                                                      --
48
--                                                          june 2003   --
49
--------------------------------------------------------------------------
50
 
51
 
52
library ieee;
53
use ieee.std_logic_1164.all;
54
 
55
package pack_mips is
56
 
57
    -- Type signal on n bits
58
    subtype bus64 is std_logic_vector(63 downto 0);
59
    subtype bus33 is std_logic_vector(32 downto 0);
60
    subtype bus32 is std_logic_vector(31 downto 0);
61
    subtype bus31 is std_logic_vector(30 downto 0);
62
    subtype bus26 is std_logic_vector(25 downto 0);
63
    subtype bus24 is std_logic_vector(23 downto 0);
64
    subtype bus16 is std_logic_vector(15 downto 0);
65
    subtype bus8 is std_logic_vector(7 downto 0);
66
    subtype bus7 is std_logic_vector(6 downto 0);
67
    subtype bus6 is std_logic_vector(5 downto 0);
68
    subtype bus5 is std_logic_vector(4 downto 0);
69
    subtype bus4 is std_logic_vector(3 downto 0);
70
    subtype bus2 is std_logic_vector(1 downto 0);
71
    subtype bus1 is std_logic;
72
 
73
    -- Address of a register type
74
    subtype adr_reg_type is std_logic_vector(5 downto 0);
75
 
76
    -- Coding of the level of data availability for UR
77
    subtype level_type is std_logic_vector(2 downto 0);
78
    constant LVL_DI2  : level_type := "110";  -- Data available from the op2 of DI2 stage
79
    constant LVL_EX2  : level_type := "101";  -- Data available from the data_ual register of EX2 stage
80
    constant LVL_MEM2 : level_type := "100";  -- Data available from the data_ecr register of MEM2 stage
81
    constant LVL_DI   : level_type := "011";  -- Data available from the op2 of DI stage
82
    constant LVL_EX   : level_type := "010";  -- Data available from the data_ual register of EX stage
83
    constant LVL_MEM  : level_type := "001";  -- Data available from the data_ecr register of MEM stage
84
    constant LVL_REG  : level_type := "000";  -- Data available only in the register bank
85
 
86
    -- Different values of cause exceptions
87
    constant IT_NOEXC : bus32 := X"00000000";
88
    constant IT_ITMAT : bus32 := X"00000001";
89
    constant IT_OVERF : bus32 := X"00000002";
90
    constant IT_ERINS : bus32 := X"00000004";
91
    constant IT_BREAK : bus32 := X"00000008";
92
    constant IT_SCALL : bus32 := X"00000010";
93
 
94
 
95
    -- Operation type of the coprocessor system (only the low 16 bits are valid)
96
    constant SYS_NOP    : bus32 := X"0000_0000";
97
    constant SYS_MASK   : bus32 := X"0000_0001";
98
    constant SYS_UNMASK : bus32 := X"0000_0002";
99
    constant SYS_ITRET  : bus32 := X"0000_0004";
100
 
101
    -- Type for the alu control
102
    subtype alu_ctrl_type is std_logic_vector(27 downto 0);
103
 
104
    -- Arithmetical operations
105
    constant OP_ADD   : alu_ctrl_type := "1000000000000000000000000000"; -- op1 + op2 sign‰
106
    constant OP_ADDU  : alu_ctrl_type := "0100000000000000000000000000"; -- op1 + op2 non sign‰
107
    constant OP_SUB   : alu_ctrl_type := "0010000000000000000000000000"; -- op1 - op2 sign‰
108
    constant OP_SUBU  : alu_ctrl_type := "0001000000000000000000000000"; -- op1 - op2 non sign‰e
109
    -- Logical operations
110
    constant OP_AND   : alu_ctrl_type := "0000100000000000000000000000"; -- et logique
111
    constant OP_OR    : alu_ctrl_type := "0000010000000000000000000000"; -- ou logique
112
    constant OP_XOR   : alu_ctrl_type := "0000001000000000000000000000"; -- ou exclusif logique
113
    constant OP_NOR   : alu_ctrl_type := "0000000100000000000000000000"; -- non ou logique
114
    -- Tests : result to one if ok
115
    constant OP_SLT   : alu_ctrl_type := "0000000010000000000000000000"; -- op1 < op2 (sign‰)
116
    constant OP_SLTU  : alu_ctrl_type := "0000000001000000000000000000"; -- op1 < op2 (non sign‰)
117
    constant OP_EQU   : alu_ctrl_type := "0000000000100000000000000000"; -- op1 = op2
118
    constant OP_NEQU  : alu_ctrl_type := "0000000000010000000000000000"; -- op1 /= op2
119
    constant OP_SNEG  : alu_ctrl_type := "0000000000001000000000000000"; -- op1 < 0
120
    constant OP_SPOS  : alu_ctrl_type := "0000000000000100000000000000"; -- op1 > 0
121
    constant OP_LNEG  : alu_ctrl_type := "0000000000000010000000000000"; -- op1 <= 0
122
    constant OP_LPOS  : alu_ctrl_type := "0000000000000001000000000000"; -- op1 >= 0
123
    -- Multiplications
124
    constant OP_MULT  : alu_ctrl_type := "0000000000000000100000000000"; -- op1 * op2 sign‰ (chargement des poids faibles)
125
    constant OP_MULT2 : alu_ctrl_type := "0000000000000000000000000000"; -- op1 * op2 sign - MULT2 25.05.18 - Miguel
126
    constant OP_MULTU : alu_ctrl_type := "0000000000000000010000000000"; -- op1 * op2 non sign‰ (chargement des poids faibles)
127
    -- Shifts
128
    constant OP_SLL   : alu_ctrl_type := "0000000000000000001000000000"; -- decallage logique a gauche
129
    constant OP_SRL   : alu_ctrl_type := "0000000000000000000100000000"; -- decallage logique a droite
130
    constant OP_SRA   : alu_ctrl_type := "0000000000000000000010000000"; -- decallage arithmetique a droite
131
    constant OP_LUI   : alu_ctrl_type := "0000000000000000000001000000"; -- met en poids fort la valeur immediate
132
    -- Access to internal registers
133
    constant OP_MFHI  : alu_ctrl_type := "0000000000000000000000100000"; -- lecture des poids forts
134
    constant OP_MFLO  : alu_ctrl_type := "0000000000000000000000010000"; -- lecture des poids faibles
135
    constant OP_MTHI  : alu_ctrl_type := "0000000000000000000000001000"; -- ecriture des poids forts
136
    constant OP_MTLO  : alu_ctrl_type := "0000000000000000000000000100"; -- ecriture des poids faibles
137
    -- Operations which do nothing but are useful
138
    constant OP_OUI   : alu_ctrl_type := "0000000000000000000000000010"; -- met a 1 le bit de poids faible en sortie
139
    constant OP_OP2   : alu_ctrl_type := "0000000000000000000000000001"; -- recopie l'operande 2 en sortie
140
 
141
 
142
 
143
    -- Starting boot address (after reset)
144
    constant ADR_INIT : bus32 := X"00000000";
145
    constant ADR_INIT4 : bus32 := X"00000004";
146
    constant INS_NOP : bus32 := X"00000000";
147
 
148
 
149
    -- Internal component of the pipeline stage
150
 
151
    component alu
152
    port (
153
        clock : in bus1;
154
        reset : in bus1;
155
        op1 : in bus32;
156
        op2 : in bus32;
157
        ctrl : in alu_ctrl_type;
158
        hilo_p2 : in bus64;
159
        hilo_p1p2 : out bus64;
160
        res : out bus32;
161
        overflow : out bus1
162
    );
163
    end component;
164
 
165
    component alu2
166
    port (
167
        clock : in bus1;
168
        reset : in bus1;
169
        op1 : in bus32;
170
        op2 : in bus32;
171
        ctrl : in alu_ctrl_type;
172
        hilo_p1 : in bus64;
173
        hilo_p2p1 : out bus64;
174
        res : out bus32;
175
        overflow : out bus1
176
    );
177
    end component;
178
 
179
    -- Pipeline stage components
180
 
181
    component pps_pf
182
    port (
183
        clock    : in bus1;
184
        clock2    : in bus1;
185
        reset    : in bus1;
186
        stop_all : in bus1;
187
        stop_all2: in bus1;
188
 
189
        bra_cmd : in bus1;
190
        bra_adr  : in bus32;
191
        exch_cmd : in bus1;
192
        exch_adr : in bus32;
193
 
194
        bra_cmd2 : in bus1;
195
        bra_adr2  : in bus32;
196
        exch_cmd2 : in bus1;
197
        exch_adr2 : in bus32;
198
 
199
        stop_pf  : in bus1;
200
        stop_pf2  : in bus1;
201
        PF_pc    : out bus32;
202
        PF_pc_4  : out bus32
203
    );
204
    end component;
205
 
206
    component clock_gate
207
    port (
208
        clock_in1   : in bus1;
209
        clock_in2   : in bus1;
210
        clock_out1  : out bus1;
211
        clock_out2  : out bus1;
212
        gate1       : in bus1;
213
        gate2       : in bus1
214
    );
215
    end component;
216
 
217
    component delay_gate
218
    port (
219
        clock : in bus1;
220
        in1   : in bus1;
221
        in2   : in bus1;
222
        in3   : in bus1;
223
        in4   : in bus1;
224
        in5   : in bus1;
225
        in6   : in bus1;
226
        in7   : in bus1;
227
        in8   : in bus1;
228
        in9   : in bus1;
229
        in10  : in bus1;
230
        in11  : in bus1;
231
        in12  : in bus1;
232
        out1  : out bus1;
233
        out2  : out bus1;
234
        out3  : out bus1;
235
        out4  : out bus1;
236
        out5  : out bus1;
237
        out6  : out bus1;
238
        out7  : out bus1;
239
        out8  : out bus1;
240
        out9  : out bus1;
241
        out10 : out bus1;
242
        out11 : out bus1;
243
        out12 : out bus1
244
    );
245
    end component;
246
 
247
    component pps_ei
248
    port (
249
        clock : in bus1;
250
        reset : in bus1;
251
        clear  : in bus1;
252
        stop_all : in bus1;
253
 
254
        stop_ei : in bus1;
255
        genop : in bus1;
256
 
257
        CTE_instr : in bus32;
258
        ETC_adr : out bus32;
259
 
260
        PF_pc : in bus32;
261
 
262
        EI_instr : out bus32;
263
        EI_adr : out bus32;
264
        EI_it_ok : out bus1
265
    );
266
    end component;
267
 
268
        component pps_ei_2
269
        port (
270
          clock : in bus1;
271
          reset : in bus1;
272
          clear : in bus1;
273
          stop_all2 : in bus1;
274
 
275
          stop_ei : in bus1;
276
          genop : in bus1;
277
 
278
          CTE_instr : in bus32;
279
          ETC_adr : out bus32;
280
 
281
          PF_pc : in bus32;
282
 
283
          EI_instr : out bus32;
284
          EI_adr : out bus32;
285
          EI_it_ok : out bus1
286
        );
287
        end component;
288
 
289
    component pps_di
290
    port (
291
        clock : in bus1;
292
        reset : in bus1;
293
        stop_all : in bus1;
294
        clear : in bus1;
295
 
296
        bra_detect : out bus1;
297
 
298
        adr_reg1 : out adr_reg_type;
299
        adr_reg2 : out adr_reg_type;
300
        use1 : out bus1;
301
        use2 : out bus1;
302
        iload : out bus1;
303
        istore : out bus1;
304
        stop_di : in bus1;
305
        data1 : in bus32;
306
        data2 : in bus32;
307
 
308
        EI_adr : in bus32;
309
        EI_instr : in bus32;
310
        EI_it_ok : in bus1;
311
 
312
        DI_bra : out bus1;
313
        DI_link : out bus1;
314
        DI_op1 : out bus32;
315
        DI_op2 : out bus32;
316
        DI_code_ual : out alu_ctrl_type;
317
        DI_offset : out bus32;
318
        DI_adr_reg_dest : out adr_reg_type;
319
        DI_ecr_reg : out bus1;
320
        DI_mode : out bus1;
321
        DI_op_mem : out bus1;
322
        DI_r_w : out bus1;
323
        DI_adr : out bus32;
324
        DI_exc_cause : out bus32;
325
        DI_level : out level_type;
326
        DI_it_ok : out bus1;
327
        DI_SRC1 : out adr_reg_type;
328
        DI_SRC2 : out adr_reg_type
329
    );
330
    end component;
331
 
332
component pps_di_2
333
port (
334
    clock : in bus1;
335
    reset : in bus1;
336
    stop_all2 : in bus1;
337
    clear : in bus1;
338
 
339
    bra_detect : out bus1;
340
 
341
    adr_reg1 : out adr_reg_type;
342
    adr_reg2 : out adr_reg_type;
343
    use1 : out bus1;
344
    use2 : out bus1;
345
    iload2 : out bus1;
346
    istore2 : out bus1;
347
    stop_di : in bus1;
348
    data1 : in bus32;
349
    data2 : in bus32;
350
 
351
    EI_adr : in bus32;
352
    EI_instr : in bus32;
353
    EI_it_ok : in bus1;
354
 
355
    DI_bra : out bus1;
356
    DI_link : out bus1;
357
    DI_op1 : out bus32;
358
    DI_op2 : out bus32;
359
    DI_code_ual : out alu_ctrl_type;
360
    DI_offset : out bus32;
361
    DI_adr_reg_dest : out adr_reg_type;
362
    DI_ecr_reg : out bus1;
363
    DI_mode : out bus1;
364
    DI_op_mem : out bus1;
365
    DI_r_w : out bus1;
366
    DI_adr : out bus32;
367
    DI_exc_cause : out bus32;
368
    DI_level : out level_type;
369
    DI_it_ok : out bus1;
370
    DI2_SRC3 : out adr_reg_type;
371
    DI2_SRC4 : out adr_reg_type
372
);
373
end component;
374
 
375
    component pps_ex
376
    port (
377
        clock : in bus1;
378
        clock2 : in bus1;
379
        reset : in bus1;
380
        stop_all : in bus1;
381
        stop_all2 : in bus1;
382
        clear : in bus1;
383
 
384
        DI_bra : in bus1;
385
        DI_link : in bus1;
386
        DI_op1 : in bus32;
387
        DI_op2 : in bus32;
388
        DI_code_ual : in alu_ctrl_type;
389
        DI_offset : in bus32;
390
        DI_adr_reg_dest : in adr_reg_type;
391
        DI_ecr_reg : in bus1;
392
        DI_mode : in bus1;
393
        DI_op_mem : in bus1;
394
        DI_r_w : in bus1;
395
        DI_adr : in bus32;
396
        DI_exc_cause : in bus32;
397
        DI_level : in level_type;
398
        DI_it_ok : in bus1;
399
 
400
        EX2_data_hilo : in bus64;--resultado da multiplicacao do pieline2
401
        EX_data_hilo : out bus64;
402
        EX_adr : out bus32;
403
        EX_bra_confirm : out bus1;
404
        EX_data_ual : out bus32;
405
        EX_adresse : out bus32;
406
        EX_adresse_p1p2 : out bus32;-- 12-08-2018
407
        EX_adr_reg_dest : out adr_reg_type;
408
        EX_ecr_reg : out bus1;
409
        EX_op_mem : out bus1;
410
        EX_r_w : out bus1;
411
        EX_exc_cause : out bus32;
412
        EX_level : out level_type;
413
        EX_it_ok : out bus1
414
    );
415
    end component;
416
 
417
component pps_ex_2
418
port(
419
    clock : in bus1;
420
    clock2 : in bus1;
421
    reset : in bus1;
422
    stop_all : in bus1;
423
    stop_all2 : in bus1;            -- Unconditionnal locking of outputs
424
    clear : in bus1;               -- Clear the pipeline stage
425
 
426
    -- Datas from DI stage
427
    DI_bra : in bus1;              -- Branch instruction
428
    DI_link : in bus1;             -- Branch with link
429
    DI_op1 : in bus32;                  -- Operand 1 for alu
430
    DI_op2 : in bus32;                  -- Operand 2 for alu
431
    DI_code_ual : in alu_ctrl_type;     -- Alu operation
432
    DI_offset : in bus32;               -- Offset for address calculation
433
    DI_adr_reg_dest : in adr_reg_type;  -- Destination register address for the result
434
    DI_ecr_reg : in bus1;          -- Effective writing of the result
435
    DI_mode : in bus1;             -- Address mode (relative to pc ou index by a register)
436
    DI_op_mem : in bus1;           -- Memory operation
437
    DI_r_w : in bus1;              -- Type of memory operation (read or write)
438
    DI_adr : in bus32;                  -- Instruction address
439
    DI_exc_cause : in bus32;            -- Potential cause exception
440
    DI_level : in level_type;           -- Availability stage of the result for bypassing
441
    DI_it_ok : in bus1;            -- Allow hardware interruptions
442
 
443
    EX_data_hilo : in bus64;--resultado da multiplicacao do pieline 1
444
    EX2_data_hilo : out bus64;
445
    -- Synchronous outputs to MEM stage
446
    EX_adr : out bus32;                 -- Instruction address
447
    EX_bra_confirm : out bus1;     -- Branch execution confirmation
448
    EX_data_ual : out bus32;            -- Ual result
449
    EX_adresse : out bus32;             -- Address calculation result
450
    EX_adresse_p2p1 : out bus32;-- 12-08-2018
451
    EX_adr_reg_dest : out adr_reg_type; -- Destination register for the result
452
    EX_ecr_reg : out bus1;         -- Effective writing of the result
453
    EX_op_mem : out bus1;          -- Memory operation needed
454
    EX_r_w : out bus1;             -- Type of memory operation (read or write)
455
    EX_exc_cause : out bus32;           -- Potential cause exception
456
    EX_level : out level_type;          -- Availability stage of result for bypassing
457
    EX_it_ok : out bus1            -- Allow hardware interruptions
458
);
459
end component;
460
 
461
    component pps_mem
462
    port (
463
        clock : in bus1;
464
        clock2    : in bus1;
465
        reset : in bus1;
466
        stop_all : in bus1;
467
        stop_all2 : in bus1;
468
 
469
        clear : in bus1;
470
 
471
        MTC_data : out bus32;
472
        MTC_adr : out bus32;
473
        MTC_r_w : out bus1;
474
        MTC_req : out bus1;
475
        CTM_data : in bus32;
476
 
477
        EX_adr : in bus32;
478
        EX_data_ual : in bus32;
479
        EX_adresse : in bus32;
480
        EX_adresse_p1p2 : in bus32;-- 12-08-2018
481
        EX_bra_confirm : in bus1;-- Confirmacao do branch no pipe 1 (26-07-18)
482
        EX_adr_reg_dest : in adr_reg_type;
483
        EX_ecr_reg : in bus1;
484
        EX_op_mem : in bus1;
485
        EX_r_w : in bus1;
486
        EX_exc_cause : in bus32;
487
        EX_level : in level_type;
488
        EX_it_ok : in bus1;
489
 
490
        MEM_adr : out bus32;
491
        MEM_adr_reg_dest : out adr_reg_type;
492
        MEM_ecr_reg : out bus1;
493
        MEM_data_ecr : out bus32;
494
        MEM_exc_cause : out bus32;
495
        MEM_level : out level_type;
496
        MEM_it_ok : out bus1;
497
 
498
        -- duplicacao
499
        MTC_data2 : out bus32;
500
        MTC_adr2 : out bus32;
501
        MTC_r_w2 : out bus1;
502
        MTC_req2 : out bus1;
503
        CTM_data2 : in bus32;
504
 
505
        EX_adr2 : in bus32;
506
        EX_data_ual2 : in bus32;
507
        EX_adresse2 : in bus32;
508
        EX_adresse_p2p1 : in bus32;-- 12-08-2018
509
        EX_bra_confirm2 : in bus1;-- Confirmacao do branch no pipe 2 (26-07-18)
510
        EX_adr_reg_dest2 : in adr_reg_type;
511
        EX_ecr_reg2 : in bus1;
512
        EX_op_mem2 : in bus1;
513
        EX_r_w2 : in bus1;
514
        EX_exc_cause2 : in bus32;
515
        EX_level2 : in level_type;
516
        EX_it_ok2 : in bus1;
517
 
518
        MEM_adr2 : out bus32;
519
        MEM_adr_reg_dest2 : out adr_reg_type;
520
        MEM_ecr_reg2 : out bus1;
521
        MEM_data_ecr2 : out bus32;
522
        MEM_exc_cause2 : out bus32;
523
        MEM_level2 : out level_type;
524
        MEM_it_ok2 : out bus1
525
    );
526
    end component;
527
 
528
 
529
    component renvoi
530
    port (
531
        adr1 : in adr_reg_type;
532
        adr2 : in adr_reg_type;
533
        use1 : in bus1;
534
        use2 : in bus1;
535
 
536
        data1 : out bus32;
537
        data2 : out bus32;
538
        alea : out bus1;
539
 
540
        DI_level : in level_type;
541
        DI_adr : in adr_reg_type;
542
        DI_ecr : in bus1;
543
        DI_data : in bus32;
544
 
545
        EX_level : in level_type;
546
        EX_adr : in adr_reg_type;
547
        EX_ecr : in bus1;
548
        EX_data : in bus32;
549
 
550
        MEM_level : in level_type;
551
        MEM_adr : in adr_reg_type;
552
        MEM_ecr : in bus1;
553
        MEM_data : in bus32;
554
 
555
        interrupt : in bus1;
556
 
557
        write_data : out bus32;
558
        write_adr : out bus5;
559
        write_GPR : out bus1;
560
        write_SCP : out bus1;
561
 
562
        read_adr1 : out bus5;
563
        read_adr2 : out bus5;
564
        read_data1_GPR : in bus32;
565
        read_data1_SCP : in bus32;
566
        read_data2_GPR : in bus32;
567
        read_data2_SCP : in bus32;
568
 
569
                  --duplicacao
570
        adr3 : in adr_reg_type;
571
        adr4 : in adr_reg_type;
572
        use12 : in bus1;
573
        use22 : in bus1;
574
 
575
        data3 : out bus32;
576
        data4 : out bus32;
577
        alea2 : out bus1;
578
 
579
        DI_level2 : in level_type;
580
        DI_adr2 : in adr_reg_type;
581
        DI_ecr2 : in bus1;
582
        DI_data2 : in bus32;
583
 
584
        EX_level2 : in level_type;
585
        EX_adr2 : in adr_reg_type;
586
        EX_ecr2 : in bus1;
587
        EX_data2 : in bus32;
588
 
589
        MEM_level2 : in level_type;
590
        MEM_adr2 : in adr_reg_type;
591
        MEM_ecr2 : in bus1;
592
        MEM_data2 : in bus32;
593
 
594
        write_data2 : out bus32;
595
        write_adr2 : out bus5;
596
        write_GPR2 : out bus1;
597
        write_SCP2 : out bus1;
598
 
599
        read_adr3 : out bus5;
600
        read_adr4 : out bus5;
601
        read_data3_GPR : in bus32;
602
        read_data3_SCP : in bus32;
603
        read_data4_GPR : in bus32;
604
        read_data4_SCP : in bus32
605
    );
606
    end component;
607
 
608
 
609
    component banc
610
    port (
611
        clock : in bus1;
612
        clock2    : in bus1;
613
        reset : bus1;
614
 
615
        reg_src1 : in bus5;
616
        reg_src2 : in bus5;
617
 
618
        reg_dest : in bus5;
619
        donnee   : in bus32;
620
 
621
        cmd_ecr  : in bus1;
622
 
623
        data_src1 : out bus32;
624
        data_src2 : out bus32;
625
 
626
        reg_src3 : in bus5;
627
        reg_src4 : in bus5;
628
 
629
        reg_dest2 : in bus5;
630
        donnee2   : in bus32;
631
 
632
        cmd_ecr2  : in bus1;
633
 
634
        data_src3 : out bus32;
635
        data_src4 : out bus32
636
    );
637
    end component;
638
 
639
 
640
    component bus_ctrl01
641
    port
642
    (
643
        clock : bus1;
644
        reset : bus1;
645
 
646
        interrupt      : in std_logic;
647
 
648
        adr_from_ei    : in bus32;
649
        instr_to_ei    : out bus32;
650
        req_from_mem   : in bus1;
651
        r_w_from_mem   : in bus1;
652
        adr_from_mem   : in bus32;
653
        data_from_mem  : in bus32;
654
        data_to_mem    : out bus32;
655
 
656
        req_to_ram     : out std_logic;
657
        adr_to_ram     : out bus32;
658
        r_w_to_ram     : out bus1;
659
        ack_from_ram   : in bus1;
660
        data_inout_ram : inout bus32;
661
 
662
        stop_all       : out bus1
663
    );
664
    end component;
665
 
666
    component bus_ctrl02
667
    port
668
    (
669
        clock : bus1;
670
        reset : bus1;
671
 
672
        interrupt      : in std_logic;
673
 
674
        adr_from_ei    : in bus32;
675
        instr_to_ei    : out bus32;
676
        req_from_mem   : in bus1;
677
        r_w_from_mem   : in bus1;
678
        adr_from_mem   : in bus32;
679
        data_from_mem  : in bus32;
680
        data_to_mem    : out bus32;
681
 
682
        req_to_ram     : out std_logic;
683
        adr_to_ram     : out bus32;
684
        r_w_to_ram     : out bus1;
685
        ack_from_ram   : in bus1;
686
        data_inout_ram : inout bus32;
687
 
688
        stop_all       : out bus1
689
    );
690
    end component;
691
 
692
    component syscop
693
    port
694
    (
695
        clock         : in bus1;
696
        clock2        : in bus1;
697
        reset         : in bus1;
698
 
699
        MEM_adr       : in bus32;
700
        MEM_exc_cause : in bus32;
701
        MEM_it_ok     : in bus1;
702
 
703
        it_mat        : in bus1;
704
 
705
        interrupt     : out bus1;
706
        vecteur_it    : out bus32;
707
 
708
        write_data    : in bus32;
709
        write_adr     : in bus5;
710
        write_SCP     : in bus1;
711
 
712
        read_adr1     : in bus5;
713
        read_adr2     : in bus5;
714
        read_data1    : out bus32;
715
        read_data2    : out bus32;
716
--mod
717
        MEM_adr2       : in bus32;
718
        MEM_exc_cause2 : in bus32;
719
        MEM_it_ok2     : in bus1;
720
 
721
        it_mat2        : in bus1;
722
 
723
        interrupt2     : out bus1;
724
        vecteur_it2    : out bus32;
725
 
726
        write_data2    : in bus32;
727
        write_adr2     : in bus5;
728
        write_SCP2     : in bus1;
729
 
730
        read_adr3     : in bus5;
731
        read_adr4     : in bus5;
732
        read_data3    : out bus32;
733
        read_data4    : out bus32
734
    );
735
    end component;
736
 
737
 
738
    component minimips
739
    port (
740
        clock    : in bus1;
741
        clock2    : in bus1;
742
        reset    : in bus1;
743
 
744
        ram_req  : out bus1;
745
        ram_adr  : out bus32;
746
        ram_r_w  : out bus1;
747
        ram_data : inout bus32;
748
        ram_ack  : in bus1;
749
 
750
        ram_req2  : out bus1;
751
        ram_adr2  : out bus32;
752
        ram_r_w2  : out bus1;
753
        ram_data2 : inout bus32;
754
        ram_ack2  : in bus1;
755
 
756
        it_mat   : in bus1
757
    );
758
    end component;
759
 
760
end pack_mips;

powered by: WebSVN 2.1.0

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