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

Subversion Repositories ata

[/] [ata/] [trunk/] [rtl/] [vhdl/] [ocidec3/] [atahost_top.vhd] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 rherveille
---------------------------------------------------------------------
2
----                                                             ----
3
----  OpenCores IDE Controller                                   ----
4
----  ATA/ATAPI-5 IDE controller with DMA support                ----
5
----                                                             ----
6
----  Author: Richard Herveille                                  ----
7
----          richard@asics.ws                                   ----
8
----          www.asics.ws                                       ----
9
----                                                             ----
10
---------------------------------------------------------------------
11
----                                                             ----
12
---- Copyright (C) 2002 Richard Herveille                        ----
13
----                    richard@asics.ws                         ----
14
----                                                             ----
15
---- This source file may be used and distributed without        ----
16
---- restriction provided that this copyright statement is not   ----
17
---- removed from the file and that any derivative work contains ----
18
---- the original copyright notice and the associated disclaimer.----
19
----                                                             ----
20
----     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ----
21
---- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ----
22
---- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ----
23
---- FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ----
24
---- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ----
25
---- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ----
26
---- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ----
27
---- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ----
28
---- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ----
29
---- LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ----
30
---- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ----
31
---- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ----
32
---- POSSIBILITY OF SUCH DAMAGE.                                 ----
33
----                                                             ----
34
---------------------------------------------------------------------
35
 
36
--
37
-- rev.:        1.0  Alpha version Januar 1st, 2001
38
-- rev.: 1.0a Removed all references to records.vhd. Make core compatible with VHDL to Verilog translator tools
39
--            Changed DMA_req signal generation. Make the core compatible with the latest version of the OpenCores DMA engine
40
-- rev.: 1.1  june 18th, 2001. Changed wishbone address-input from ADR_I(4 downto 0) to ADR(6 downto 2)
41
-- rev.: 1.1a june 19th, 2001. Simplified DAT_O output multiplexor
42
--
43
--  CVS Log
44
--
45
--  $Id: atahost_top.vhd,v 1.1 2002-02-18 14:32:12 rherveille Exp $
46
--
47
--  $Date: 2002-02-18 14:32:12 $
48
--  $Revision: 1.1 $
49
--  $Author: rherveille $
50
--  $Locker:  $
51
--  $State: Exp $
52
--
53
-- Change History:
54
--               $Log: not supported by cvs2svn $
55
--
56
 
57
--
58
-- DeviceType: OCIDEC-3: OpenCores IDE Controller type3
59
-- Features: PIO Compatible Timing, PIO Fast Timing 0/1, Single/Multiword DMA Timing 0/1
60
-- DeviceID: 0x03
61
-- RevNo : 0x00
62
 
63
--
64
-- Host signals:
65
-- Reset
66
-- DIOR-                read strobe. The falling edge enables data from device onto DD. The rising edge latches data at the host.
67
-- DIOW-                write strobe. The rising edge latches data from DD into the device.
68
-- DMACK-       DMA acknowledge
69
-- DA(2:0)              3bit binary coded adress
70
-- CS0-         select command block registers
71
-- CS1-         select control block registers
72
 
73
 
74
library ieee;
75
use ieee.std_logic_1164.all;
76
use ieee.std_logic_arith.all;
77
 
78
entity atahost_top is
79
        generic(
80
                ARST_LVL : std_logic := '0';                -- asynchronous reset level
81
 
82
                TWIDTH : natural := 8;                      -- counter width
83
 
84
                -- PIO mode 0 settings (@100MHz clock)
85
                PIO_mode0_T1 : natural := 6;                -- 70ns
86
                PIO_mode0_T2 : natural := 28;               -- 290ns
87
                PIO_mode0_T4 : natural := 2;                -- 30ns
88
                PIO_mode0_Teoc : natural := 23;             -- 240ns ==> T0 - T1 - T2 = 600 - 70 - 290 = 240
89
 
90
                -- Multiword DMA mode 0 settings (@100MHz clock)
91
                DMA_mode0_Tm : natural := 4;                -- 50ns
92
                DMA_mode0_Td : natural := 21;               -- 215ns
93
                DMA_mode0_Teoc : natural := 21              -- 215ns ==> T0 - Td - Tm = 480 - 50 - 215 = 215
94
        );
