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 54

Go to most recent revision | 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
  SL_MEM2: dual_port_memory_wb port map(
132
    -- Puerto A 
133
    RST_I_a => s_not_rst,
134
    CLK_I_a => clk_pll,
135
    DAT_I_a => DAT_O_master,
136
    DAT_O_a => DAT_I_master,
137
    ADR_I_a => s_to_mem_ADR_I_a,
138
    CYC_I_a => CYC_O_master,
139
    STB_I_a => STB_O_master,
140
    ACK_O_a => ACK_I_master,
141
    WE_I_a  => WE_O_master,
142
 
143
 
144
    -- Puerto B 
145
    RST_I_b => s_not_rst,
146
    CLK_I_b => '0',
147
    DAT_I_b => (others => '0'),
148
 
149
    ADR_I_b => (others => '0'),
150
    CYC_I_b => '0',
151
    STB_I_b => '0',
152
 
153
    WE_I_b  => '0'
154
  );
155
 
156
 
157
 
158
  MA_EPP: eppwbn_16bit port map(
159
      -- Externo
160
      nStrobe   => nStrobe,
161
      Data      => Data,
162
      nAck      => nAck,
163
      busy      => busy,
164
      PError    => PError,
165
      Sel       => Sel,
166
      nAutoFd   => nAutoFd,
167
      PeriphLogicH => PeriphLogicH,
168
      nInit     => nInit,
169
      nFault    => nFault,
170
      nSelectIn => nSelectIn,
171
      --  Interno
172
      RST_I => s_not_rst,
173
      CLK_I => clk_pll,
174
      DAT_I => DAT_I_master,
175
      DAT_O => DAT_O_master,
176
      ADR_O => ADR_O_master,
177
      CYC_O => CYC_O_master,
178
      STB_O => STB_O_master,
179
      ACK_I => ACK_I_master,
180
      WE_O  => WE_O_master,
181
 
182
      -- MONITORES
183
      -- TEMPORAL
184
      epp_mode_monitor => s_not_epp_mode
185
    );
186
 
187
 
188
 
189
  PLL_0: component A3PE_pll
190
  port map(
191
    POWERDOWN       =>  '0',
192
    CLKA            =>  clk,
193
    LOCK            =>  open,
194
    --SDIN            =>  '0',
195
    --SCLK            =>  '0',
196
    --SSHIFT          =>  '0',
197
    --SUPDATE         =>  '0',
198
    --MODE            =>  '0',
199
    GLA             =>  clk_pll
200
    --SDOUT           =>  open
201
  );
202
 
203
 
204
 
205 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.