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

Subversion Repositories modular_oscilloscope

[/] [modular_oscilloscope/] [trunk/] [hdl/] [epp/] [eppwbn_16bit_test.vhd] - Blame information for rev 57

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 budinero
-------------------------------------------------------------------------------------------------100
2
--| Modular Oscilloscope
3
--| UNSL - Argentine
4
--|
5
--| File: eppwbn_test.vhd
6
--| Version: 0.60
7 41 budinero
--| Tested in: Actel APA300
8
--| Tested in: Actel A3PE1500
9
--|   Board: RVI Prototype Board + LP Data Conversion Daughter Board
10 22 budinero
--|-------------------------------------------------------------------------------------------------
11
--| Description:
12
--|   EPP - Wishbone bridge. 
13 41 budinero
--|   This file is only for test purposes
14 22 budinero
--|   
15
--|-------------------------------------------------------------------------------------------------
16
--| File history:
17
--|   0.10   | jan-2008 | First release
18 41 budinero
--|   0.50   | jun-2009 | Testing signals
19
--|   0.60   | jun-2009 | Testing instance for the dual port memory
20 22 budinero
----------------------------------------------------------------------------------------------------
21
--| Copyright ® 2008, Facundo Aguilera.
22
--|
23
--| This VHDL design file is an open design; you can redistribute it and/or
24
--| modify it and/or implement it after contacting the author.
25
----------------------------------------------------------------------------------------------------
26
 
27
 
28
 
29
 
30
library IEEE;
31
use IEEE.STD_LOGIC_1164.ALL;
32
use work.eppwbn_pkg.all;
33
 
34
 
35
 
36
entity eppwbn_16bit_test is
37
  generic(
38
    -- Memoria hecha con registros puede causar módulos demasiado grandes.
39
    -- Limitar el tamaño reduciéndo el tamaño del bus de direcciones
40
    ADD_WIDTH: integer := 4 -- máximo: 8
41
    );
42
  port(
43
    -- al puerto EPP
44
    nStrobe:    in std_logic;                                                                                   -- Nomenclatura IEEE Std. 1284 
45
                                                -- HostClk/nWrite 
46
    Data:       inout std_logic_vector (7 downto 0);     -- AD8..1 (Data1..Data8)
47
    nAck:       out std_logic;                                                                                          --  PtrClk/PeriphClk/Intr
48
    busy:       out std_logic;                                                                                          --  PtrBusy/PeriphAck/nWait
49
    PError:     out std_logic;                                                                          --  AckData/nAckReverse
50
    Sel:        out std_logic;                                                                          --  XFlag (Select)
51
    nAutoFd:    in std_logic;                                                                           --  HostBusy/HostAck/nDStrb
52
    PeriphLogicH: out std_logic;                                                                --  (Periph Logic High)
53
    nInit:      in std_logic;                                                                           --  nReverseRequest
54
    nFault:     out std_logic;                                                                          --  nDataAvail/nPeriphRequest
55
    nSelectIn:  in std_logic;                                                                           --  1284 Active/nAStrb
56
 
57
    -- a los switches
58
    rst:        in std_logic;   -- ATENCIÓN: entrada rst activo por bajo en instancia
59
 
60
    -- al clock
61
    clk:        in std_logic;
62
 
63
 
64
 
65
    -- monitores
66
    display_cat:      out std_logic;
67
    data_monitor:     out std_logic_vector (3 downto 0);
68
    select_nibble:    in std_logic; -- Select data nibble. High: high nibble, low: ...
69
    epp_mode_monitor: out std_logic_vector (1 downto 0);
70
    nSelectIn_monitor:out std_logic;
71
    nAutoFd_monitor:  out std_logic;
72
    nStrobe_monitor:  out std_logic
73
 
74
 
75
 
76
        );
77
end eppwbn_16bit_test;
78
 
79
architecture eppwbn_test_arch0 of eppwbn_16bit_test is
80
 
81
  signal DAT_I_master:  std_logic_vector (15 downto 0);
82
  signal DAT_O_master:  std_logic_vector (15 downto 0);
83
  signal ADR_O_master:  std_logic_vector (7 downto 0);
84
  signal CYC_O_master:  std_logic;
85
  signal STB_O_master:  std_logic;
86
  signal ACK_I_master:  std_logic;
87
  signal WE_O_master:   std_logic;
88
  signal clk_pll:       std_logic;
