Documentation
  • Coverage
  • 80.85%
    76 out of 94 items documented1 out of 20 items with examples
  • Size
  • Source code size: 62.94 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dlharmon-rs

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.