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

Subversion Repositories modular_oscilloscope

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 budinero
--|------------------------------------------------------------------------------
2
--| UNSL - Modular Oscilloscope
3
--|
4
--| File: eppwbn_epp_side.vhd
5
--| Version: 0.01
6
--| Targeted device: Actel A3PE1500
7
--|------------------------------------------------------------------------------
8
--| Description:
9
--|     EPP - Wishbone bridge.
10
--|     EPP module output control (IEEE Std. 1284-2000).
11
-------------------------------------------------------------------------------
12
--| File history:
13
--|     0.01    | nov-2008 | First release
14
--------------------------------------------------------------------------------
15
--| Copyright ® 2008, Facundo Aguilera.
16
--|
17
--| This VHDL design file is an open design; you can redistribute it and/or
18 22 budinero
--| modify it and/or implement it after contacting the author.
19 19 budinero
 
20
 
21
library IEEE;
22
use IEEE.STD_LOGIC_1164.ALL;
23
 
24
entity eppwbn_epp_side is
25
port(
26
 
27
  -- Selección de modo
28
  epp_mode: in std_logic_vector (1 downto 0);-- indicador de modo de comunicación epp
29
    -- "00" deshabilitado
30
    -- "01" inicial (señales de usuario e interrupciones deshabilitadas)
31
    -- "10" sin definir
32
    -- "11" modo EPP normal
33
 
34
  -- CTRL signals
35
        ctr_nAck:   in std_logic;                  -- PtrClk/PeriphClk/Intr
36
        ctr_PError: in std_logic;                  -- AckData/nAckReverse
37
        ctr_Sel:    in std_logic;                  -- XFlag (Select). Select no puede usarse
38
        ctr_nFault: in std_logic;                  -- nDataAvail/nPeriphRequest
39
 
40
  ctr_nAutoFd:    out std_logic;               -- HostBusy/HostAck/nDStrb
41
        ctr_nSelectIn:  out std_logic;               -- 1284 Active/nAStrb
42
  ctr_nStrobe:    out std_logic;               -- HostClk/nWrite
43
 
44
        -- WB-side signals
45
        wb_Busy:       in std_logic;              -- PtrBusy/PeriphAck/nWait
46
  wb_nAutoFd:    out std_logic;               -- HostBusy/HostAck/nDStrb
47
        wb_nSelectIn:  out std_logic;               -- 1284 Active/nAStrb
48
        wb_nStrobe:    out std_logic;               -- HostClk/nWrite
49
    -- No están implementadas las señales personalizadas
50
 
51
  -- To EPP port
52
        nAck:   out std_logic;                  -- PtrClk/PeriphClk/Intr
53
        PError: out std_logic;                  -- AckData/nAckReverse
54
        Sel:    out std_logic;                  -- XFlag (Select). Select no puede usarse
55
        nFault: out std_logic;                  -- nDataAvail/nPeriphRequest
56
 
57
  Busy:      out std_logic;                 -- PtrBusy/PeriphAck/nWait
58
        nAutoFd:   in std_logic;                  -- HostBusy/HostAck/nDStrb
59
        nSelectIn: in std_logic;                  -- 1284 Active/nAStrb
60
        nStrobe:   in std_logic                  -- HostClk/nWrite
61
 
62
);
63
end entity eppwbn_epp_side;
64
 
65
architecture multiplexor of eppwbn_epp_side is
66
 
67
begin
68
 
69
  -- Puentes
70
  --  Son incorporados en un módulo para facilitar modificaciones
71 22 budinero
 
72 19 budinero
 
73
  ctr_nAutoFd <= nAutoFd;
74
  ctr_nSelectIn <= nSelectIn;
75
  ctr_nStrobe <= nStrobe;
76
 
77
  -- Selección de salidas desde el módulo EPP cuando epp_mode = "11"
78
  --  Como no están implementadas las señales personalizadas se escribe "0000"
79
  multiplexing: process (epp_mode ,ctr_nAck, ctr_PError, ctr_Sel, ctr_nFault,
80 22 budinero
                                                nAutoFd, nSelectIn, nStrobe, wb_Busy) begin
81 19 budinero
    case epp_mode is
82
 
83
      when "11" =>
84
        -- Hacia el host
85
        nAck <= '1'; -- No están implementadas las señales personalizadas
86
        PError <= '0';
87
        Sel <= '0';
88
        nFault <= '0';
89
 
90
        -- Hacia el módulo EPP
91
        wb_nAutoFd <= nAutoFd;
92
        wb_nSelectIn <= nSelectIn;
93
        wb_nStrobe <= nStrobe;
94 22 budinero
        Busy <= wb_Busy;
95 19 budinero
 
96
      when "01" =>
97
        -- Hacia el host
98
        nAck <= ctr_nAck;
99
        PError <= ctr_PError;
100
        Sel <= ctr_Sel;
101
        nFault <= ctr_nFault;
102
 
103
        -- Hacia el módulo EPP
104
        wb_nAutoFd <= nAutoFd;
105
        wb_nSelectIn <= nSelectIn;
106
        wb_nStrobe <= nStrobe;
107 22 budinero
        Busy <= wb_Busy;
108 19 budinero
 
109
      when others =>
110
        -- Hacia el host
111
        nAck <= ctr_nAck;
112
        PError <= ctr_PError;
113
        Sel <= ctr_Sel;
114
        nFault <= ctr_nFault;
115
 
116
        -- Hacia el módulo EPP
117
        wb_nAutoFd <= '1';
118
        wb_nSelectIn <= '1';
119
        wb_nStrobe <= '1';
120 22 budinero
        Busy <= '0';
121 19 budinero
    end case;
122
  end process;
123
 
124
end architecture multiplexor;
125
 
126
 
127
 
128
 

powered by: WebSVN 2.1.0

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