Don’t Change Bit Assignments

Don’t Change Bit Assignments

December 31, 2010

While working for HP’s LaserJet lab, a hardware engineer told me about a customizable IP that we had purchased to put in one of our LaserJet ASICs. Depending on the customization settings used when the IP was instantiated, some register bits became unneeded and therefore were not visible in the registers. The design files of this third-party IP had a “feature” that would pack the remaining visible bits into contiguous bit locations within the registers. However, something as seemingly innocuous as moving bits around in a register can have a serious impact on firmware.

The problem with this optimization is that customizing that IP for a future version of the ASIC could yield a different set of visible bits at different bits positions from a previous version. A given bit might not have the same position from one version of the ASIC to the next. Accommodating these bit position changes in firmware forces unnecessary code turmoil and introduces more risk for defects when porting from one version to the next or trying to make the same firmware support both versions. A better approach would be for the IP design files to preserve assigned bit positions, leaving holes as necessary for bits not visible due to the customization settings.

  • Best Practice: Avoid changing bit assignments from one version of the block to the next.

Until my next feature-packed newsletter…

Share:

Comments