48use ieee.std_logic_1164.
all;
49use ieee.numeric_std.
all;
97 signal R_MMR0 : mmu_mmr0_type := mmu_mmr0_init;
98 signal N_MMR0 : mmu_mmr0_type := mmu_mmr0_init;
100 signal R_MMR3 : mmu_mmr3_type := mmu_mmr3_init;
114 signal PARPDR : parpdr_type := parpdr_init;
164 variable mmr0out : slv16 := (others=>'0');
165 variable mmr3out : slv16 := (others=>'0');
169 mmr0out := (others=>'0');
183 mmr3out := (others=>'0');
197 end process proc_ibres;
201 if rising_edge(CLK) then
208 end process proc_mmr0;
212 if rising_edge(CLK) then
225 end process proc_mmr3;
229 variable ipaddrh : slv16 := (others=>'0');
230 variable dspace_ok : slbit := '0';
231 variable dspace_en : slbit := '0';
232 variable apf : slv3 := (others=>'0');
233 variable bn : slv7 := (others=>'0');
234 variable iapn : slv4 := (others=>'0');
238 apf := VADDR(15 downto 13);
239 bn := VADDR(12 downto 6);
243 when "00" => dspace_en := R_MMR3.dspace_km;
244 when "01" => dspace_en := R_MMR3.dspace_sm;
245 when "11" => dspace_en := R_MMR3.dspace_um;
248 dspace_ok := CNTL.dspace and dspace_en;
250 iapn(3) := dspace_ok;
251 iapn(2 downto 0) := apf;
253 ipaddrh := slv(unsigned("000000000"&bn) + unsigned(PARPDR.paf));
259 end process proc_paddr;
264 variable nmmr0 : mmu_mmr0_type := mmu_mmr0_init;
265 variable apf : slv3 := (others=>'0');
266 variable bn : slv7 := (others=>'0');
267 variable abo_nonres : slbit := '0';
268 variable abo_length : slbit := '0';
269 variable abo_rdonly : slbit := '0';
270 variable mmr_freeze : slbit := '0';
271 variable doabort : slbit := '0';
272 variable dotrap : slbit := '0';
273 variable dotrace : slbit := '0';
274 variable iswrite : slbit := '0';
285 dotrace := not(CNTL.cacc or mmr_freeze);
288 apf := VADDR(15 downto 13);
289 bn := VADDR(12 downto 6);
298 if unsigned(bn) > unsigned(PARPDR.plf) then
302 if unsigned(bn) < unsigned(PARPDR.plf) then
336 dotrap := not iswrite;
355 STAT <= mmu_stat_init;
370 elsif R_MMR0.ena_mmu='1' and CNTL.cacc='0' then
372 if mmr_freeze = '0' then
373 nmmr0.inst_compl := MONI.vflow;
376 if CNTL.req = '1' then
378 if mmr_freeze = '0' then
379 nmmr0.abo_nonres := abo_nonres;
380 nmmr0.abo_length := abo_length;
381 nmmr0.abo_rdonly := abo_rdonly;
382 nmmr0.page_dspace := DSPACE;
383 nmmr0.page_num := apf;
384 nmmr0.page_mode := CNTL.mode;
386 doabort := abo_nonres or abo_length or abo_rdonly;
388 if doabort = '0' then
392 nmmr0.trap_mmu := '1';
402 nmmr0.trace_prev := dotrace;
404 if MONI.trace_prev = '0' then
413 STAT.vaok <= not doabort;
422 end process proc_nmmr0;
in IB_SRES_2 ib_sres_type := ib_sres_init
in IB_SRES_3 ib_sres_type := ib_sres_init
out IB_SRES_OR ib_sres_type
in IB_SRES_1 ib_sres_type
parpdr_type := parpdr_init PARPDR
ib_sres_type := ib_sres_init IB_SRES_MMR12
integer := 15 mmr0_ibf_abo_nonres
integer := 1 mmr3_ibf_dspace_sm
integer := 4 mmr0_ibf_page_dspace
ib_sres_type := ib_sres_init IB_SRES_MMR03
integer := 2 mmr3_ibf_dspace_km
integer := 5 mmr3_ibf_ena_ubmap
slv16 := slv( to_unsigned( 8#172516#, 16) ) ibaddr_mmr3
ib_sres_type := ib_sres_init IB_SRES_PADR
slv16 := slv( to_unsigned( 8#177572#, 16) ) ibaddr_mmr0
mmu_mmr3_type := mmu_mmr3_init R_MMR3
integer range 6 downto 5 mmr0_ibf_page_mode
integer := 4 mmr3_ibf_ena_22bit
integer range 3 downto 1 mmr0_ibf_page_num
mmu_mmr0_type := mmu_mmr0_init N_MMR0
mmu_mmr0_type := mmu_mmr0_init R_MMR0
integer := 14 mmr0_ibf_abo_length
integer := 12 mmr0_ibf_trap_mmu
integer := 0 mmr3_ibf_dspace_um
integer := 9 mmr0_ibf_ena_trap
integer := 0 mmr0_ibf_ena_mmu
integer := 13 mmr0_ibf_abo_rdonly
integer := 7 mmr0_ibf_inst_compl
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 6 downto 0) slv7
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16