Line 1... |
Line 1... |
--|-----------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------100
|
--| UNSL - Modular Oscilloscope
|
--| Modular Oscilloscope
|
|
--| UNSL - Argentine
|
--|
|
--|
|
--| File: eppwbn_test.vhd
|
--| File: eppwbn_test.vhd
|
--| Version: 0.10
|
--| Version: 0.60
|
--| Targeted device: Actel A3PE1500
|
--| Tested in: Actel APA300, Actel A3PE1500
|
--|-----------------------------------------------------------------------------
|
--|-------------------------------------------------------------------------------------------------
|
--| Description:
|
--| Description:
|
--| EPP - Wishbone bridge.
|
--| EPP - Wishbone bridge.
|
--| This file is only for test purposes
|
--| This file is only for test purposes
|
--|
|
--|
|
--------------------------------------------------------------------------------
|
--|-------------------------------------------------------------------------------------------------
|
--| File history:
|
--| File history:
|
--| 0.10 | jan-2008 | First release
|
--| 0.10 | jan-2008 | First release
|
--------------------------------------------------------------------------------
|
--| 0.50 | jun-2009 | Sample testing signals
|
|
--| 0.60 | jun-2009 | Sample testing instance for a dual port memory
|
|
----------------------------------------------------------------------------------------------------
|
--| Copyright ® 2008, Facundo Aguilera.
|
--| Copyright ® 2008, Facundo Aguilera.
|
--|
|
--|
|
--| This VHDL design file is an open design; you can redistribute it and/or
|
--| This VHDL design file is an open design; you can redistribute it and/or
|
--| modify it and/or implement it after contacting the author.
|
--| modify it and/or implement it after contacting the author.
|
|
----------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
library IEEE;
|
library IEEE;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use work.eppwbn_pgk.all;
|
use work.eppwbn_pkg.all;
|
|
|
|
|
|
|
entity eppwbn_16bit_test is
|
entity eppwbn_16bit_test is
|
|
generic(
|
|
-- Memoria hecha con registros puede causar módulos demasiado grandes.
|
|
-- Limitar el tamaño reduciéndo el tamaño del bus de direcciones
|
|
ADD_WIDTH: integer := 4 -- máximo: 8
|
|
);
|
port(
|
port(
|
-- al puerto EPP
|
-- al puerto EPP
|
nStrobe: in std_logic; -- Nomenclatura IEEE Std. 1284
|
nStrobe: in std_logic; -- Nomenclatura IEEE Std. 1284
|
-- HostClk/nWrite
|
-- HostClk/nWrite
|
Data: inout std_logic_vector (7 downto 0); -- AD8..1 (Data1..Data8)
|
Data: inout std_logic_vector (7 downto 0); -- AD8..1 (Data1..Data8)
|
Line 40... |
Line 51... |
nInit: in std_logic; -- nReverseRequest
|
nInit: in std_logic; -- nReverseRequest
|
nFault: out std_logic; -- nDataAvail/nPeriphRequest
|
nFault: out std_logic; -- nDataAvail/nPeriphRequest
|
nSelectIn: in std_logic; -- 1284 Active/nAStrb
|
nSelectIn: in std_logic; -- 1284 Active/nAStrb
|
|
|
-- a los switches
|
-- a los switches
|
rst: in std_logic;
|
rst: in std_logic; -- ATENCIÓN: entrada rst activo por bajo en instancia
|
|
|
-- al clock
|
-- al clock
|
clk: in std_logic
|
clk: in std_logic;
|
|
|
|
|
|
|
|
-- monitores
|
|
display_cat: out std_logic;
|
|
data_monitor: out std_logic_vector (3 downto 0);
|
|
select_nibble: in std_logic; -- Select data nibble. High: high nibble, low: ...
|
|
epp_mode_monitor: out std_logic_vector (1 downto 0);
|
|
nSelectIn_monitor:out std_logic;
|
|
nAutoFd_monitor: out std_logic;
|
|
nStrobe_monitor: out std_logic
|
|
|
|
|
|
|
);
|
);
|
end eppwbn_16bit_test;
|
end eppwbn_16bit_test;
|
|
|
architecture eppwbn_test_arch0 of eppwbn_16bit_test is
|
architecture eppwbn_test_arch0 of eppwbn_16bit_test is
|
Line 59... |
Line 83... |
signal STB_O_master: std_logic;
|
signal STB_O_master: std_logic;
|
signal ACK_I_master: std_logic;
|
signal ACK_I_master: std_logic;
|
signal WE_O_master: std_logic;
|
signal WE_O_master: std_logic;
|
signal clk_pll: std_logic;
|
signal clk_pll: std_logic;
|
|
|
|
signal gnd: std_logic;
|
|
signal s_not_rst: std_logic;
|
|
signal s_not_epp_mode: std_logic_vector (1 downto 0);
|
|
signal s_to_mem_ADR_I_a: std_logic_vector(13 downto 0);
|
|
|
begin
|
begin
|
|
|
SL_MEM1: eppwbn_16bit_test_wb_side
|
gnd <= '0';
|
generic map(
|
s_not_rst <= not(rst);
|
ADD_WIDTH => 8 ,
|
data_monitor <= Data(7 downto 4) when select_nibble = '1' else
|
WIDTH => 16
|
Data(3 downto 0);
|
|
display_cat <= '0';
|
|
epp_mode_monitor <= not(s_not_epp_mode);
|
|
|
|
|
|
nSelectIn_monitor <= nSelectIn;
|
|
nAutoFd_monitor <= nAutoFd;
|
|
nStrobe_monitor <= nStrobe;
|
|
|
)
|
|
|
|
port map(
|
|
RST_I => rst,
|
|
CLK_I => clk_pll,
|
-- SL_MEM1: eppwbn_16bit_test_wb_side
|
DAT_I => DAT_O_master,
|
-- generic map(
|
DAT_O => DAT_I_master,
|
-- ADD_WIDTH => ADD_WIDTH ,
|
ADR_I => ADR_O_master,
|
-- WIDTH => 16
|
CYC_I => CYC_O_master,
|
-- )
|
STB_I => STB_O_master,
|
-- port map(
|
ACK_O => ACK_I_master,
|
-- RST_I => s_not_rst,
|
WE_I => WE_O_master
|
-- CLK_I => clk_pll,
|
|
-- DAT_I => DAT_O_master,
|
|
-- DAT_O => DAT_I_master,
|
|
-- ADR_I => ADR_O_master(ADD_WIDTH - 1 downto 0),
|
|
-- CYC_I => CYC_O_master,
|
|
-- STB_I => STB_O_master,
|
|
-- ACK_O => ACK_I_master,
|
|
-- WE_I => WE_O_master
|
|
-- );
|
|
|
|
|
|
s_to_mem_ADR_I_a <= (13 downto 8 => '0') & ADR_O_master;
|
|
SL_MEM2: dual_port_memory_wb port map(
|
|
-- Puerto A
|
|
RST_I_a => s_not_rst,
|
|
CLK_I_a => clk_pll,
|
|
DAT_I_a => DAT_O_master,
|
|
DAT_O_a => DAT_I_master,
|
|
ADR_I_a => s_to_mem_ADR_I_a,
|
|
CYC_I_a => CYC_O_master,
|
|
STB_I_a => STB_O_master,
|
|
ACK_O_a => ACK_I_master,
|
|
WE_I_a => WE_O_master,
|
|
|
|
|
|
-- Puerto B
|
|
RST_I_b => s_not_rst,
|
|
CLK_I_b => '0',
|
|
DAT_I_b => (others => '0'),
|
|
|
|
ADR_I_b => (others => '0'),
|
|
CYC_I_b => '0',
|
|
STB_I_b => '0',
|
|
|
|
WE_I_b => '0'
|
);
|
);
|
|
|
|
|
|
|
MA_EPP: eppwbn_16bit port map(
|
MA_EPP: eppwbn_16bit port map(
|
-- Externo
|
-- Externo
|
nStrobe => nStrobe,
|
nStrobe => nStrobe,
|
Data => Data,
|
Data => Data,
|
nAck => nAck,
|
nAck => nAck,
|
Line 94... |
Line 165... |
PeriphLogicH => PeriphLogicH,
|
PeriphLogicH => PeriphLogicH,
|
nInit => nInit,
|
nInit => nInit,
|
nFault => nFault,
|
nFault => nFault,
|
nSelectIn => nSelectIn,
|
nSelectIn => nSelectIn,
|
-- Interno
|
-- Interno
|
RST_I => rst,
|
RST_I => s_not_rst,
|
CLK_I => clk_pll,
|
CLK_I => clk_pll,
|
DAT_I => DAT_I_master,
|
DAT_I => DAT_I_master,
|
DAT_O => DAT_O_master,
|
DAT_O => DAT_O_master,
|
ADR_O => ADR_O_master,
|
ADR_O => ADR_O_master,
|
CYC_O => CYC_O_master,
|
CYC_O => CYC_O_master,
|
STB_O => STB_O_master,
|
STB_O => STB_O_master,
|
ACK_I => ACK_I_master,
|
ACK_I => ACK_I_master,
|
WE_O => WE_O_master
|
WE_O => WE_O_master,
|
|
|
|
-- MONITORES
|
|
-- TEMPORAL
|
|
epp_mode_monitor => s_not_epp_mode
|
);
|
);
|
|
|
PLL_0: pll port map(
|
|
GLB => clk_pll,
|
|
CLK => clk
|
PLL_0: component A3PE_pll
|
|
port map(
|
|
POWERDOWN => '0',
|
|
CLKA => clk,
|
|
LOCK => open,
|
|
--SDIN => '0',
|
|
--SCLK => '0',
|
|
--SSHIFT => '0',
|
|
--SUPDATE => '0',
|
|
--MODE => '0',
|
|
GLA => clk_pll
|
|
--SDOUT => open
|
);
|
);
|
|
|
|
|
|
|
end architecture eppwbn_test_arch0;
|
end architecture eppwbn_test_arch0;
|
No newline at end of file
|
No newline at end of file
|