BSDL: ingest libbsdl into essim and populate PinSpec from a device model
Link libbsdl dynamically (add_subdirectory ../libbsdl, overridable via -DBSDL_DIR). New BsdlModel wraps the C ABI and reduces a parsed .bsd to essim's pin vocabulary; apply_bsdl() binds each port to a Pin (by name, then by physical pad) and sets its spec: direction, function (TAP role / power / ground / signal), pad, and source = Bsdl. This feeds the PinSpec fields from P1, so verify's existing power/ground placement pass now lights up for BSDL-modelled parts. Covered by test_bsdl_apply (name + pad binding, TAP roles, linkage classification). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,14 @@ FetchContent_MakeAvailable(ftxui)
|
||||
find_package(libzip REQUIRED)
|
||||
find_package(pugixml REQUIRED)
|
||||
|
||||
# libbsdl — standalone BSDL parser (LGPL-2.1), dynamically linked from essim
|
||||
# (EUPL-1.2, which the LGPL permits). Path overridable via -DBSDL_DIR=...;
|
||||
# its CLI and tests are not needed inside essim's build.
|
||||
set(BSDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libbsdl" CACHE PATH "libbsdl source tree")
|
||||
set(BSDL_BUILD_CLI OFF CACHE BOOL "" FORCE)
|
||||
set(BSDL_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(${BSDL_DIR} ${CMAKE_BINARY_DIR}/libbsdl)
|
||||
|
||||
# Library target = everything except main.cpp; reused by `essim` and `essim_tests`.
|
||||
file(GLOB_RECURSE LIB_SOURCES "src/*.cpp")
|
||||
list(REMOVE_ITEM LIB_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
|
||||
@@ -39,6 +47,7 @@ target_link_libraries(essim_lib
|
||||
ftxui::component
|
||||
libzip::zip
|
||||
pugixml::pugixml
|
||||
bsdl::bsdl
|
||||
)
|
||||
|
||||
add_executable(essim src/main.cpp)
|
||||
|
||||
Reference in New Issue
Block a user