95
        port(
96
                -- WISHBONE SYSCON signals
97
                wb_clk_i : in std_logic;                       -- master clock in
98
                arst_i   : in std_logic := '1';                -- asynchronous active low reset
99
                wb_rst_i : in std_logic := '0';                -- synchronous active high reset
100
 
101
                -- WISHBONE SLAVE signals
102
                wb_cyc_i : in std_logic;                       -- valid bus cycle input
103
                wb_stb_i : in std_logic;                       -- strobe/core select input
104
                wb_ack_o : out std_logic;                      -- strobe acknowledge output
105
                wb_rty_o : out std_logic;                      -- retry output
106
                wb_err_o : out std_logic;                      -- error output
107
                wb_adr_i : in unsigned(6 downto 2);            -- A6 = '1' ATA devices selected
108
                                                               --       A5 = '1' CS1- asserted, '0' CS0- asserted
109
                                                               --       A4..A2 ATA address lines
110
                                                               -- A6 = '0' ATA controller selected
111
                wb_dat_i : in std_logic_vector(31 downto 0);   -- Databus in
112
                wb_dat_o : out std_logic_vector(31 downto 0);  -- Databus out
113
                wb_sel_i : in std_logic_vector(3 downto 0);    -- Byte select signals
114
                wb_we_i  : in std_logic;                       -- Write enable input
115
                wb_inta_o : out std_logic;                     -- interrupt request signal IDE0
116
 
117
                -- DMA engine signals
118
                DMA_req : out std_logic;                    -- DMA request
119
                DMA_Ack : in std_logic;                     -- DMA acknowledge
120
 
121
                -- ATA signals
122
                resetn_pad_o : out std_logic;
123
                dd_pad_i     : in  std_logic_vector(15 downto 0);
124
                dd_pad_o     : out std_logic_vector(15 downto 0);
125
                dd_padoe_o   : out std_logic;
126
                da_pad_o     : out unsigned(2 downto 0);
127
                cs0n_pad_o   : out std_logic;
128
                cs1n_pad_o   : out std_logic;
129
 
130
                diorn_pad_o      : out std_logic;
131
                diown_pad_o      : out std_logic;
132
                iordy_pad_i      : in  std_logic;
133
                intrq_pad_i      : in  std_logic;
134
 
135
                dmarq_pad_i  : in  std_logic;
136
                dmackn_pad_o : out std_logic
137
        );
138
end entity atahost_top;
139
 
140
architecture structural of atahost_top is
141
        --
142
        -- Device ID
143
        --
144
        constant DeviceId : unsigned(3 downto 0) := x"3";
145
        constant RevisionNo : unsigned(3 downto 0) := x"0";
146
 
147
        --
148
        -- component declarations
149
        --
150
        component atahost_wb_slave is
151
        generic(
152
                DeviceID   : unsigned(3 downto 0) := x"0";
153
                RevisionNo : unsigned(3 downto 0) := x"0";
154
 
155
                -- PIO mode 0 settings (@100MHz clock)
156
                PIO_mode0_T1 : natural := 6;                -- 70ns
157
                PIO_mode0_T2 : natural := 28;               -- 290ns
158
                PIO_mode0_T4 : natural := 2;                -- 30ns
159
                PIO_mode0_Teoc : natural := 23;             -- 240ns ==> T0 - T1 - T2 = 600 - 70 - 290 = 240
160
 
161
                -- Multiword DMA mode 0 settings (@100MHz clock)
162
                DMA_mode0_Tm : natural := 4;                -- 50ns
163
                DMA_mode0_Td : natural := 21;               -- 215ns
164
                DMA_mode0_Teoc : natural := 21              -- 215ns ==> T0 - Td - Tm = 480 - 50 - 215 = 215
165
        );
