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

Subversion Repositories tinyvliw8

[/] [tinyvliw8/] [trunk/] [src/] [vhdl/] [proc/] [vliwProc.vhd] - Blame information for rev 4

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

Line No. Rev Author Line
1 2 steckol
-----------------------------------------------------------------
2
--
3
-- Design:  tinyVLIW8 soft-core processor
4
-- Author:  Oliver Stecklina <stecklina@ihp-microelectronics.com>
5
-- Date:    24.10.2013 
6
-- File:    vliwProc.vhd
7
--
8
-----------------------------------------------------------------
9
--
10
-- Description : This unit is the VLIW processor core.
11
--
12
-----------------------------------------------------------------
13
--
14
--    Copyright (C) 2015 IHP GmbH, Frankfurt (Oder), Germany
15
--
16
-- This code is free software. It is licensed under the EUPL, Version 1.1
17
-- or - as soon they will be approved by the European Commission - subsequent
18
-- versions of the EUPL (the "License").
19
-- You may redistribute this code and/or modify it under the terms of this
20
-- License.
21
-- You may not use this work except in compliance with the License.
22
-- You may obtain a copy of the License at:
23
--
24
-- http://joinup.ec.europa.eu/software/page/eupl/licence-eupl
25
--
26
-- Unless required by applicable law or agreed to in writing, software
27
-- distributed under the License is distributed on an "AS IS" basis,
28
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
-- See the License for the specific language governing permissions and
30
-- limitations under the License.
31
--
32
-----------------------------------------------------------------
33
 
34
library ieee;
35
 
36
use ieee.std_logic_1164.all;
37
use ieee.std_logic_arith.all;
38
 
39
entity vliwProc is
40
        port (
41
                -- clock input
42
                clk           : in std_logic;
43
 
44
                -- instruction bus
45
                instMemAddr   : out std_logic_vector(10 downto 0);
46
                instMemDataIn : in  std_logic_vector(31 downto 0);
47
                instMemEn_n   : out std_logic;
48
 
49
                -- IO bus
50
                ioMemAddr    : out std_logic_vector(7 downto 0);
51
                ioMemDataOut : out std_logic_vector(7 downto 0);
52
                ioMemDataIn  : in  std_logic_vector(7 downto 0);
53
                ioMemWr_n    : out std_logic;
54
                ioMemEn_n    : out std_logic;
55
 
56
                -- IO bus
57
                dataMemAddr    : out std_logic_vector(7 downto 0);
58
                dataMemDataOut : out std_logic_vector(7 downto 0);
59
                dataMemDataIn  : in  std_logic_vector(7 downto 0);
60
                dataMemWr_n    : out std_logic;
61
                dataMemEn_n    : out std_logic;
62
 
63
                -- interrupt handling
64
                irqLine        : in  std_logic_vector(4 downto 0);
65
                irqLineAck     : out std_logic_vector(4 downto 0);
66
                -- irqEn          : out std_logic;
67
 
68
                -- process stall signals and stall acknowledgment
69
                stall_n      : in std_logic;
70
                stalled_n    : out std_logic;
71
 
72
                -- reset input
73
                rst_n        : in std_logic
74
        );
75
end vliwProc;
76
 
77
architecture behavior of vliwProc is
78
 
79
component vliwProc_instDecoder
80
        port (
81
                clk       : in std_logic;
82
 
83
                instData  : in  std_logic_vector(31 downto 0);
84
 
85
                ldstOpCode : out std_logic;
86
                ldstAs     : out std_logic_vector(1 downto 0);
87
                ldstDstReg : out std_logic_vector(2 downto 0);
88
                ldstSrc    : out std_logic_vector(7 downto 0);
89
                ldstEn_n   : out std_logic;
90
 
91
                aluOpCode  : out std_logic_vector(2 downto 0);
92
                aluAs      : out std_logic_vector(1 downto 0);
93
                aluDstReg  : out std_logic_vector(2 downto 0);
94
                aluSrc     : out std_logic_vector(7 downto 0);
95
                aluEn_n    : out std_logic;
96
 
97
                jmpAs      : out std_logic_vector(1 downto 0);
98
                jmpDstReg  : out std_logic_vector(10 downto 0);
99
                jmpEn_n    : out std_logic;
100
 
101
                esb       : out std_logic_vector(3 downto 0);
102
 
103
                stall_n   : in std_logic;
104
                stalled_n : out std_logic;
105
 
106
                rst_n     : in std_logic
107
        );
108
end component;
109
 
