The memory content can be initialized or cleared in the configuration bitstream. A standard, valid bitstream is required for block RAM initialization or readback due to the power gating feature. For more details on initialization and readback of uninstantiated (power gated) block RAM, see Power Gating of Unused Block RAMs.
INIT_xx attributes define the initial memory contents. By default, block RAM is initialized with all zeros during the device configuration sequence. The 64 initialization attributes from INIT_00 through INIT_3F for the RAMB18E5, and the 128 initialization attributes from INIT_00 through INIT_7F for the RAMB36E5 represent the regular memory contents. Each INIT_xx is a 64-digit hex-encoded bit vector. The memory contents can be partially initialized and are automatically completed with zeros.
The following formula is used to determine the bit positions for each INIT_xx attribute. Given yy = conversion hex-encoded to decimal (xx), INIT_xx corresponds to the memory cells as follows:
- from [(yy + 1) × 256] – 1
- to (yy) × 256
For example, for the attribute INIT_1F, the conversion is:
- yy = conversion hex-encoded to decimal (xx) "
1F
" = 31 - from [(31 + 1) × 256] – 1 = 8,191
- to 31 × 256 = 7,936
More examples are given in the following table.
Attribute | Memory Location | |
---|---|---|
From | To | |
INIT_00 | 255 | 0 |
INIT_01 | 511 | 256 |
INIT_02 | 767 | 512 |
...… | ...… | ...… |
INIT_0E | 3839 | 3584 |
INIT_0F | 4095 | 3840 |
INIT_10 | 4351 | 4096 |
...… | ...… | …... |
INIT_1F | 8191 | 7936 |
INIT_20 | 8447 | 8192 |
…... | ...… | …... |
INIT_2F | 12287 | 12032 |
INIT_30 | 12543 | 12288 |
…... | …... | …... |
INIT_3F | 16383 | 16128 |
...… | …... | …... |
INIT_7F | 32767 | 32512 |