166
        port(
167
                -- WISHBONE SYSCON signals
168
                clk_i  : in std_logic;                                  -- master clock in
169
                arst_i : in std_logic := '1';               -- asynchronous active low reset
170
                rst_i  : in std_logic := '0';               -- synchronous active high reset
171
 
172
                -- WISHBONE SLAVE signals
173
                cyc_i : in std_logic;                       -- valid bus cycle input
174
                stb_i : in std_logic;                       -- strobe/core select input
175
                ack_o : out std_logic;                      -- strobe acknowledge output
176
                rty_o : out std_logic;                      -- retry output
177
                err_o : out std_logic;                      -- error output
178
                adr_i : in unsigned(6 downto 2);            -- A6 = '1' ATA devices selected
179
                                                            --          A5 = '1' CS1- asserted, '0' CS0- asserted
180
                                                            --          A4..A2 ATA address lines
181
                                                            -- A6 = '0' ATA controller selected
182
                dat_i  : in std_logic_vector(31 downto 0);  -- Databus in
183
                dat_o  : out std_logic_vector(31 downto 0); -- Databus out
184
                sel_i  : in std_logic_vector(3 downto 0);   -- Byte select signals
185
                we_i   : in std_logic;                      -- Write enable input
186
                inta_o : out std_logic;                     -- interrupt request signal IDE0
187
 
188
                -- PIO control input
189
                PIOsel     : buffer std_logic;
190
                PIOtip,                                         -- PIO transfer in progress
191
                PIOack     : in std_logic;                      -- PIO acknowledge signal
192
                PIOq       : in std_logic_vector(15 downto 0);  -- PIO data input
193
                PIOpp_full : in std_logic;                      -- PIO write-ping-pong buffers full
194
                irq        : in std_logic;                      -- interrupt signal input
195
 
196
                -- DMA control inputs
197
                DMAsel    : out std_logic;
198
                DMAtip,                                     -- DMA transfer in progress
199
                DMAack,
200
                DMARxEmpty,                                 -- DMA receive buffer empty
201
                DMATxFull,                                  -- DMA transmit buffer full
202
                DMA_dmarq : in std_logic;                   -- wishbone DMA request
203
                DMAq      : in std_logic_vector(31 downto 0);
204
 
205
                -- outputs
206
                -- control register outputs
207
                IDEctrl_rst,
208
                IDEctrl_IDEen,
209
                IDEctrl_FATR1,
210
                IDEctrl_FATR0,
211
                IDEctrl_ppen,
212
                DMActrl_DMAen,
213
                DMActrl_dir,
214
                DMActrl_BeLeC0,
215
                DMActrl_BeLeC1 : out std_logic;
216
 
217
                -- CMD port timing registers
218
                PIO_cmdport_T1,
219
                PIO_cmdport_T2,
220
                PIO_cmdport_T4,
221
                PIO_cmdport_Teoc    : buffer unsigned(7 downto 0);
222
                PIO_cmdport_IORDYen : out std_logic;
223
 
224
                -- data-port0 timing registers
225
                PIO_dport0_T1,
226
                PIO_dport0_T2,
227
                PIO_dport0_T4,
228
                PIO_dport0_Teoc    : buffer unsigned(7 downto 0);
229
                PIO_dport0_IORDYen : out std_logic;
230
 
231
                -- data-port1 timing registers
232
                PIO_dport1_T1,
233
                PIO_dport1_T2,
234
                PIO_dport1_T4,
235
                PIO_dport1_Teoc    : buffer unsigned(7 downto 0);
236
                PIO_dport1_IORDYen : out std_logic;
237
 
238
                -- DMA device0 timing registers
239
                DMA_dev0_Tm,
240
                DMA_dev0_Td,
241
                DMA_dev0_Teoc    : buffer unsigned(7 downto 0);
242
 
243
                -- DMA device1 timing registers
244
                DMA_dev1_Tm,
245
                DMA_dev1_Td,
246
                DMA_dev1_Teoc    : buffer unsigned(7 downto 0)
247
        );
248
        end component atahost_wb_slave;
249
 
250
        component atahost_controller is
