BSDL Parser in Rust
Parse a BSDL file to a Rust struct. Supports IEEE-1149.1, 1149.6 Advanced IO (AIO, commonly AC-JTAG). Some attributes and other elements are not fully parsed but an effort is made to provide all data in the output struct as part of a dictionary of attributes.
A single test BSDL file for a fictitious part is included in the repository for unit test purposes. Most vendor BSDL files cannot be included here due to copyrights. If available, more BSDLs can be used in the unit tests by defining the environment variable $BSDL_TEST_FILE_DIR. Note that some vendors provide broken BSDLs that will return a parse error, fail the Goepel BSDL Syntax Checker. This library is tested against a collection of about 1400 BSDLs including every Xilinx device that has JTAG up to Vivado 2025.2, some Altera, ST Micro, etc.
Limitations and Assumptions
- INSTRUCTION_OPCODES must fit a u64.
Supported
- entity
- generics (stored to dict)
- use statements (stored in list)
- attributes (stored to dict)
- port (fully parsed)
- attribute PIN_MAP (fully parsed)
- constant PIN_MAP_STRING (fully parsed)
- attribute TAP_SCAN_CLOCK (fully parsed)
- attribute INSTRUCTION_LENGTH (fully parsed)
- attribute INSTRUCTION_OPCODE (fully parsed)
- attribute IDCODE_REGISTER (fully parsed)
- attribute BOUNDARY_LENGTH (fully parsed)
- attribute BOUNDARY_REGISTER (fully parsed)
IEEE-1532 support may be added in a future update.
API docs
License
MIT
Contributing
All contributions must be written by the contributor. LLM/AI contributions are not welcome, any clearly LLM generated issues or PRs will be closed immediately.
Some helpful links:
IEEE 1149.1 plus 1149.6 are expensive at about US $500 to purchase. There are some good freely available and lower cost resources.
- Kenneth P. Parker "The Boundary-Scan Handbook 3rd edition is fairly inexpensive used, is good enough for most purposes.
- Goepel BSDL Syntax Checker (Windows executable)
- Diving into JTAG - Overview (Part 1)
- Diving into JTAG — Debugging (Part 2)
- Diving into JTAG — Boundary Scan (Part 3)
- Diving into JTAG — BSDL (Part 4)
- Diving into JTAG — Usage Scenarios (Part 5)
- Diving into JTAG — Security (Part 6)
- IEEE 1149.1-2013: Excludable Segments
- The IEEE 1149.1-2013 Standard for Test Access Port and Boundary-Scan Architecture: An Overview
- Boundary Scan Description Language (BSDL) Explained
- Understanding Boundary Scan I/O Cells