--|-----------------------------------------------------------------------------
|
--|-----------------------------------------------------------------------------
|
--| UNSL - Modular Oscilloscope
|
--| UNSL - Modular Oscilloscope
|
--|
|
--|
|
--| File: eppwbn_test.vhd
|
--| File: eppwbn_test.vhd
|
--| Version: 0.10
|
--| Version: 0.10
|
--| Targeted device: Actel A3PE1500
|
--| Targeted device: 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
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
--| 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_pgk.all;
|
|
|
|
|
|
|
entity eppwbn_test is
|
entity eppwbn_test is
|
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)
|
nAck: out std_logic; -- PtrClk/PeriphClk/Intr
|
nAck: out std_logic; -- PtrClk/PeriphClk/Intr
|
busy: out std_logic; -- PtrBusy/PeriphAck/nWait
|
busy: out std_logic; -- PtrBusy/PeriphAck/nWait
|
PError: out std_logic; -- AckData/nAckReverse
|
PError: out std_logic; -- AckData/nAckReverse
|
Sel: out std_logic; -- XFlag (Select)
|
Sel: out std_logic; -- XFlag (Select)
|
nAutoFd: in std_logic; -- HostBusy/HostAck/nDStrb
|
nAutoFd: in std_logic; -- HostBusy/HostAck/nDStrb
|
PeriphLogicH: out std_logic; -- (Periph Logic High)
|
PeriphLogicH: out std_logic; -- (Periph Logic High)
|
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;
|
|
|
-- al clock
|
-- al clock
|
clk: in std_logic
|
clk: in std_logic
|
|
|
);
|
);
|
end eppwbn_test;
|
end eppwbn_test;
|
|
|
architecture eppwbn_test_arch0 of eppwbn_test is
|
architecture eppwbn_test_arch0 of eppwbn_test is
|
|
|
signal DAT_I_master: std_logic_vector (7 downto 0);
|
signal DAT_I_master: std_logic_vector (7 downto 0);
|
signal DAT_O_master: std_logic_vector (7 downto 0);
|
signal DAT_O_master: std_logic_vector (7 downto 0);
|
signal ADR_O_master: std_logic_vector (7 downto 0);
|
signal ADR_O_master: std_logic_vector (7 downto 0);
|
signal CYC_O_master: std_logic;
|
signal CYC_O_master: std_logic;
|
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;
|
|
|
begin
|
begin
|
|
|
SL_MEM1: eppwbn_test_wb_side port map(
|
SL_MEM1: eppwbn_test_wb_side port map(
|
RST_I => rst,
|
RST_I => rst,
|
CLK_I => clk,
|
CLK_I => clk,
|
DAT_I => DAT_O_master,
|
DAT_I => DAT_O_master,
|
DAT_O => DAT_I_master,
|
DAT_O => DAT_I_master,
|
ADR_I => ADR_O_master,
|
ADR_I => ADR_O_master,
|
CYC_I => CYC_O_master,
|
CYC_I => CYC_O_master,
|
STB_I => STB_O_master,
|
STB_I => STB_O_master,
|
ACK_O => ACK_I_master,
|
ACK_O => ACK_I_master,
|
WE_I => WE_O_master
|
WE_I => WE_O_master
|
);
|
);
|
|
|
MA_EPP: eppwbn port map(
|
MA_EPP: eppwbn port map(
|
-- Externo
|
-- Externo
|
nStrobe => nStrobe,
|
nStrobe => nStrobe,
|
Data => nStrobe,
|
Data => Data,
|
nAck => nAck,
|
nAck => nAck,
|
busy => busy,
|
busy => busy,
|
PError => PError,
|
PError => PError,
|
Sel => Sel,
|
Sel => Sel,
|
nAutoFd => nAutoFd,
|
nAutoFd => nAutoFd,
|
PeriphLogicH => PeriphLogicH,
|
PeriphLogicH => PeriphLogicH,
|
nInit => nInit,
|
nInit => nInit,
|
nFault => nFault,
|
nFault => nFault,
|
nSelectIn => nSelectIn,
|
nSelectIn => nSelectIn,
|
-- Interno
|
-- Interno
|
RST_I => rst,
|
RST_I => rst,
|
CLK_I => clk,
|
CLK_I => clk,
|
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
|
);
|
);
|
|
|
end architecture eppwbn_test_wb_arch0;
|
|
No newline at end of file
|
No newline at end of file
|
|
end architecture eppwbn_test_arch0;
|
No newline at end of file
|
No newline at end of file
|