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 19

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
use work.eppwbn_pgk.all;
32
 
33 6 budinero
entity eppwbn is
34 5 budinero
port(
35
        -- Externo
36 10 budinero
        nStrobe: in std_logic;                                                                                  -- Nomenclatura IEEE Std. 1284 
37
                                                                                                                                                                                        -- HostClk/nWrite 
38
        Data: inout std_logic_vector (7 downto 0);       -- AD8..1 (Data1..Data8)
39
        nAck: out std_logic;                                                                                            --  PtrClk/PeriphClk/Intr
40
        busy: out std_logic;                                                                                            --  PtrBusy/PeriphAck/nWait
41
        PError: out std_logic;                                                                                  --  AckData/nAckReverse
42
        Sel: out std_logic;                                                                                             --  XFlag (Select)
43
        nAutoFd: in std_logic;                                                                                  --  HostBusy/HostAck/nDStrb
44
        PeriphLogicH: out std_logic;                                                            --  (Periph Logic High)
45
        nInit: in std_logic;                                                                                            --  nReverseRequest
46
        nFault: out std_logic;                                                                                  --  nDataAvail/nPeriphRequest
47
        nSelectIn: in std_logic;                                                                                --  1284 Active/nAStrb
48 19 budinero
 
49 10 budinero
 
50 5 budinero
        --  Interno
51
        RST_I: in std_logic;
52
        CLK_I: in std_logic;
53 10 budinero
        DAT_I: in std_logic_vector (7 downto 0);
54
        DAT_O: out std_logic_vector (7 downto 0);
55
        ADR_O: out std_logic_vector (7 downto 0);
56
        CYC_O: out std_logic;
57
        STB_O: out std_logic;
58
        ACK_I: in std_logic ;
59 19 budinero
        WE_O: out std_logic
60 5 budinero
        );
61
end eppwbn;
62
 
63
 
64 10 budinero
architecture structural of eppwbn is
65
  ------------------------------------------------------------------------------
66
        -- Señales
67
        signal s_epp_mode: std_logic_vector (1 downto 0);
68
  signal s_rst_pp: std_logic;
69 9 budinero
 
70 10 budinero
  signal s_wb_Busy:       std_logic;
71
  signal s_wb_nAutoFd:    std_logic;
72
  signal s_wb_nSelectIn:  std_logic;
73
  signal s_wb_nStrobe:    std_logic;
74
 
75
  signal s_ctr_nAck:   std_logic;
76
  signal s_ctr_PError: std_logic;
77
  signal s_ctr_Sel:    std_logic;
78
  signal s_ctr_nFault: std_logic;
79 9 budinero
 
80 10 budinero
  signal s_ctr_nAutoFd:    std_logic;
81
  signal s_ctr_nSelectIn:  std_logic;
82
  signal s_ctr_nStrobe:    std_logic;
83 9 budinero
 
84
 
85
 
86 10 budinero
 
87 9 budinero
 
88 6 budinero
begin
89 10 budinero
        -- Conexión del módulo de control
90
        U1:  eppwbn_ctrl
91
                port map (
92
                        nStrobe => s_ctr_nStrobe,
93
                        Data => Data,
94
                        nAck => s_ctr_nAck,
95
                        PError => s_ctr_PError,
96
                        Sel => s_ctr_Sel,
97
                        nAutoFd => s_ctr_nAutoFd,
98
                        PeriphLogicH => PeriphLogicH,
99
                        nInit => nInit,
100
                        nFault => s_ctr_nFault,
101
                        nSelectIn => s_ctr_nSelectIn,
102
 
103
                        RST_I => RST_I,
104
                        CLK_I => CLK_I,
105
 
106
                        rst_pp => s_rst_pp,
107
                        epp_mode => s_epp_mode
108
        );
109 6 budinero
 
110 14 budinero
        -- Conexión de módulo multiplexor
111 10 budinero
        U2:  eppwbn_epp_side
112
                port map (
113
                        epp_mode => s_epp_mode,
114
 
115
                        ctr_nAck => s_ctr_nAck,
116
                        ctr_PError => s_ctr_PError,
117
                        ctr_Sel => s_ctr_Sel,
118
                        ctr_nFault => s_ctr_nFault,
119
 
120
                        ctr_nAutoFd => s_ctr_nAutoFd,
121
                        ctr_nSelectIn => s_ctr_nSelectIn,
122
                        ctr_nStrobe=> s_ctr_nStrobe,
123
 
124
                        wb_Busy => s_wb_Busy,
125
                        wb_nAutoFd => s_wb_nAutoFd,
126
                        wb_nSelectIn => s_wb_nSelectIn,
127
                        wb_nStrobe => s_wb_nStrobe,
128
 
129
                        nAck => nAck,
130
                        PError => PError,
131
                        Sel => Sel,
132
                        nFault => nFault,
133
 
134
                        Busy => Busy,
135
                        nAutoFd => nAutoFd,
136
                        nSelectIn => nSelectIn,
137
                        nStrobe => nStrobe
138
        );
139
 
140
        -- Conexión del módulo de comunicación con interfaz wishbone
141
        U3:  eppwbn_wbn_side
142
                port map(
143
                        inStrobe => s_wb_nStrobe,
144
                        iData => Data,
145
                        iBusy => s_wb_Busy,
146
                        inAutoFd => s_wb_nAutoFd,
147
                        inSelectIn => s_wb_nSelectIn,
148
 
149
                        RST_I => RST_I,
150
                        CLK_I => CLK_I,
151
                        DAT_I => DAT_I,
152
                        DAT_O => DAT_O,
153
                        ADR_O => ADR_O,
154
                        CYC_O => CYC_O,
155
                        STB_O => STB_O,
156
                        ACK_I => ACK_I,
157
                        WE_O => WE_O,
158
 
159
                        rst_pp => s_rst_pp
160
                );
161
end architecture;

powered by: WebSVN 2.1.0

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