251
        generic(
252
                TWIDTH : natural := 8;                   -- counter width
253
 
254
                -- PIO mode 0 settings (@100MHz clock)
255
                PIO_mode0_T1 : natural := 6;             -- 70ns
256
                PIO_mode0_T2 : natural := 28;            -- 290ns
257
                PIO_mode0_T4 : natural := 2;             -- 30ns
258
                PIO_mode0_Teoc : natural := 23;          -- 240ns ==> T0 - T1 - T2 = 600 - 70 - 290 = 240
259
 
260
                -- Multiword DMA mode 0 settings (@100MHz clock)
261
                DMA_mode0_Tm : natural := 4;             -- 50ns
262
                DMA_mode0_Td : natural := 21;            -- 215ns
263
                DMA_mode0_Teoc : natural := 21           -- 215ns ==> T0 - Td - Tm = 480 - 50 - 215 = 215
264
        );
265
        port(
266
                clk : in std_logic;                                       -- master clock in
267
                nReset  : in std_logic := '1';                 -- asynchronous active low reset
268
                rst : in std_logic := '0';                    -- synchronous active high reset
269
 
270
                irq : out std_logic;                          -- interrupt request signal
271
 
272
                -- control / registers
273
                IDEctrl_IDEen,
274
                IDEctrl_rst,
275
                IDEctrl_ppen,
276
                IDEctrl_FATR0,
277
                IDEctrl_FATR1 : in std_logic;                 -- control register settings
278
 
279
                a  : in unsigned(3 downto 0);                 -- address input
280
                d  : in std_logic_vector(31 downto 0);        -- data input
281
                we : in std_logic;                            -- write enable input '1'=write, '0'=read
282
 
283
                -- PIO registers
284
                PIO_cmdport_T1,
285
                PIO_cmdport_T2,
286
                PIO_cmdport_T4,
287
                PIO_cmdport_Teoc : in unsigned(7 downto 0);
288
                PIO_cmdport_IORDYen : in std_logic;           -- PIO compatible timing settings
289
 
290
                PIO_dport0_T1,
291
                PIO_dport0_T2,
292
                PIO_dport0_T4,
293
                PIO_dport0_Teoc : in unsigned(7 downto 0);
294
                PIO_dport0_IORDYen : in std_logic;            -- PIO data-port device0 timing settings
295
 
296
                PIO_dport1_T1,
297
                PIO_dport1_T2,
298
                PIO_dport1_T4,
299
                PIO_dport1_Teoc : in unsigned(7 downto 0);
300
                PIO_dport1_IORDYen : in std_logic;            -- PIO data-port device1 timing settings
301
 
302
                PIOsel : in std_logic;                        -- PIO controller select
303
                PIOack : out std_logic;                       -- PIO controller acknowledge
304
                PIOq : out std_logic_vector(15 downto 0);     -- PIO data out
305
                PIOtip : buffer std_logic;                    -- PIO transfer in progress
306
                PIOpp_full : out std_logic;                   -- PIO Write PingPong full
307
 
308
                -- DMA registers
309
                DMA_dev0_Td,
310
                DMA_dev0_Tm,
311
                DMA_dev0_Teoc : in unsigned(7 downto 0);      -- DMA timing settings for device0
312
 
313
                DMA_dev1_Td,
314
                DMA_dev1_Tm,
315
                DMA_dev1_Teoc : in unsigned(7 downto 0);      -- DMA timing settings for device1
316
 
317
                DMActrl_DMAen,
318
                DMActrl_dir,
319
                DMActrl_BeLeC0,
320
                DMActrl_BeLeC1 : in std_logic;                -- DMA settings
321
 
322
                DMAsel : in std_logic;                        -- DMA controller select
323
                DMAack : out std_logic;                       -- DMA controller acknowledge
324
                DMAq : out std_logic_vector(31 downto 0);     -- DMA data out
325
                DMAtip : buffer std_logic;                    -- DMA transfer in progress
326
                DMA_dmarq : out std_logic;                    -- Synchronized ATA DMARQ line
327
 
328
                DMATxFull : buffer std_logic;                 -- DMA transmit buffer full
329
                DMARxEmpty : buffer std_logic;                -- DMA receive buffer empty
330
 
331
                DMA_req : out std_logic;                      -- DMA request to external DMA engine
332
                DMA_ack : in std_logic;                       -- DMA acknowledge from external DMA engine
333
 
334
                -- ATA signals
335
                RESETn  : out std_logic;
336
                DDi     : in std_logic_vector(15 downto 0);
337
                DDo : out std_logic_vector(15 downto 0);
338
                DDoe : out std_logic;
339
                DA      : out unsigned(2 downto 0);
340
                CS0n    : out std_logic;
341
                CS1n    : out std_logic;
342
 
343
                DMARQ   : in std_logic;
344
                DMACKn  : out std_logic;
345
                DIORn   : out std_logic;
346
                DIOWn   : out std_logic;
347
                IORDY   : in std_logic;
348
                INTRQ   : in std_logic
349
        );