110
component vliwProc_statusReg
111
        port (
112
                state      : in std_logic_vector(3 downto 0);
113
 
114
                iretEn_n   : in std_logic;
115
                ioEn_n     : in std_logic;
116
                irqEn      : in std_logic;
117
                flagsEn_n  : in std_logic;
118
 
119
                flagsIn    : in std_logic_vector(1 downto 0);       -- carry | zero
120
 
121
                dataIn     : in  std_logic_vector(7 downto 0);
122
                dataOut    : out std_logic_vector(7 downto 0);
123
 
124
                rst_n      : in std_logic
125
        );
126
end component;
127
 
128
component vliwProc_pcReg
129
        port (
130
           addrOut    : out std_logic_vector(10 downto 0);
131
 
132
                state      : in std_logic_vector(3 downto 0);
133
                stalled_n  : in std_logic;
134
 
135
                ioAddr     : in std_logic_vector(1 downto 0);
136
 
137
                ioIn       : in std_logic_vector(7 downto 0);
138
                ioOut      : out std_logic_vector(7 downto 0);
139
                ioInEn_n   : in std_logic;
140
                ioInWr_n   : in std_logic;
141
 
142
                pcLoad_n   : out std_logic;
143
 
144
                jmpIn      : in std_logic_vector(10 downto 0);
145
                jmpInEn_n  : in std_logic;
146
 
147
                irq        : in std_logic;
148
                irqAddr    : in std_logic_vector(1 downto 0);
149
 
150
                rst_n      : in std_logic
151
        );
152
end component;
153
 
154
component vliwProc_regSet
155
        port (
156
                state  : in std_logic_vector(3 downto 0);
157
 
158
                reg0   : out std_logic_vector(7 downto 0);
159
                reg1   : out std_logic_vector(7 downto 0);
160
                reg2   : out std_logic_vector(7 downto 0);
161
                reg3   : out std_logic_vector(7 downto 0);
162
                reg4   : out std_logic_vector(7 downto 0);
163
                reg5   : out std_logic_vector(7 downto 0);
164
                reg6   : out std_logic_vector(7 downto 0);
165
                reg7   : out std_logic_vector(7 downto 0);
166
 
167
                irqEn  : in std_logic;
168
 
169
                aluDataIn  : in std_logic_vector(7 downto 0);
170
                aluRegSel  : in std_logic_vector(2 downto 0);
171
                aluRegEn_n : in std_logic;
172
 
173
                ldstDataIn  : in std_logic_vector(7 downto 0);
174
                ldstRegSel  : in std_logic_vector(2 downto 0);
175
                ldstRegEn_n : in std_logic;
176
 
177
                rst_n  : in std_logic
178
        );
179
end component;
180
 
181
component vliwProc_loadStore
182
        port (
183
                addr     : out std_logic_vector(7 downto 0);
184
                dataOut  : out std_logic_vector(7 downto 0);
185
 
186
                ioWr_n   : out std_logic;
187
                ioEn_n   : out std_logic;
188
                dataWr_n : out std_logic;
189
                dataEn_n : out std_logic;
190
 
191
                dataIn   : in std_logic_vector(7 downto 0);
192
                ioIn     : in std_logic_vector(7 downto 0);
193
 
194
                opCode   : in std_logic;
195
                as       : in std_logic_vector(1 downto 0);
196
                dstReg   : in std_logic_vector(2 downto 0);
197
                src      : in std_logic_vector(7 downto 0);
198
                cs_n     : in std_logic;
199
 
200
                state    : in std_logic_vector(3 downto 0);
201
 
202
                regOut  : out std_logic_vector(7 downto 0);
203
 
204
                reg0     : in std_logic_vector(7 downto 0);
205
                reg1     : in std_logic_vector(7 downto 0);
206
                reg2     : in std_logic_vector(7 downto 0);
207
                reg3     : in std_logic_vector(7 downto 0);
208
                reg4     : in std_logic_vector(7 downto 0);
209
                reg5     : in std_logic_vector(7 downto 0);
210
                reg6     : in std_logic_vector(7 downto 0);
211
                reg7     : in std_logic_vector(7 downto 0);
212
 
213
                regSel   : out std_logic_vector(2 downto 0);
214
                regEn_n  : out std_logic;
215
 
216
                rst_n    : in std_logic
217
        );
218
end component;
219
 