89
 
90
  signal gnd:           std_logic;
91
  signal s_not_rst:       std_logic;
92
  signal s_not_epp_mode: std_logic_vector (1 downto 0);
93
  signal s_to_mem_ADR_I_a: std_logic_vector(13 downto 0);
94
 
95
begin
96
 
97
  gnd <= '0';
98
  s_not_rst <= not(rst);
99
  data_monitor <= Data(7 downto 4) when select_nibble = '1' else
100
                  Data(3 downto 0);
101
  display_cat <= '0';
102
  epp_mode_monitor <= not(s_not_epp_mode);
103
 
104
 
105
  nSelectIn_monitor <= nSelectIn;
106
  nAutoFd_monitor <= nAutoFd;
107
  nStrobe_monitor <= nStrobe;
108
 
109
 
110
 
111
 
112
--   SL_MEM1: eppwbn_16bit_test_wb_side 
113
--   generic map(
114
--     ADD_WIDTH   => ADD_WIDTH ,
115
--     WIDTH      => 16
116
--     )
117
--   port map(
118
--       RST_I => s_not_rst,
119
--       CLK_I => clk_pll,
120
--       DAT_I => DAT_O_master,
121
--       DAT_O => DAT_I_master,
122
--       ADR_I => ADR_O_master(ADD_WIDTH - 1 downto 0),
123
--       CYC_I => CYC_O_master,
124
--       STB_I => STB_O_master,
125
--       ACK_O => ACK_I_master,
126
--       WE_I  => WE_O_master
127
--     );
128
 
129
 
130
  s_to_mem_ADR_I_a <= (13 downto 8 => '0') & ADR_O_master;
131 57 budinero
 
132 22 budinero
  SL_MEM2: dual_port_memory_wb port map(
133
    -- Puerto A 
134
    RST_I_a => s_not_rst,
135
    CLK_I_a => clk_pll,
136
    DAT_I_a => DAT_O_master,
137
    DAT_O_a => DAT_I_master,
138
    ADR_I_a => s_to_mem_ADR_I_a,
139
    CYC_I_a => CYC_O_master,
140
    STB_I_a => STB_O_master,
141
    ACK_O_a => ACK_I_master,
142
    WE_I_a  => WE_O_master,
143
 
144
 
145
    -- Puerto B 
146
    RST_I_b => s_not_rst,
147
    CLK_I_b => '0',
148
    DAT_I_b => (others => '0'),
149
 
150
    ADR_I_b => (others => '0'),
151
    CYC_I_b => '0',
152
    STB_I_b => '0',
153
 
154
    WE_I_b  => '0'
155
  );
156
 
157
 
158
 
159
  MA_EPP: eppwbn_16bit port map(
160
      -- Externo
161
      nStrobe   => nStrobe,
162
      Data      => Data,
163
      nAck      => nAck,
164
      busy      => busy,
165
      PError    => PError,
166
      Sel       => Sel,
167
      nAutoFd   => nAutoFd,
168
      PeriphLogicH => PeriphLogicH,
169
      nInit     => nInit,
170
      nFault    => nFault,
171
      nSelectIn => nSelectIn,
172
      --  Interno
173
      RST_I => s_not_rst,
174
      CLK_I => clk_pll,
175
      DAT_I => DAT_I_master,
176
      DAT_O => DAT_O_master,
177
      ADR_O => ADR_O_master,
178
      CYC_O => CYC_O_master,
179
      STB_O => STB_O_master,
180
      ACK_I => ACK_I_master,
181 57 budinero
      WE_O  => WE_O_master
182 22 budinero
 
183
      -- MONITORES
184
      -- TEMPORAL
185 57 budinero
      --epp_mode_monitor => s_not_epp_mode
186 22 budinero
    );
187
 
188
 
189
 
190
  PLL_0: component A3PE_pll
191
  port map(
192
    POWERDOWN       =>  '0',
193
    CLKA            =>  clk,
194
    LOCK            =>  open,
195
    --SDIN            =>  '0',
196
    --SCLK            =>  '0',
197
    --SSHIFT          =>  '0',
198
    --SUPDATE         =>  '0',
199
    --MODE            =>  '0',
200
    GLA             =>  clk_pll
201
    --SDOUT           =>  open
202
  );
203
 
204
 
205
 
206 19 budinero
end architecture eppwbn_test_arch0;

powered by: WebSVN 2.1.0

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