User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
code:code [2024/04/01 04:22] – [Preface] Igor Yefmovcode:code [2024/04/02 08:41] Igor Yefmov
Line 149: Line 149:
  
 ---- ----
-====== Firmware Versioning evolution ====== +Previous iterations had different bit layout for the Version Info, see details here[[Firmware Versioning Evolution]] 
- +----
-====== FX3 Version Info ====== +
-The version id is also encoded into the firmware image file name as+
-<code><VendorID>_<HardwareID>_<ProductID>_<ReleaseType>_<BuildNumber></code> +
- +
-===== FX3 version info C/C++-struct ===== +
-The FX3 version structure is as follows (little-endian memory layout): +
- +
-<code cpp firmware-version.h> +
-struct FwVersion{ +
-    unsigned vendorId    : 3; +
-    unsigned hwCfgId     : 5; +
-    unsigned productId   : 8; +
-#ifdef OLD_VER_FMT +
-    unsigned releaseType : 5; +
-    unsigned buildNo     : 11; +
-#else +
-    unsigned releaseType : 3; +
-    unsigned buildNo     : 13; +
-#endif +
-}; +
-static_assert(sizeof(FwVersion) == 4); +
-</code> +
- +
-Prior to FPGA v. 89 there was no standard-compliant way of representing the version info in a C struct though (which is exactly what prompted the rework in the first place). +
-==== Bit layout ==== +
-The bits are laid out in 4 sequential bytes as follows (depending on the version): +
-^  version  ^  3  ^^^^^^^^  2  ^^^^^^^^  1  ^^^^^^^^  0  ^^^^^^^^ +
-^  :::  ^  7  ^  6  ^  5  ^  4  ^  3  ^  2  ^  1  ^  0  ^  7  ^  6  ^  5  ^  4  ^  3  ^  2  ^  1  ^  0  ^  7  ^  6  ^  5  ^  4  ^  3  ^  2  ^  1  ^  0  ^  7  ^  6  ^  5  ^  4  ^  3  ^  2  ^  1  ^  0  ^ +
-|  fx3<102\\ fpga<77  |  buildNo[7:0]  ||||||||  releaseType  |||||  buildNo[10:8]  |||  productId  ||||||||  vendorId  |||  hwCfgId  ||||| +
-|  fx3<103  |  buildNo[10:3]  ||||||||  buildNo[2:0]  |||  releaseType  |||||  productId  ||||||||  hwCfgId  |||||  vendorId  ||| +
-|  fx3>=103\\ fpga>=77  |  buildNo[12:5]  ||||||||  buildNo[4:0]  |||||  releaseType  |||  productId  ||||||||  hwCfgId  |||||  vendorId  ||| +
- +
-Because of the change in bit layout different byte sequences shown below are needed to produce the same result (exact same component values for the sake of simplicity and only as an illustration): +
-^  version  ^  byte sequence (API return buffer)  |  <code cpp> +
-.vendorId = 1 +
-.hwCfgId = 1 +
-.productId = 5 +
-.releaseType = 3 +
-.buildNo = 0x67</code> +
-|  fx3>=102\\ fpga<77  |''0x21 0x05 0x18 0x67''|:::+
-|  fx3<103  |''0x09 0x05 0xE3 0x0C''|:::+
-|  fx3>=103\\ fpga>=77  |''0x09 0x05 0x3B 0x03''|:::+
 ===== Vendor ID ===== ===== Vendor ID =====
 ^Code ^Value ^ ^Code ^Value ^

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information