220
component vliwProc_jmpExec
221
        port (
222
                en_n      : in std_logic;
223
 
224
                esb       : in std_logic_vector(3 downto 0);
225
 
226
                dst       : in std_logic_vector(10 downto 0);
227
                as        : in std_logic_vector(1 downto 0);
228
 
229
                jmpDst    : out std_logic_vector(10 downto 0);
230
                jmpEn_n   : out std_logic;
231
 
232
                cz        : in std_logic_vector(1 downto 0);
233
 
234
                rst_n     : in std_logic
235
        );
236
end component;
237
 
238
component vliwProc_alu
239
        port (
240
                state      : in std_logic_vector(3 downto 0);
241
 
242
                enable_n   : in std_logic;
243
 
244
                opcode     : in std_logic_vector(2 downto 0);
245
                as         : in std_logic_vector(1 downto 0);
246
                dstRegIn   : in std_logic_vector(2 downto 0);
247
                dataIn     : in std_logic_vector(7 downto 0);
248
 
249
                reg0       : in std_logic_vector(7 downto 0);
250
                reg1       : in std_logic_vector(7 downto 0);
251
                reg2       : in std_logic_vector(7 downto 0);
252
                reg3       : in std_logic_vector(7 downto 0);
253
                reg4       : in std_logic_vector(7 downto 0);
254
                reg5       : in std_logic_vector(7 downto 0);
255
                reg6       : in std_logic_vector(7 downto 0);
256
                reg7       : in std_logic_vector(7 downto 0);
257
 
258
                cIn        : in  std_logic;
259
                cOut       : out std_logic;
260
                zOut       : out std_logic;
261
 
262
                dstRegEn_n : out std_logic;
263
                dstRegOut  : out std_logic_vector(2 downto 0);
264
                dataOut    : out std_logic_vector(7 downto 0);
265
 
266
                rst_n      : in  std_logic
267
        );
268
end component;
269
 
270
component vliwProc_irqCntl
271
        port (
272
                state      : in std_logic_vector(3 downto 0);
273
                stalled_n  : in std_logic;
274
 
275
                irqLineIn  : in  std_logic_vector(5 downto 0);
276
                irqLineOut : out std_logic_vector(5 downto 0);
277
                irqAck     : out std_logic;
278
 
279
                irqAddr    : out std_logic_vector(1 downto 0);
280
 
281
                ioDataIn   : in std_logic_vector(7 downto 0);
282
                ioDataOut  : out std_logic_vector(7 downto 0);
283
                ioInEn_n   : in std_logic;
284
                ioInWr_n   : in std_logic;
285
 
286
                enable     : in std_logic;
287
 
288
                -- reset input
289
                rst_n      : in std_logic
290
        );
291
end component;
292
 
293
        signal rst_n_s       : std_logic;
294
 
295
        signal stall_n_s     : std_logic;
296
        signal stalled_n_s   : std_logic;
297
 
298
        signal instAddr_s       : std_logic_vector(10 downto 0);
299
        signal instDataIn_s     : std_logic_vector(31 downto 0);
300
        signal pcReg_ioOut_s    : std_logic_vector(7 downto 0);
301
        signal pcReg_ioInEn_n_s : std_logic;
302
        signal pcReg_ioInWr_n_s : std_logic;
303
 
304
        signal dataAddr_s    : std_logic_vector(7 downto 0);
305
 
306
        signal ioDataIn_s    : std_logic_vector(7 downto 0);
307
        signal ioWr_n_s      : std_logic;
308
        signal ioEn_n_s      : std_logic;
309
 
310
        signal dataOut_s     : std_logic_vector(7 downto 0);
311
        signal dataIn_s      : std_logic_vector(7 downto 0);
312
        signal dataWr_n_s    : std_logic;
313
        signal dataEn_n_s    : std_logic;
314
 
315
        signal ldstOpCode_s : std_logic;
316
        signal ldstAs_s     : std_logic_vector(1 downto 0);
317
        signal ldstDstReg_s : std_logic_vector(2 downto 0);
318
        signal ldstSrc_s    : std_logic_vector(7 downto 0);
319
        signal ldstEn_n_s   : std_logic;
320
 
321
        signal aluOpCode_s  : std_logic_vector(2 downto 0);
322
        signal aluAs_s      : std_logic_vector(1 downto 0);
323
        signal aluDstReg_s  : std_logic_vector(2 downto 0);
324
        signal aluSrc_s     : std_logic_vector(7 downto 0);
325
        signal aluEn_n_s    : std_logic;
326
 
327
        signal jmpAs_s      : std_logic_vector(1 downto 0);
328
        signal jmpDstReg_s  : std_logic_vector(10 downto 0);
