English
Language : 

PXS20RM Datasheet, PDF (970/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
Memory Protection Unit (MPU)
AHB_ap
start
>=
end
<=
RGDn
r,w,x
hit_b
>>
error
hit & error
hit_b | error
Figure 30-10. MPU access evaluation macro
Figure 30-10 is not intended to be a schematic of the actual access evaluation macro, but rather a
generalized block diagram showing the major functions included in this logic block.
30.7.1.1 Access evaluation – hit determination
To determine if the current AHB reference hits in the given region, two magnitude comparators are used
in conjunction with the region’s start and end addresses. The boolean equation for this portion of the hit
determination is defined as:
region_hit
=((haddr[0:26]>= rgdn.srtaddr[0:26]) & (haddr[0:26] <= rgdn.endaddr[0:26]))
& rgdn.vld
Eqn. 30-1
where haddr[*] is the current AHB reference address, rgdn.srtaddr[*] and
rgdn.endaddr[*] are the start and end addresses, and rgdn.vld is the valid bit, all from region
descriptor n. Recall there are no hardware checks to verify that rgdn.endaddr > rgdn.srtaddr,
and it is software’s responsibility to properly load appropriate values into these fields of the region
descriptor.
In addition to the algebraic comparison of the AHB reference address versus the region descriptor’s start
and end addresses, the optional process identifier is examined against the region descriptor’s PID and
PIDMASK fields. Using the hmaster[*] number to select the appropriate MxPE field from the region
descriptor, a process identifier hit term is formed as:
pid_hit
=~rgdn.mxpe
| ((current_pid[0:7] | rgdn.pidmask[0:7])== (rgdn.pid[0:7] | rgdn.pidmask[0:7]))
Eqn. 30-2
30-16
PXS20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor