Nios® II Processor Reference Guide

ID 683836
Date 8/28/2023
Public
Document Table of Contents

3.4.2.14.1. The MASK Field

When the amount of memory reserved for a region is defined by size, the MASK field specifies the size of the memory region. The MASK field is the same number of bits as the BASE field of the mpubase register.

Note: Unused high-order or low-order bits must be written as zero and are read as zero.

MASK Region Size Encodings Table lists the MASK field encodings for all possible region sizes in a full 31-bit byte address space.

Table 32.  MASK Region Size Encodings
MASK Encoding Region Size
0xFFFFFF 256 bytes
0xFFFFFE 512 bytes
0xFFFFFC 1 KB
0xFFFFF8 2 KB
0xFFFFF0 4 KB
0xFFFFE0 8 KB
0xFFFFC0 16 KB
0xFFFF80 32 KB
0xFFFF00 64 KB
0xFFFE00 128 KB
0xFFFC00 256 KB
0xFFF800 512 KB
0xFFF000 1 MB
0xFFE000 2 MB
0xFFC000 4 MB
0xFF8000 8 MB
0xFF0000 16 MB
0xFE0000 32 MB
0xFC0000 64 MB
0xF80000 128 MB
0xF00000 256 MB
0xE00000 512 MB
0xC00000 1 GB
0x800000 2 GB
0x000000 4 GB

The MASK field contains the following value, where region_size is in bytes:

MASK = 0xFFFFFF << log2(region_size >> 8)