329
        signal jmpEn_n_s    : std_logic;
330
 
331
        signal state_s     : std_logic_vector(3 downto 0);
332
 
333
        signal reg0_s        : std_logic_vector(7 downto 0);
334
        signal reg1_s        : std_logic_vector(7 downto 0);
335
        signal reg2_s        : std_logic_vector(7 downto 0);
336
        signal reg3_s        : std_logic_vector(7 downto 0);
337
        signal reg4_s        : std_logic_vector(7 downto 0);
338
        signal reg5_s        : std_logic_vector(7 downto 0);
339
        signal reg6_s        : std_logic_vector(7 downto 0);
340
        signal reg7_s        : std_logic_vector(7 downto 0);
341
 
342
        signal ldStRegSel_s    : std_logic_vector(2 downto 0);
343
        signal ldStRegOut_s    : std_logic_vector(7 downto 0);
344
        signal ldStRegEn_n_s   : std_logic;
345
        signal ldstIoEnOut_n_s : std_logic;
346
        signal ldstIoWrOut_n_s : std_logic;
347
        signal ldstRst_n_s     : std_logic;
348
 
349
        signal aluRegEn_n_s  : std_logic;
350
        signal aluFlags_s    : std_logic_vector(1 downto 0);
351
        signal aluRegSel_s   : std_logic_vector(2 downto 0);
352
        signal aluRegOut_s   : std_logic_vector(7 downto 0);
353
 
354
        signal pcLoad_n_s    : std_logic;
355
 
356
        signal jmpOutEn_n_s  : std_logic;
357
        signal jmpAddr_s     : std_logic_vector(10 downto 0);
358
 
359
        signal irqAck_s       : std_logic;
360
        signal irqAddr_s      : std_logic_vector(1 downto 0);
361
        signal irqLine_s      : std_logic_vector(5 downto 0);
362
        signal irqLineAck_s   : std_logic_vector(5 downto 0);
363
        signal irq_ioOut_s    : std_logic_vector(7 downto 0);
364
        signal irq_ioInEn_n_s : std_logic;
365
        signal irq_ioInWr_n_s : std_logic;
366
 
367
        signal statusRegData_s   : std_logic_vector(7 downto 0);
368
        signal statusRegIoEn_n_s : std_logic;
369
 
370
        signal instMemEn_n_s : std_logic;
371
        signal instMemClk_s  : std_logic;
372
 
373
begin
374
 
375
        rst_n_s <= rst_n;
376
 
377
        stall_n_s <= stall_n and not(statusRegData_s(7));
378
        stalled_n <= stalled_n_s;
379
 
380
        instMemAddr   <= instAddr_s;
381
        instMemEn_n   <= instMemEn_n_s;
382
        instDataIn_s  <= instMemDataIn;
383
 
384
        -- irqEn <= statusRegData_s(0);
385
 
386
        instMemEn_n_s <= '1' when rst_n = '0' or state_s(3) = '1' or
387
                                  (stall_n_s = '0') else
388
                         '0';
389
--      instMemClk_s <= '1' when state_s(0) = '1' or state_s(2) = '1' else
390
--                      '0';
391
 