350
        end component atahost_controller;
351
 
352
        -- asynchronous reset signal
353
        signal arst_signal : std_logic;
354
 
355
        -- primary address decoder
356
        signal PIOsel, DMAsel : std_logic;        -- controller select, IDE devices select
357
 
358
        -- registers
359
        -- IDE control register
360
        signal IDEctrl_IDEen, IDEctrl_rst, IDEctrl_ppen, IDEctrl_FATR0, IDEctrl_FATR1 : std_logic;
361
        -- PIO compatible timing settings
362
        signal PIO_cmdport_T1, PIO_cmdport_T2, PIO_cmdport_T4, PIO_cmdport_Teoc : unsigned(7 downto 0);
363
        signal PIO_cmdport_IORDYen : std_logic;
364
        -- PIO data register device0 timing settings
365
        signal PIO_dport0_T1, PIO_dport0_T2, PIO_dport0_T4, PIO_dport0_Teoc : unsigned(7 downto 0);
366
        signal PIO_dport0_IORDYen : std_logic;
367
        -- PIO data register device1 timing settings
368
        signal PIO_dport1_T1, PIO_dport1_T2, PIO_dport1_T4, PIO_dport1_Teoc : unsigned(7 downto 0);
369
        signal PIO_dport1_IORDYen : std_logic;
370
        -- DMA control register
371
        signal DMActrl_DMAen, DMActrl_dir, DMActrl_BeLeC0, DMActrl_BeLeC1 : std_logic;
372
        -- DMA data port device0 timing settings
373
        signal DMA_dev0_Td, DMA_dev0_Tm, DMA_dev0_Teoc : unsigned(7 downto 0);
374
        -- DMA data port device1 timing settings
375
        signal DMA_dev1_Td, DMA_dev1_Tm, DMA_dev1_Teoc : unsigned(7 downto 0);
376
 
377
        signal PIOack, DMAack, PIOtip, DMAtip : std_logic;
378
        signal PIOq : std_logic_vector(15 downto 0);
379
        signal PIOpp_full : std_logic;
380
        signal DMAq : std_logic_vector(31 downto 0);
381
        signal DMA_dmarq : std_logic; -- synchronized version of DMARQ
382
 
383
        signal DMATxFull, DMARxEmpty : std_logic;
384
 
385
        signal irq : std_logic; -- ATA bus IRQ signal
386
 
387
begin
388
        -- generate asynchronous reset level
389
        arst_signal <= arst_i xor ARST_LVL;
390
 
391
        --
392
        -- hookup wishbone slave
393
        --
394
        u0: atahost_wb_slave
395
                generic map(
396
                        DeviceID   => DeviceID,
397
                        RevisionNo => RevisionNo,
398
 
399
                        -- PIO mode 0 settings
400
                        PIO_mode0_T1 => PIO_mode0_T1,
401
                        PIO_mode0_T2 => PIO_mode0_T2,
402
                        PIO_mode0_T4 => PIO_mode0_T4,
403
                        PIO_mode0_Teoc => PIO_mode0_Teoc,
404
 
405
                        -- Multiword DMA mode 0 settings
406
                        -- OCIDEC-1 does not support DMA, set registers to zero
407
                        DMA_mode0_Tm   => 0,
408
                        DMA_mode0_Td   => 0,
409
                        DMA_mode0_Teoc => 0
410
                )
