1 proc iswithin
{ ADDRESS BASE LEN
} {
2 return [expr ((($ADDRESS - $BASE) > 0) && (($ADDRESS - $BASE + $LEN) > 0))]
5 proc memorytype
{ ADDRESS
} {
6 for { set chip
0 } { $chip < $N_CHIP } { incr chip
} {
7 if { iswithin
$ADDRESS $FLASH($chip,BASE
) $FLASH($chip,LEN
) } {
12 for { set chip
0 } { $chip < $N_RAM } { incr chip
} {
13 if { iswithin
$ADDRESS $RAM($chip,BASE
) $RAM($chip,LEN
) } {
19 # default to 32bit reads.
20 proc isreadable
{ ADDRESS
} {
21 return isreadable32
$ADDRESS
24 proc isreadable32
{ ADDRESS
} {