Coverage for tropicsquare / chip_id / constants.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-27 21:24 +0000

1"""TROPIC01 Chip ID related constants 

2 

3This module contains constants for parsing and interpreting TROPIC01 chip ID structure, 

4including package types, fabrication facility IDs, and chip ID structure size. 

5 

6Based on: https://github.com/tropicsquare/libtropic/blob/master/include/libtropic_common.h 

7""" 

8 

9# Chip ID structure size 

10CHIP_ID_SIZE = 128 #< Total size of lt_chip_id_t structure in bytes (includes 24-byte padding) 

11 

12# Serial number structure size 

13SERIAL_NUMBER_SIZE = 16 #< Total size of lt_ser_num_t structure in bytes 

14 

15# Package Type IDs 

16CHIP_PKG_BARE_SILICON_ID = 0x8000 #< Package type ID for bare silicon 

17CHIP_PKG_QFN32_ID = 0x80AA #< Package type ID for QFN32 package 

18 

19#< Mapping of package type IDs to human-readable names 

20PACKAGE_TYPES = { 

21 CHIP_PKG_BARE_SILICON_ID: "Bare Silicon", 

22 CHIP_PKG_QFN32_ID: "QFN32", 

23} 

24 

25# Fabrication Facility IDs 

26FAB_ID_TROPIC_SQUARE_LAB = 0xF00 #< Fab ID of Tropic Square Lab 

27FAB_ID_EPS_BRNO = 0x001 #< Fab ID of Production line #1 (EPS Brno) 

28 

29#< Mapping of fabrication facility IDs to human-readable names 

30FAB_LOCATIONS = { 

31 FAB_ID_TROPIC_SQUARE_LAB: "Tropic Square Lab", 

32 FAB_ID_EPS_BRNO: "EPS Brno", 

33}