392
--      stateGen_proc : process(rst_n, instMemClk_s)
393
--      begin
394
--              if (rst_n = '0') then
395
--                      instMemEn_n_s <= '1';
396
--              else
397
--                      if (instMemClk_s'event and instMemClk_s = '1') then
398
--                              instMemEn_n_s <= not(instMemEn_n_s);
399
--                      end if;
400
--              end if;
401
--      end process;
402
 
403
        ------------------------------------------------------------------------------------------
404
        --
405
        -- register Set
406
        --
407
        ------------------------------------------------------------------------------------------
408
 
409
        vliwProc_regSet_i : vliwProc_regSet
410
        port map (
411
                state  => state_s,
412
 
413
                reg0   => reg0_s,
414
                reg1   => reg1_s,
415
                reg2   => reg2_s,
416
                reg3   => reg3_s,
417
                reg4   => reg4_s,
418
                reg5   => reg5_s,
419
                reg6   => reg6_s,
420
                reg7   => reg7_s,
421
 
422
                aluDataIn  => aluRegOut_s,
423
                aluRegSel  => aluRegSel_s,
424
                aluRegEn_n => aluRegEn_n_s,
425
 
426
                ldstDataIn  => ldStRegOut_s,
427
                ldstRegSel  => ldStRegSel_s,
428
                ldstRegEn_n => ldstRegEn_n_s,
429
 
430
                irqEn  => statusRegData_s(0),
431
 
432
                rst_n  => rst_n_s
433
        );
434
 
435
        statusRegIoEn_n_s <= '0' when state_s(3) = '1' and ioWr_n_s = '0' and ioEn_n_s = '0' and dataAddr_s(7 downto 0) = "00000000" else
436
                             '1';
437
 
438
        vliwProc_statusReg_i : vliwProc_statusReg
439
        port map (
440
                state    => state_s,
441
 
442
                iretEn_n  => pcLoad_n_s,
443
                ioEn_n    => statusRegIoEn_n_s,
444
                irqEn     => irqAck_s,
445
                flagsEn_n => aluRegEn_n_s,
446
 
447
                flagsIn  => aluFlags_s,
448
 
449
                dataIn   => dataOut_s,
450
                dataOut  => statusRegData_s,
451
 
452
                rst_n    => rst_n_s
453
        );
454
 
455
        pcReg_ioInEn_n_s <= '0' when ioEn_n_s = '0' and dataAddr_s(7 downto 2) = "000100" else
456
                            '1';
457
        pcReg_ioInWr_n_s <= '0' when ioWr_n_s = '0' and pcReg_ioInEn_n_s = '0' else
458
                            '1';
459
 
460
        vliwProc_pcReg_i : vliwProc_pcReg
461
        port map (
462
                addrOut   => instAddr_s,
463
 
464
                state     => state_s,
465
                stalled_n => stalled_n_s,
466
 
467
                ioAddr    => dataAddr_s(1 downto 0),
468
                ioIn      => dataOut_s,
469
                ioOut     => pcReg_ioOut_s,
470
                ioInEn_n  => pcReg_ioInEn_n_s,
471
                ioInWr_n  => pcReg_ioInWr_n_s,
472
 
473
                pcLoad_n  => pcLoad_n_s,
474
 
475
                jmpIn     => jmpAddr_s,
476
                jmpInEn_n => jmpOutEn_n_s,
477
 
478
                irq       => irqAck_s,
479
                irqAddr   => irqAddr_s,
480
 
481
                rst_n     => rst_n_s
482
        );
483
 
484
        vliwProc_jmpExec_i : vliwProc_jmpExec
485
        port map (
486
                en_n      => jmpEn_n_s,
487
 
488
                esb       => state_s,
489
 
490
                dst       => jmpDstReg_s,
491
                as        => jmpAs_s,
492
 
493
                jmpDst    => jmpAddr_s,
494
                jmpEn_n   => jmpOutEn_n_s,
495
 
496
                cz        => statusRegData_s(5 downto 4),
497
 
498
                rst_n     => rst_n_s
499
        );
500
 
501
        vliwProc_instDecoder_i : vliwProc_instDecoder
502
        port map (
503
                clk        => clk,
504
                esb        => state_s,
505
 
506
                instData   => instDataIn_s,
507
 
508
                ldstOpCode => ldstOpCode_s,
509
                ldstAs     => ldstAs_s,
510
                ldstDstReg => ldstDstReg_s,
511
                ldstSrc    => ldstSrc_s,
512
                ldstEn_n   => ldstEn_n_s,
513
 
514
                aluOpCode  => aluOpCode_s,
515
                aluAs      => aluAs_s,
516
                aluDstReg  => aluDstReg_s,
517
                aluSrc     => aluSrc_s,
518
                aluEn_n    => aluEn_n_s,
519
 
520
                jmpAs      => jmpAs_s,
521
                jmpDstReg  => jmpDstReg_s,
522
                jmpEn_n    => jmpEn_n_s,
523
 
524
                stall_n    => stall_n_s,
525
                stalled_n  => stalled_n_s,
526
 
527
                rst_n      => rst_n_s
528
        );
529
 
530
        ioMemAddr    <= dataAddr_s;
531
        ioMemDataOut <= dataOut_s;
532
 
533
        ioDataIn_s   <= statusRegData_s when dataAddr_s(7 downto 0) = "00000000" else
534
                        irq_ioOut_s     when irq_ioInEn_n_s = '0' else
535
                        pcReg_ioOut_s   when pcReg_ioInEn_n_s = '0'  else
536
                        ioMemDataIn;
537
 
538
        ioMemWr_n    <= ioWr_n_s when state_s(3) = '1' else
539
                        '1';
540
        ioMemEn_n    <= ioEn_n_s;
541
 
542
        dataMemAddr    <= dataAddr_s;
543
        dataMemDataOut <= dataOut_s;
544
        dataIn_s       <= dataMemDataIn;
545
        dataMemWr_n    <= dataWr_n_s when state_s(3) = '1' else
546
                          '1';
547
        dataMemEn_n    <= dataEn_n_s;
548
 
549
        ioWr_n_s <= ldstIoWrOut_n_s when rst_n_s = '1' and stalled_n_s = '1' else
550
                    '1';
551
        ioEn_n_s <= ldstIoEnOut_n_s when rst_n_s = '1' and stalled_n_s = '1' else
552
                    '1';
553
 
554
        ldstRst_n_s <= rst_n_s and stalled_n_s;
555
 
556
        vliwProc_loadStore_i : vliwProc_loadStore
557
        port map (
558
                addr     => dataAddr_s,
559
                dataIn   => dataIn_s,
560
                ioIn     => ioDataIn_s,
561
                dataOut  => dataOut_s,
562
 
563
                ioWr_n   => ldstIoWrOut_n_s,
564
                ioEn_n   => ldstIoEnOut_n_s,
565
                dataWr_n => dataWr_n_s,
566
                dataEn_n => dataEn_n_s,
567
 
568
                opCode   => ldstOpCode_s,
569
                as       => ldstAs_s,
570
                dstReg   => ldstDstReg_s,
571
                src      => ldstSrc_s,
572
 
573
                cs_n     => ldstEn_n_s,
574
 
575
                state    => state_s,
576
 
577
                regOut   => ldStRegOut_s,
578
 
579
                reg0     => reg0_s,
580
                reg1     => reg1_s,
581
                reg2     => reg2_s,
582
                reg3     => reg3_s,
583
                reg4     => reg4_s,
584
                reg5     => reg5_s,
585
                reg6     => reg6_s,
586
                reg7     => reg7_s,
587
 
588
                regSel   => ldStRegSel_s,
589
                regEn_n  => ldStRegEn_n_s,
590
 
591
                rst_n    => ldstRst_n_s
592
        );
593
 
594
        vliwProc_alu_i : vliwProc_alu
595
        port map (
596
                state      => state_s,
597
 
598
                enable_n   => aluEn_n_s,
599
 
600
                opcode     => aluOpCode_s,
601
                as         => aluAs_s,
602
                dstRegIn   => aluDstReg_s,
603
                dataIn     => aluSrc_s,
604
 
605
                reg0       => reg0_s,
606
                reg1       => reg1_s,
607
                reg2       => reg2_s,
608
                reg3       => reg3_s,
609
                reg4       => reg4_s,
610
                reg5       => reg5_s,
611
                reg6       => reg6_s,
612
                reg7       => reg7_s,
613
 
614
                cIn        => statusRegData_s(5),
615
                cOut       => aluFlags_s(1),
616
                zOut       => aluFlags_s(0),
617
 
618
                dstRegEn_n => aluRegEn_n_s,
619
                dstRegOut  => aluRegSel_s,
620
                dataOut    => aluRegOut_s,
621
 
622
                rst_n      => rst_n_s
623
        );
624
 
625
        ------------------------------------------------------------------------------------------
626
        --
627
        --   Interrupt handler
628
        --
629
        ------------------------------------------------------------------------------------------
630
 
631
        irqLine_s <= '0' & irqLine;
632
        irqLineAck <= irqLineAck_s(4 downto 0);
633
 
634
        irq_ioInEn_n_s <= '0' when ioEn_n_s = '0' and dataAddr_s(7 downto 0) = "00000001" else
635
                          '1';
636
        irq_ioInWr_n_s <= '0' when ioWr_n_s = '0' and irq_ioInEn_n_s = '0' else
637
                          '1';
638
 
639
 
640
        vliwProc_irqCntl_i : vliwProc_irqCntl
641
        port map (
642
                state      => state_s,
643
                stalled_n  => stalled_n_s,
644
 
645
                irqLineIn  => irqLine_s,
646
                irqLineOut => irqLineAck_s,
647
                irqAck     => irqAck_s,
648
 
649
                irqAddr    => irqAddr_s,
650
 
651
                ioDataIn   => dataOut_s,
652
                ioDataOut  => irq_ioOut_s,
653
                ioInEn_n   => irq_ioInEn_n_s,
654
                ioInWr_n   => irq_ioInWr_n_s,
655
 
656
                enable     => statusRegData_s(3),
657
 
658
                rst_n      => rst_n_s
659
        );
660
 
661
end behavior;

powered by: WebSVN 2.1.0

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