2.2.4.1. SMH File Types
The .smh is an Intel-format hexadecimal file. You can generate the following .smh file revisions:
- Revision 1—Generated for Stratix® IV and Arria® II devices. This revision does not support hierarchy tagging, and does not contain tag size or region map information.
- Revision 2—Generated for Stratix® V, Arria® V, and Cyclone® V devices. The generated .smh contains tag size and region map information.
- Revision 3—Generated for Arria® 10 and Cyclone® 10 GX devices. The generated .smh contains tag size and region map information, and can accommodate longer sensitivity data addresses.
Revision 1 SMH
In revision 1 files, the sensitivity map header provides basic information about the .smh format. This information includes the base addresses for the frame information, offset maps and length of the single offset map, and the sensitivity data array.
Revision 1 files contain the following arrays:
- Frame information array—Contains a 32 bit string for each frame in the device. The frame number serves as the index for the frame information string. Each frame information string provides the following information:
- offset_map_array_index (Bits 7:0)—Index for the offset map array that this frame uses.
- frame_info_data_offset (Bits 31:8)—24 bit address offset into the sensitivity array for this frame.
Note: For Stratix® IV and Arria® II devices, the frame information array lists CRAM and embedded RAM frame strings. However, the .smh sets the embedded RAM frame string to 0xFFFFFFF in the frame information array entry because the EDCRC circuitry and sensitivity processing only correct CRAM frames. For all other device families, the frame information array lists only the CRAM frame strings. - Offset map array—The offset map information array is a set of arrays containing 16 bit offset maps. Each offset map value represents an additional offset into the sensitivity array for a frame group. Each offset map value is 16 bits. The offset_map_length string in the header information defines the size of each offset map array.
- Sensitivity data array—The sensitivity data array is a flat-bit vector where 1 specifies a sensitive bit and 0 specifies an insensitive bit.
Revision 2 SMH
In revision 2 files, the sensitivity map header is an extension of revision 1 header format. The header information provides basic information about the .smh revision 2, and includes all the revision 1 header information fields. The additional fields include size of the sensitivity data tag size in bits, base addresses for the region map, and 32 bit CRC signature of the corresponding .sof file.
The 32 bit ID of the sensitivity map header revision 2 is defined as follows:
- Bits 23:0— Intel® FPGA sensitivity map header ID 0x445341
- Bits 24:27—Bit mask for the header information
- Bit 24—Reserved
- Bit 25—Indicates the presence of sensitivity tag information in the .smh file
- Bit 26:27—Reserved
- Bit 28—Indicates the presence of a 32 bit CRC signature of a corresponding .sof
- Bits 29:31—Reserved
Revision 2 files contain the following arrays:
- Frame information array—Contains a 32 bit string for each frame in the device. The frame number serves as the index for the frame information string. Each frame information string provides the following information:
- offset_map_array_index (bits 7:0)—Index for the offset map array that this frame uses.
- frame_info_data_offset (bits 31:8)—24-bit address offset into the sensitivity array for this frame.
- Offset map array—The offset map information array is a set of arrays containing 16 bit offset maps. Each offset map value represents an additional offset into the sensitivity array for a frame group. Each offset map value is 16 bits. The size of each offset map array is defined by the offset_map_length string contained in the header information.
- Sensitivity data array—The size of the single sensitivity data entry or tag (sensitivity_data_tag_size) is in bits and aligned to power of 2. The sensitivity data array is a flat sensitivity tag vector where a sensitive tag of 0 specifies a bit insensitive for all regions, and non-zero tag specifies an offset into region map.
- Region map information array—The region map information array contains a 16-bit string for each non-zero sensitivity tag. The sensitivity data tag serves as the index-1 for the region map array. The string is a bitmask of the regions, the bit is sensitive for. Each region can be identified in the bitmask by mask 1 << (Region ID - 1).
Number of ASD Regions | Sensitivity Tag Size (bits) | SMH Size (bytes) |
---|---|---|
1 | 1 | 2,296,736 |
2-3 | 2 | 3,984,920 |
3-15 | 4 | 7,361,308 |
5-16 | 8 | 14,114,024 |
For the 2 ASD Regions with ASD ID2, ASD ID3, the possible combinations of ASD Regions are b000, b010, b100, and b110. Therefore, it requires 2 bit of sensitivity tag size to represent the 4 possible combinations of ASD Regions.
The table above indicates that it is possible to get 2 bits or 4 bits of sensitivity tag size when you have 3 ASD Regions. The possible ASD Region Combinations depends on your design.
For 3 ASD regions with ASD ID 2, ASD ID 3, ASD ID 6, the possible ASD Regions Combinations are b000000, b000010, b000100, b100000, b000110, b100010, b100100, and b100110. This example requires 4 bits of sensitivity tag size to represent 8 possible combinations of ASD Regions.
Depending on your design, you can get 4 possible combinations of ASD regions which are b000110, b100010, b100100, and b100110. This example requires only 2 bits of sensitivity tag size to represent the 4 possible combinations of ASD Regions.
Number of ASD Regions | Example of ASD ID | Sensitivity Tag Size (bits) | Possible of ASD Region Combinations |
---|---|---|---|
2 | 2,3 | 2 | {b000, b010, b100, b110} |
3 | 2,3,6 | 2 | {b000110, b100010, b100100, b100110} |
4 | {b000000, b000010, b000100, b100000, b000110, b100010, b100100, b100110} |
Revision 3 SMH
The file header information is the same as in revision 2, except it has a different 32 bit ID: 0xX6445341. The sensitivity map header definition 32 bit ID is the same as revision 2 except bit 26 indicates the usage of longer sensitivity data addresses.
The frame information array contains a 48 bit entry for each frame in the device. Like revision 2, the frame number serves as the index for the frame information entry. Each frame information entry contains:
- offset_map_array_index—Bits [47:32] are the 16 bit index for the offset map array.
- frame_info_data_offset—Bits [31:0] are the 32 bit address offset into the sensitivity array for sensitivity_data_tag_size = 1.
The offset map array, sensitivity data array, and region map information array have the same definition as revision 2.