411
                port map(
412
                        -- WISHBONE SYSCON signals
413
                        clk_i => wb_clk_i,
414
                        arst_i => arst_signal,
415
                        rst_i  => wb_rst_i,
416
 
417
                        -- WISHBONE SLAVE signals
418
                        cyc_i => wb_cyc_i,
419
                        stb_i => wb_stb_i,
420
                        ack_o => wb_ack_o,
421
                        rty_o => wb_rty_o,
422
                        err_o => wb_err_o,
423
                        adr_i => wb_adr_i,
424
                        dat_i => wb_dat_i,
425
                        dat_o => wb_dat_o,
426
                        sel_i => wb_sel_i,
427
                        we_i  => wb_we_i,
428
                        inta_o => wb_inta_o,
429
 
430
                        -- PIO control inputs
431
                        PIOsel     => PIOsel,
432
                        PIOtip     => PIOtip,
433
                        PIOack     => PIOack,
434
                        PIOq       => PIOq,
435
                        PIOpp_full => PIOpp_full,
436
                        irq        => irq,
437
 
438
                        -- DMA control inputs
439
                        DMAsel     => DMAsel,
440
                        DMAtip     => DMAtip,
441
                        DMAack     => DMAack,
442
                        DMARxEmpty => DMARxEmpty,
443
                        DMATxFull  => DMATxFull,
444
                        DMA_dmarq  => DMA_dmarq,
445
                        DMAq       => DMAq,
446
 
447
                        -- outputs
448
                        -- control register outputs
449
                        IDEctrl_rst   => IDEctrl_rst,
450
                        IDEctrl_IDEen => IDEctrl_IDEen,
451
                        IDEctrl_FATR0 => IDEctrl_FATR0,
452
                        IDEctrl_FATR1 => IDEctrl_FATR1,
453
                        IDEctrl_ppen  => IDEctrl_ppen,
454
 
455
                        DMActrl_DMAen  => DMActrl_DMAen,
456
                        DMActrl_dir    => DMActrl_dir,
457
                        DMActrl_BeLeC0 => DMActrl_BeLeC0,
458
                        DMActrl_BeLeC1 => DMActrl_BeLeC1,
459
 
460
                        -- CMD port timing registers
461
                        PIO_cmdport_T1 => PIO_cmdport_T1,
462
                        PIO_cmdport_T2 => PIO_cmdport_T2,
463
                        PIO_cmdport_T4 => PIO_cmdport_T4,
464
                        PIO_cmdport_Teoc => PIO_cmdport_Teoc,
465
                        PIO_cmdport_IORDYen => PIO_cmdport_IORDYen,
466
 
467
                        -- data-port0 timing registers
468
                        PIO_dport0_T1 => PIO_dport0_T1,
469
                        PIO_dport0_T2 => PIO_dport0_T2,
470
                        PIO_dport0_T4 => PIO_dport0_T4,
471
                        PIO_dport0_Teoc => PIO_dport0_Teoc,
472
                        PIO_dport0_IORDYen => PIO_dport0_IORDYen,
473
 
474
                        -- data-port1 timing registers
475
                        PIO_dport1_T1 => PIO_dport1_T1,
476
                        PIO_dport1_T2 => PIO_dport1_T2,
477
                        PIO_dport1_T4 => PIO_dport1_T4,
478
                        PIO_dport1_Teoc => PIO_dport1_Teoc,
479
                        PIO_dport1_IORDYen => PIO_dport1_IORDYen,
480
 
481
                        -- DMA device0 timing registers
482
                        DMA_dev0_Tm => DMA_dev0_Tm,
483
                        DMA_dev0_Td => DMA_dev0_Td,
484
                        DMA_dev0_Teoc => DMA_dev0_Teoc,
485
 
486
                        -- DMA device1 timing registers
487
                        DMA_dev1_Tm => DMA_dev1_Tm,
488
                        DMA_dev1_Td => DMA_dev1_Td,
489
                        DMA_dev1_Teoc => DMA_dev1_Teoc
490
                );
491
 
492
 
493
        --
494
        -- hookup controller section
495
        --
496
        u1: atahost_controller
497
                generic map(
498
                        TWIDTH => TWIDTH,
499
                        PIO_mode0_T1   => PIO_mode0_T1,
500
                        PIO_mode0_T2   => PIO_mode0_T2,
501
                        PIO_mode0_T4   => PIO_mode0_T4,
502
                        PIO_mode0_Teoc => PIO_mode0_Teoc,
503
                        DMA_mode0_Tm   => DMA_mode0_Tm,
504
                        DMA_mode0_Td   => DMA_mode0_Td,
505
                        DMA_mode0_Teoc => DMA_mode0_Teoc
506
                )
