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

Subversion Repositories modular_oscilloscope

[/] [modular_oscilloscope/] [trunk/] [hdl/] [epp/] [eppwbn.vhd] - Blame information for rev 22

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

Line No. Rev Author Line
1 19 budinero
----------------------------------------------------------------------------------------------------
2
--| Modular Oscilloscope
3
--| UNSL - Argentine
4 10 budinero
--|
5 19 budinero
--| File: eppwbn.vhd
6
--| Version: 0.1
7
--| Tested in: Actel APA300
8
--|-------------------------------------------------------------------------------------------------
9 10 budinero
--| Description:
10
--|   EPP - Wishbone bridge. 
11 19 budinero
--|   The top module for 8 bit wisbone data bus.
12
--|-------------------------------------------------------------------------------------------------
13 10 budinero
--| File history:
14 14 budinero
--|   0.01  | dic-2008 | First release
15 19 budinero
--|   0.10  | feb-2009 | Working
16
----------------------------------------------------------------------------------------------------
17 14 budinero
--| Copyright ® 2008, Facundo Aguilera.
18
--|
19
--| This VHDL design file is an open design; you can redistribute it and/or
20
--| modify it and/or implement it after contacting the author.
21 10 budinero
 
22 19 budinero
--| Wishbone Rev. B.3 compatible
23
----------------------------------------------------------------------------------------------------
24 10 budinero
 
25 19 budinero
 
26
 
27 5 budinero
-- Bloque completo
28
 
29 10 budinero
library IEEE;
30
use IEEE.STD_LOGIC_1164.all;
31 22 budinero
use work.eppwbn_pkg.all;
32 10 budinero
 
33 6 budinero
entity eppwbn is
34 5 budinero
port(
35 22 budinero
 
36
  -- TEMPORAL
37
  epp_mode_monitor: out std_logic_vector (1 downto 0);
38
 
39
 
40
 
41 5 budinero
        -- Externo
42 10 budinero
        nStrobe: in std_logic;                                                                                  -- Nomenclatura IEEE Std. 1284 
43
                                                                                                                                                                                        -- HostClk/nWrite 
44
        Data: inout std_logic_vector (7 downto 0);       -- AD8..1 (Data1..Data8)
45
        nAck: out std_logic;                                                                                            --  PtrClk/PeriphClk/Intr
46
        busy: out std_logic;                                                                                            --  PtrBusy/PeriphAck/nWait
47
        PError: out std_logic;                                                                                  --  AckData/nAckReverse
48
        Sel: out std_logic;                                                                                             --  XFlag (Select)
49
        nAutoFd: in std_logic;                                                                                  --  HostBusy/HostAck/nDStrb
50
        PeriphLogicH: out std_logic;                                                            --  (Periph Logic High)
51
        nInit: in std_logic;                                                                                            --  nReverseRequest
52
        nFault: out std_logic;                                                                                  --  nDataAvail/nPeriphRequest
53
        nSelectIn: in std_logic;                                                                                --  1284 Active/nAStrb
54 19 budinero
 
55 10 budinero
 
56 5 budinero
        --  Interno
57
        RST_I: in std_logic;
58
        CLK_I: in std_logic;
59 10 budinero
        DAT_I: in std_logic_vector (7 downto 0);
60
        DAT_O: out std_logic_vector (7 downto 0);
61
        ADR_O: out std_logic_vector (7 downto 0);
62
        CYC_O: out std_logic;
63
        STB_O: out std_logic;
64
        ACK_I: in std_logic ;
65 19 budinero
        WE_O: out std_logic
66 5 budinero
        );
67
end eppwbn;
68
 
69
 
70 10 budinero
architecture structural of eppwbn is
71
  ------------------------------------------------------------------------------
72
        -- Señales
73
        signal s_epp_mode: std_logic_vector (1 downto 0);
74
  signal s_rst_pp: std_logic;
75 9 budinero
 
76 10 budinero
  signal s_wb_Busy:       std_logic;
77
  signal s_wb_nAutoFd:    std_logic;
78
  signal s_wb_nSelectIn:  std_logic;
79
  signal s_wb_nStrobe:    std_logic;
80
 
81
  signal s_ctr_nAck:   std_logic;
82
  signal s_ctr_PError: std_logic;
83
  signal s_ctr_Sel:    std_logic;
84
  signal s_ctr_nFault: std_logic;
85 9 budinero
 
86 10 budinero
  signal s_ctr_nAutoFd:    std_logic;
87
  signal s_ctr_nSelectIn:  std_logic;
88
  signal s_ctr_nStrobe:    std_logic;
89 9 budinero
 
90
 
91
 
92 10 budinero
 
93 9 budinero
 
94 6 budinero
begin
95 22 budinero
 
96
  -- TEMPORAL
97
  epp_mode_monitor <= s_epp_mode;
98
 
99
 
100 10 budinero
        -- Conexión del módulo de control
101
        U1:  eppwbn_ctrl
102
                port map (
103
                        nStrobe => s_ctr_nStrobe,
104
                        Data => Data,
105
                        nAck => s_ctr_nAck,
106
                        PError => s_ctr_PError,
107
                        Sel => s_ctr_Sel,
108
                        nAutoFd => s_ctr_nAutoFd,
109
                        PeriphLogicH => PeriphLogicH,
110
                        nInit => nInit,
111
                        nFault => s_ctr_nFault,
112
                        nSelectIn => s_ctr_nSelectIn,
113
 
114
                        RST_I => RST_I,
115
                        CLK_I => CLK_I,
116
 
117
                        rst_pp => s_rst_pp,
118
                        epp_mode => s_epp_mode
119
        );
120 6 budinero
 
121 14 budinero
        -- Conexión de módulo multiplexor
122 10 budinero
        U2:  eppwbn_epp_side
123
                port map (
124
                        epp_mode => s_epp_mode,
125
 
126
                        ctr_nAck => s_ctr_nAck,
127
                        ctr_PError => s_ctr_PError,
128
                        ctr_Sel => s_ctr_Sel,
129
                        ctr_nFault => s_ctr_nFault,
130
 
131
                        ctr_nAutoFd => s_ctr_nAutoFd,
132
                        ctr_nSelectIn => s_ctr_nSelectIn,
133
                        ctr_nStrobe=> s_ctr_nStrobe,
134
 
135
                        wb_Busy => s_wb_Busy,
136
                        wb_nAutoFd => s_wb_nAutoFd,
137
                        wb_nSelectIn => s_wb_nSelectIn,
138
                        wb_nStrobe => s_wb_nStrobe,
139
 
140
                        nAck => nAck,
141
                        PError => PError,
142
                        Sel => Sel,
143
                        nFault => nFault,
144
 
145
                        Busy => Busy,
146
                        nAutoFd => nAutoFd,
147
                        nSelectIn => nSelectIn,
148
                        nStrobe => nStrobe
149
        );
150
 
151
        -- Conexión del módulo de comunicación con interfaz wishbone
152
        U3:  eppwbn_wbn_side
153
                port map(
154
                        inStrobe => s_wb_nStrobe,
155
                        iData => Data,
156
                        iBusy => s_wb_Busy,
157
                        inAutoFd => s_wb_nAutoFd,
158
                        inSelectIn => s_wb_nSelectIn,
159
 
160
                        RST_I => RST_I,
161
                        CLK_I => CLK_I,
162
                        DAT_I => DAT_I,
163
                        DAT_O => DAT_O,
164
                        ADR_O => ADR_O,
165
                        CYC_O => CYC_O,
166
                        STB_O => STB_O,
167
                        ACK_I => ACK_I,
168
                        WE_O => WE_O,
169
 
170
                        rst_pp => s_rst_pp
171
                );
172
end architecture;

powered by: WebSVN 2.1.0

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