Skip to main content

Utilities for encoding and decoding the data stored in the ITkPix ASIC e-fuses

Project description

ITkPix E-fuse Codec

Utilities for encoding and decoding the data stored in the ITkPix ASIC e-fuses

Installation

Cpp

The itkpix-efuse-codec C++ library is header only. Simply add itkpix_efuse_codec.h to your include directory and you're off to the races.

Python

itkpix-efuse-codec is available from PyPi. Simply do:

pip install itkpix-efuse-codec

Usage

Python

Command-line Utility

pip installing itkpix-efuse-codec givers you the efuse command-line utility, which has the encode and decode sub-commands.

encode

efuse -v encode BONN 0x146cb
Input:
   probe_location name  : BONN
   chip serial number   : 83659 (bin: 0b10100011011001011, hex: 0x146cb)
Encoded:
   encoded e-fuse (bin) : 00010001010001101100101100011111 (32 bits)
                  (hex) : 0x1146cb1f

decode

efuse -v decode 0x1146cb1f
Input:
    e-fuse data   (bin): 0b100010100011011001011
                  (hex): 0x1146cb
Decoded:
    chip serial number : 0x146cb
    probe location     : BONN (id: 0x1)

As a module

You can import the itkpix_efuse_codec module in your existing Python scripts. For example, to generate the 32-bit encoded E-fuse data you would do:

import itkpix_efuse_codec

probe_location_name : str = "BONN" # must be a valid name
chip_sn : int = 0x12345;
efuse_binary_string = itkpix_efuse_codec.encode(probe_location_name, chip_sn) # returns binary string

efuse_data = int(efuse_binary_string, 2) # parse the binary string into an integer

To decode 32-bit E-fuse data retreived from the ITkPix ASIC, you would do:

import itkpix_efuse_codec
from itkpix_efuse_codec import EfuseData

retrieved_efuse_data : int = ...
decoded_efuse_data = int(itkpix_efuse_codec.decode(retrieved_efuse_data), 2) # parse the binary string into an integer
efuse_data = EfuseData(decoded_efuse_data) # EfuseData class has useful getters

chip_sn = efuse_data.chip_sn()
probe_location_name = efuse_data.probe_location_name()
probe_location_id = efuse_data.probe_location_id()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itkpix_efuse_codec-0.2.0.tar.gz (407.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

itkpix_efuse_codec-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl (308.8 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

File details

Details for the file itkpix_efuse_codec-0.2.0.tar.gz.

File metadata

  • Download URL: itkpix_efuse_codec-0.2.0.tar.gz
  • Upload date:
  • Size: 407.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for itkpix_efuse_codec-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fc0cd792573c48904953c398c97a368998309b8507d3e32086f8a263f2eb7aac
MD5 ffa09694ae6afca9ab7a722e69a9ab08
BLAKE2b-256 2fe15b1b3713816c20ca6ce21e2978a3423aeb13cc6f8eaa61a570f3a7b07c42

See more details on using hashes here.

File details

Details for the file itkpix_efuse_codec-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: itkpix_efuse_codec-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 308.8 kB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for itkpix_efuse_codec-0.2.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c81394b593ba330fc58094c777ebaf57d52102e88e318564024cbf18c676f739
MD5 1c7f0152170328ee919ddc8461356c94
BLAKE2b-256 bb8f666dea4288a6ebaf1c5ac5b6b06b3fcbdbb4093eae2d037dca3ec3aedc14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page