507
                port map(
508
                        clk    => wb_clk_i,
509
                        nReset => arst_signal,
510
                        rst    => wb_rst_i,
511
                        irq    => irq,
512
                        IDEctrl_IDEen => IDEctrl_IDEen,
513
                        IDEctrl_rst   => IDEctrl_rst,
514
                        IDEctrl_ppen  => IDEctrl_ppen,
515
                        IDEctrl_FATR0 => IDEctrl_FATR0,
516
                        IDEctrl_FATR1 => IDEctrl_FATR1,
517
                        a  => wb_adr_i(5 downto 2),
518
                        d  => wb_dat_i,
519
                        we => wb_we_i,
520
                        PIO_cmdport_T1   => PIO_cmdport_T1,
521
                        PIO_cmdport_T2   => PIO_cmdport_T2,
522
                        PIO_cmdport_T4   => PIO_cmdport_T4,
523
                        PIO_cmdport_Teoc => PIO_cmdport_Teoc,
524
                        PIO_cmdport_IORDYen => PIO_cmdport_IORDYen,
525
                        PIO_dport0_T1   => PIO_dport0_T1,
526
                        PIO_dport0_T2   => PIO_dport0_T2,
527
                        PIO_dport0_T4   => PIO_dport0_T4,
528
                        PIO_dport0_Teoc => PIO_dport0_Teoc,
529
                        PIO_dport0_IORDYen => PIO_dport0_IORDYen,
530
                        PIO_dport1_T1   => PIO_dport1_T1,
531
                        PIO_dport1_T2   => PIO_dport1_T2,
532
                        PIO_dport1_T4   => PIO_dport1_T4,
533
                        PIO_dport1_Teoc => PIO_dport1_Teoc,
534
                        PIO_dport1_IORDYen => PIO_dport1_IORDYen,
535
                        PIOsel     => PIOsel,
536
                        PIOack     => PIOack,
537
                        PIOq       => PIOq,
538
                        PIOtip     => PIOtip,
539
                        PIOpp_full => PIOpp_full,
540
                        DMActrl_DMAen  =>       DMActrl_DMAen,
541
                        DMActrl_dir    => DMActrl_dir,
542
                        DMActrl_BeLeC0 => DMActrl_BeLeC0,
543
                        DMActrl_BeLeC1 => DMActrl_BeLeC1,
544
                        DMA_dev0_Td   => DMA_dev0_Td,
545
                        DMA_dev0_Tm   => DMA_dev0_Tm,
546
                        DMA_dev0_Teoc => DMA_dev0_Teoc,
547
                        DMA_dev1_Td   => DMA_dev1_Td,
548
                        DMA_dev1_Tm   => DMA_dev1_Tm,
549
                        DMA_dev1_Teoc => DMA_dev1_Teoc,
550
                        DMAsel     => DMAsel,
551
                        DMAack     => DMAack,
552
                        DMAq       => DMAq,
553
                        DMAtip     => DMAtip,
554
                        DMA_dmarq  => DMA_dmarq,
555
                        DMATxFull  => DMATxFull,
556
                        DMARxEmpty => DMARxEmpty,
557
                        DMA_req    => DMA_req,
558
                        DMA_ack    => DMA_ack,
559
                        RESETn => resetn_pad_o,
560
                        DDi    => dd_pad_i,
561
                        DDo    => dd_pad_o,
562
                        DDoe   => dd_padoe_o,
563
                        DA     => da_pad_o,
564
                        CS0n   => cs0n_pad_o,
565
                        CS1n   => cs1n_pad_o,
566
                        DIORn  => diorn_pad_o,
567
                        DIOWn  => diown_pad_o,
568
                        IORDY  => iordy_pad_i,
569
                        INTRQ  => intrq_pad_i,
570
                        DMARQ  => dmarq_pad_i,
571
                        DMACKn => dmackn_pad_o
572
                );
573
 
574
end architecture structural;
575
 
576
 
577
 

powered by: WebSVN 2.1.0

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