for r in0to PMP_NUM_REGIONS-1loop-- iterate over all regions
for r in0to PMP_NUM_REGIONS-1loop-- iterate over all regions
if((priv_mode_i = u_priv_mode_c)or(pmp_ctrl_i(r)(pmp_cfg_l_c)= '1'))and-- user privilege level or locked pmp entry -> enforce permissions also for machine mode
if((priv_mode_i = priv_mode_u_c)or(pmp_ctrl_i(r)(pmp_cfg_l_c)= '1'))and-- user privilege level or locked pmp entry -> enforce permissions also for machine mode
(pmp_ctrl_i(r)(pmp_cfg_ah_c downto pmp_cfg_al_c) /= pmp_off_mode_c)then-- active entry
(pmp_ctrl_i(r)(pmp_cfg_ah_c downto pmp_cfg_al_c) /= pmp_off_mode_c)then-- active entry
pmp.if_fault(r)<= pmp.i_match(r)and(not pmp_ctrl_i(r)(pmp_cfg_x_c));-- fetch access match no execute permission
pmp.if_fault(r)<= pmp.i_match(r)and(not pmp_ctrl_i(r)(pmp_cfg_x_c));-- fetch access match no execute permission
pmp.ld_fault(r)<= pmp.d_match(r)and(not pmp_ctrl_i(r)(pmp_cfg_r_c));-- load access match no read permission
pmp.ld_fault(r)<= pmp.d_match(r)and(not pmp_ctrl_i(r)(pmp_cfg_r_c));-- load access match no read permission
pmp.st_fault(r)<= pmp.d_match(r)and(not pmp_ctrl_i(r)(pmp_cfg_w_c));-- store access match no write permission
pmp.st_fault(r)<= pmp.d_match(r)and(not pmp_ctrl_i(r)(pmp_cfg_w_c));-- store access match no write permission