57 use IEEE.STD_LOGIC_1164.
ALL;
58 use IEEE.NUMERIC_STD.
ALL;
101 constant cTREG : time := 2 ns;
104 signal sBus_ClkMts : std_logic;
105 signal sBus_ClkReg : std_logic;
106 signal sBus_ClkRegReg : std_logic;
109 signal sBus_Cs_n : std_logic;
110 signal sBus_We_n : std_logic;
111 signal sBus_Addr : std_logic_vector(gAddrWidth - 1 downto 0);
112 signal sBus_Data : std_logic_vector(gDataWidth - 1 downto 0);
114 signal sEmifReg : std_logic_vector(cDEPTH - 1 downto 0);
117 signal sFab_Data : std_logic_vector(cDEPTH - 1 downto 0);
132 end process pInpBusReg;
137 pBusClkToFabClkReg:
process (
piFab_Clk)
is
142 sBus_ClkReg <= sBus_ClkMts after cTREG;
144 end process pBusClkToFabClkReg;
150 variable vAddr : integer := 0;
152 if (piRst = '1') then
155 sBus_ClkRegReg <= sBus_ClkReg after cTREG;
157 if (sBus_ClkRegReg = '1' and sBus_ClkReg = '0') then
158 if (sBus_Cs_n = '0' and sBus_We_n = '0') then
160 vAddr := to_integer(unsigned(sBus_Addr));
162 sEmifReg(vAddr + 7 downto vAddr) <= sBus_Data;
166 end process pMmioWrReg;
171 pMmioRdComb:
process (sFab_Data, sBus_Addr)
is
172 variable vAddr : integer := 0;
174 vAddr := to_integer(unsigned(sBus_Addr));
176 poBus_Data <= sFab_Data(vAddr + 7 downto vAddr);
177 end process pMmioRdComb;
187 end process pFabInpReg;
in piFab_Datastd_logic_vector( gDataWidth *(2 ** gAddrWidth) - 1 downto 0)
out poBus_Datastd_logic_vector( gDataWidth- 1 downto 0)
out poFab_Datastd_logic_vector( gDataWidth *(2 ** gAddrWidth) - 1 downto 0)
gDefRegValstd_logic_vector
in piBus_Datastd_logic_vector( gDataWidth- 1 downto 0)
in piBus_Addrstd_logic_vector( gAddrWidth- 1 downto 0)