From 8967b94e696348298cd6bd033b1b7a1d4ff04c78 Mon Sep 17 00:00:00 2001 From: mtravaillard Date: Thu, 2 Apr 2026 16:57:58 +0200 Subject: [PATCH 1/3] add upvert script from accellera --- .../importer/from1685_2009_to_1685_2014.xsl | 1891 +++++++++++++++++ .../importer/from1685_2014_to_1685_2022.xsl | 1017 +++++++++ 2 files changed, 2908 insertions(+) create mode 100644 cmake/ipxact/importer/from1685_2009_to_1685_2014.xsl create mode 100644 cmake/ipxact/importer/from1685_2014_to_1685_2022.xsl diff --git a/cmake/ipxact/importer/from1685_2009_to_1685_2014.xsl b/cmake/ipxact/importer/from1685_2009_to_1685_2014.xsl new file mode 100644 index 0000000..8248643 --- /dev/null +++ b/cmake/ipxact/importer/from1685_2009_to_1685_2014.xsl @@ -0,0 +1,1891 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IP-XACT 1685-2014 XSLT Warning#: + + + IP-XACT 1685-2014 XSLT Warning#: + + + + + + + + + + + + + + + + + + http://www.accellera.org/XMLSchema/IPXACT/1685-2014 http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + longint + + + longint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + longint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + Unable to find whiteboxElementRef for whiteboxElement with name ''. + + + + + + + + + longint + + + longint + + + longint + + + + + + + + [WARNING] spirit:size of register : [] + is not fully covered by fields or its size or one of the field size is dependent. + you may consider to create bitfields, before using this xsl transform + to ensure the reset value will be fully propagated from the register level to the field level + + + + field was infered from the register definition since one field must exists within the new schema + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + field was infered from the register definition since one field must exists within the new schema + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + + + + + + + + + + + + + + + + + + longint + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + longint + + + + + + + + + + + + + + + + + + + + + + longint + + + + + + + + + + + + + + + + + + + + longint + + + + + + + + + + + + + + + + + + + + + + + + string + + + string + + + bit + + + string + + + string + + + string + + + string + + + bit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + longint + + + longint + + + + + + + + + + + + + + + + + + + + + + + + + string + + + string + + + bit + + + + + + + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + longint + + + longint + + + longint + + + real + + + real + + + real + + + real + + + real + + + string + + + string + + + string + + + string + + + bit + + + string + + + string + + + string + + + bit + + + string + + + bit + + + real + + + real + + + longint + + + real + + + string + + + string + + + bit + + + + + + + + + + + + + + + + + + + + + + + + + longint + + + longint + + + longint + + + longint + + + longint + + + longint + + + longint + + + string + + + + + + + + + + + + + + + 2 + Unable to up-convert: spirit:fileSet/spirit:file/spirit:name/@dependency=''. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + string + + + + + + user + + + generated + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bitlongintbitreal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user + + + generated + + + + + + + + + + + + + + + + + + + + + + + + + user + + + generated + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + WARNING: Generating value for parameter . + WARNING: Generated value. + + + + + + + + + + + + 0 + false + 0 + 0 + "" + "" + + + + + "" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _design + + + + + + + + + + + + + + + + WARNING: Unable to resolve - - - assuming design. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _design + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + default + + + + + default + + + + + + + + + + + + + + + + + + + + + + + TGI_2009 + none + TGI_2009 + + + + + + + + + + + + + + TGI_2009 + none + TGI_2009 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tlm + + custom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + Removing whiteboxElement '' without converting! No references could be found. + + + + + + + + + + + + found + + + + + 2 + Removing whiteboxElement '' without converting! The registerRef '' does not provide a path to a register. + + + + + + + + + + + + + + + + + + + + + + + + + + + + user + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + write-parameters + + + + + exslt + + + + + + + + + + xalan + + + + + + + + + + msxml + + + + + + + + + + other + + + + + + + + + + + + + parse-expression() + + + + + + exslt + + + + + + + + xalan + + + + + + + + + msxml + + + + + + + + other + + + + + + + + + + diff --git a/cmake/ipxact/importer/from1685_2014_to_1685_2022.xsl b/cmake/ipxact/importer/from1685_2014_to_1685_2022.xsl new file mode 100644 index 0000000..105619c --- /dev/null +++ b/cmake/ipxact/importer/from1685_2014_to_1685_2022.xsl @@ -0,0 +1,1017 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IP-XACT 1685-2022 XSLT Warning#: + + + IP-XACT 1685-2022 XSLT Warning#: + + + + + + + + + + + + + + + + + + + + + + + + typed + + + + + + + + + + + + + + + typed + + + nontyped + + + + + + + + + + + + + + http://www.accellera.org/XMLSchema/IPXACT/1685-2022 http://www.accellera.org/XMLSchema/IPXACT/1685-2022/index.xsd + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + resetType_ + + + + + + + + + + + alternateGroup_ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cSource + cppSource + asmSource + vhdlSource + vhdlSource-87 + vhdlSource-93 + vhdlSource-2002 + vhdlSource-2008 + verilogSource + verilogSource-95 + verilogSource-2001 + verilogSource-2005 + swObject + swObjectLibrary + vhdlBinaryLibrary + verilogBinaryLibrary + unelaboratedHdl + executableHdl + swObjectLibrary + systemVerilogSource-3.0 + systemVerilogSource-3.1 + systemVerilogSource-3.1a + systemVerilogSource-2009 + systemVerilogSource-2012 + systemVerilogSource-2017 + systemCSource + systemCSource-2.0 + systemCSource-2.0.1 + systemCSource-2.1 + systemCSource-2.2 + systemCSource-2.3 + systemCBinaryLibrary + veraSource + eSource + perlSource + tclSource + OVASource + SVASource + pslSource + SDC + vhdlAmsSource + verilogAmsSource + systemCAmsSource + libertySource + spiceSource + systemRDL + systemRDL-1.0 + systemRDL-2.0 + + + + + + + + + + + + initiator + mirroredInitiator + target + mirroredTarget + + + + + + + + + initiator + mirroredInitiator + target + mirroredTarget + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [] + + + + + + + + + + + + + + + + _MemoryMap + + + + + + _SubspaceMap + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + _MemoryMap + + + + + + _SubspaceMap + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + Warning: The range has not been calculated please ensure it matches the expected CPU range. + + + 'h10000000000 + + + + + + + + + + + _MemoryMap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [] = && + + + + + + + + resetType_ + + + + + + + + + + + alternateGroup_ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + + + default + + + + + + + + + + + + + + + default + + + default + + + + + + + + + + + resetType_ + + + + + + + + alternateGroup_ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7933e3f34256b4db4f666b3b8f78b857e89b5aff Mon Sep 17 00:00:00 2001 From: mtravaillard Date: Thu, 2 Apr 2026 16:58:47 +0200 Subject: [PATCH 2/3] Add a parameter for standard version and upvert if needed --- .../ipxact/importer/ipxact_ip_importer.cmake | 95 ++++++++++++++++--- 1 file changed, 83 insertions(+), 12 deletions(-) diff --git a/cmake/ipxact/importer/ipxact_ip_importer.cmake b/cmake/ipxact/importer/ipxact_ip_importer.cmake index d5049cf..22ac6eb 100644 --- a/cmake/ipxact/importer/ipxact_ip_importer.cmake +++ b/cmake/ipxact/importer/ipxact_ip_importer.cmake @@ -15,19 +15,36 @@ # # **Keyword Arguments** # +# :keyword IPXACT_STANDARD: Version of the IP-XACT standard used by the input file. +# Supported values: ``2009``, ``2014``, ``2022``. Defaults to ``2022``. +# If the standard is older than 2022, the Accellera migration XSLT scripts will +# be applied to up-convert the file to 2022 before processing. +# :type IPXACT_STANDARD: string # :keyword GENERATE_ONLY: If set, no Config.cmake file is generated, but the HWIP is still created and can be referenced in a parent scope (similar to a call to add_ip(), the IP variable is set to the parent scope). # :type GENERATE_ONLY: bool # :keyword IPXACT_SOURCE_DIR: path to be set has ${ip_vendor}__${ip_library}__${ip_name}__${ip_version}_IPXACT_SOURCE_DIR, if this argument is used. # :type IPXACT_SOURCE_DIR: string #]] function(add_ip_from_ipxact COMP_XML) - cmake_parse_arguments(ARG "GENERATE_ONLY" "IPXACT_SOURCE_DIR" "" ${ARGN}) + cmake_parse_arguments(ARG "GENERATE_ONLY" "IPXACT_SOURCE_DIR;IPXACT_STANDARD" "" ${ARGN}) if(ARG_UNPARSED_ARGUMENTS) message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} passed unrecognized argument " "${ARG_UNPARSED_ARGUMENTS}") endif() + # Default standard is 2022 + if(NOT DEFINED ARG_IPXACT_STANDARD) + set(ARG_IPXACT_STANDARD "2022") + endif() + + if(NOT ARG_IPXACT_STANDARD STREQUAL "2009" AND + NOT ARG_IPXACT_STANDARD STREQUAL "2014" AND + NOT ARG_IPXACT_STANDARD STREQUAL "2022") + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}: unsupported IPXACT_STANDARD value " + "'${ARG_IPXACT_STANDARD}'. Supported values are: 2009, 2014, 2022.") + endif() + convert_paths_to_absolute(COMP_XML ${COMP_XML}) - + find_program(xmlstarlet_EXECUTABLE xmlstarlet) if(xmlstarlet_EXECUTABLE) set(xml_command ${xmlstarlet_EXECUTABLE} tr) @@ -38,9 +55,62 @@ function(add_ip_from_ipxact COMP_XML) cmake_path(GET COMP_XML PARENT_PATH ip_source_dir) cmake_path(GET COMP_XML FILENAME file_name) + cmake_path(GET COMP_XML STEM file_stem) + + # Up-convert the file to 2022 using Accellera migration scripts if needed + set(XSLT_2009_TO_2014 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/from1685_2009_to_1685_2014.xsl") + set(XSLT_2014_TO_2022 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/from1685_2014_to_1685_2022.xsl") + + # Work with a copy so we never modify the original file + set(WORKING_XML "${COMP_XML}") + + if(ARG_IPXACT_STANDARD STREQUAL "2009") + message(STATUS "IP-XACT: up-converting ${file_name} from 2009 → 2014 → 2022") + + # 2009 → 2014 (temp file) + set(TMP_2014 "${CMAKE_CURRENT_BINARY_DIR}/${file_stem}_2014.xml") + execute_process( + COMMAND ${xml_command} "${XSLT_2009_TO_2014}" "${WORKING_XML}" + OUTPUT_FILE "${TMP_2014}" + RESULT_VARIABLE conv_result + ) + if(NOT conv_result EQUAL 0) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}: conversion 2009→2014 failed for ${WORKING_XML}") + endif() + + # 2014 → 2022 + set(CONVERTED_XML "${CMAKE_CURRENT_BINARY_DIR}/${file_stem}_2022.xml") + execute_process( + COMMAND ${xml_command} "${XSLT_2014_TO_2022}" "${TMP_2014}" + OUTPUT_FILE "${CONVERTED_XML}" + RESULT_VARIABLE conv_result + ) + if(NOT conv_result EQUAL 0) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}: conversion 2014→2022 failed for ${TMP_2014}") + endif() - execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/get_vlnv.xslt" ${COMP_XML} - OUTPUT_VARIABLE vlnv_list) + set(WORKING_XML "${CONVERTED_XML}") + + elseif(ARG_IPXACT_STANDARD STREQUAL "2014") + message(STATUS "IP-XACT: up-converting ${file_name} from 2014 → 2022") + + set(CONVERTED_XML "${CMAKE_CURRENT_BINARY_DIR}/${file_stem}_2022.xml") + execute_process( + COMMAND ${xml_command} "${XSLT_2014_TO_2022}" "${WORKING_XML}" + OUTPUT_FILE "${CONVERTED_XML}" + RESULT_VARIABLE conv_result + ) + if(NOT conv_result EQUAL 0) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}: conversion 2014→2022 failed for ${WORKING_XML}") + endif() + + set(WORKING_XML "${CONVERTED_XML}") + + endif() + + execute_process( + COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/get_vlnv.xslt" "${WORKING_XML}" + OUTPUT_VARIABLE vlnv_list) list(GET vlnv_list 0 ip_vendor) list(GET vlnv_list 1 ip_library) list(GET vlnv_list 2 ip_name) @@ -49,17 +119,18 @@ function(add_ip_from_ipxact COMP_XML) set(output_cmake_file ${ip_source_dir}/${ip_vendor}__${ip_library}__${ip_name}Config.cmake) - execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/get_find_ips.xslt" ${COMP_XML} + execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/get_find_ips.xslt" ${WORKING_XML} OUTPUT_VARIABLE find_ips ) - execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ip_lib_with_filetype_modifier.xslt" ${COMP_XML} - OUTPUT_VARIABLE file_lists - ) + execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ip_lib_with_filetype_modifier.xslt" ${WORKING_XML} + OUTPUT_VARIABLE file_lists + ) - execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/get_ip_links.xslt" ${COMP_XML} - OUTPUT_VARIABLE ip_links - ) + execute_process(COMMAND ${xml_command} "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/get_ip_links.xslt" ${WORKING_XML} + OUTPUT_VARIABLE ip_links + ) + # Always reference the *original* file_name in the generated cmake, not the temp file set(file_lists "${file_lists}\nip_sources(\${IP} IPXACT\n \${CMAKE_CURRENT_LIST_DIR}/${file_name})\n\n") write_file(${output_cmake_file} ${find_ips} ${file_lists} ${ip_links}) @@ -69,6 +140,6 @@ function(add_ip_from_ipxact COMP_XML) if(NOT ARG_GENERATE_ONLY) include("${output_cmake_file}") endif() - + set(IP ${IP} PARENT_SCOPE) endfunction() From 812cb8365011f8d33a579e080d0269c651acc7ad Mon Sep 17 00:00:00 2001 From: mtravaillard Date: Tue, 7 Apr 2026 11:51:44 +0200 Subject: [PATCH 3/3] Add xsl files needed for the upvert in a new folder and exclude it from api doc --- .../ipxact/importer/ipxact_ip_importer.cmake | 5 +- .../upvert/convert_expressions-exslt.xsl | 745 +++++++++++++++++ .../upvert/convert_expressions-msxsl.xsl | 740 +++++++++++++++++ .../upvert/convert_expressions-other.xsl | 745 +++++++++++++++++ .../upvert/convert_expressions-xalan.xsl | 746 ++++++++++++++++++ cmake/ipxact/upvert/convert_expressions.xsl | 267 +++++++ .../from1685_2009_to_1685_2014.xsl | 0 .../from1685_2014_to_1685_2022.xsl | 0 docs/CMakeLists.txt | 1 + 9 files changed, 3247 insertions(+), 2 deletions(-) create mode 100644 cmake/ipxact/upvert/convert_expressions-exslt.xsl create mode 100644 cmake/ipxact/upvert/convert_expressions-msxsl.xsl create mode 100644 cmake/ipxact/upvert/convert_expressions-other.xsl create mode 100644 cmake/ipxact/upvert/convert_expressions-xalan.xsl create mode 100644 cmake/ipxact/upvert/convert_expressions.xsl rename cmake/ipxact/{importer => upvert}/from1685_2009_to_1685_2014.xsl (100%) rename cmake/ipxact/{importer => upvert}/from1685_2014_to_1685_2022.xsl (100%) diff --git a/cmake/ipxact/importer/ipxact_ip_importer.cmake b/cmake/ipxact/importer/ipxact_ip_importer.cmake index 22ac6eb..b058550 100644 --- a/cmake/ipxact/importer/ipxact_ip_importer.cmake +++ b/cmake/ipxact/importer/ipxact_ip_importer.cmake @@ -58,8 +58,9 @@ function(add_ip_from_ipxact COMP_XML) cmake_path(GET COMP_XML STEM file_stem) # Up-convert the file to 2022 using Accellera migration scripts if needed - set(XSLT_2009_TO_2014 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/from1685_2009_to_1685_2014.xsl") - set(XSLT_2014_TO_2022 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/from1685_2014_to_1685_2022.xsl") + set(UPVERT_SCRIPT_DIR "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../upvert") + set(XSLT_2009_TO_2014 "${UPVERT_SCRIPT_DIR}/from1685_2009_to_1685_2014.xsl") + set(XSLT_2014_TO_2022 "${UPVERT_SCRIPT_DIR}/from1685_2014_to_1685_2022.xsl") # Work with a copy so we never modify the original file set(WORKING_XML "${COMP_XML}") diff --git a/cmake/ipxact/upvert/convert_expressions-exslt.xsl b/cmake/ipxact/upvert/convert_expressions-exslt.xsl new file mode 100644 index 0000000..8d93951 --- /dev/null +++ b/cmake/ipxact/upvert/convert_expressions-exslt.xsl @@ -0,0 +1,745 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + validate("") [] + + + + + + + + + + + + + + + + + + + + + + ERROR: XPath Location Paths cannot be converted. + ERROR: XPath Location Paths cannot be converted. + false + + + ERROR: XPath Variable References cannot be converted. + ERROR: XPath Variable References cannot be converted. + false + + + ERROR: XPath last() function cannot be converted. + ERROR: XPath last() function cannot be converted. + false + + + ERROR: XPath position() function cannot be converted. + ERROR: XPath position() function cannot be converted. + false + + + ERROR: XPath count() function cannot be converted. + ERROR: XPath count() function cannot be converted. + false + + + ERROR: XPath local-name() function cannot be converted. + ERROR: XPath local-name() function cannot be converted. + false + + + ERROR: XPath namespace-uri() function cannot be converted. + ERROR: XPath namespace-uri() function cannot be converted. + false + + + ERROR: XPath name() function cannot be converted. + ERROR: XPath name() function cannot be converted. + false + + + ERROR: XPath string() function cannot be converted. + ERROR: XPath string() function cannot be converted. + false + + + ERROR: XPath starts-with() function cannot be converted. + ERROR: XPath starts-with() function cannot be converted. + false + + + ERROR: XPath contains() function cannot be converted. + ERROR: XPath contains() function cannot be converted. + false + + + ERROR: XPath substring-before() function cannot be converted. + ERROR: XPath substring-before() function cannot be converted. + false + + + ERROR: XPath substring-after() function cannot be converted. + ERROR: XPath substring-after() function cannot be converted. + false + + + ERROR: XPath substring() function cannot be converted. + ERROR: XPath substring() function cannot be converted. + false + + + ERROR: XPath string-length() function cannot be converted. + ERROR: XPath string-length() function cannot be converted. + false + + + ERROR: XPath normalize-space() function cannot be converted. + ERROR: XPath normalize-space() function cannot be converted. + false + + + ERROR: XPath translate() function cannot be converted. + ERROR: XPath translate() function cannot be converted. + false + + + ERROR: XPath lang() function cannot be converted. + ERROR: XPath lang() function cannot be converted. + false + + + ERROR: XPath number() function cannot be converted. + ERROR: XPath number() function cannot be converted. + false + + + ERROR: XPath sum() function cannot be converted. + ERROR: XPath sum() function cannot be converted. + false + + + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + false + + + + + + + + + + + + + + + + + + + replace("") [] + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + 0 + + + + + + + + + + && + + + + + + + + + + / + + + + + + + + + + % + + + + + + + + + + + + + + + + + + + + + + + bit' + + + + + + + + + + ! + + + + + + + + + + real' + + + + + + + + + + $floor + + + + + + + + + + $ceil + + + + + + + + + + longint' + + + + + + + + + + == + + + + + + + + + + + + <= + + + + + + + + + + < + + + + + + + + + + + + + + >= + + + + + + + + + + > + + + + + + + + + + + + * + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint'($pow + + + + + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $log10( + + + + + + + + ) + + + + + + $ln( + + + + + + + + )/$ln( + + + + + + + + ) + + + + + + + + + + + + + + + || + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-token(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-closing-bracket(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmake/ipxact/upvert/convert_expressions-msxsl.xsl b/cmake/ipxact/upvert/convert_expressions-msxsl.xsl new file mode 100644 index 0000000..5cdf9ef --- /dev/null +++ b/cmake/ipxact/upvert/convert_expressions-msxsl.xsl @@ -0,0 +1,740 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + validate("") [] + + + + + + + + + + + + + + + + + + ERROR: XPath Location Paths cannot be converted. + ERROR: XPath Location Paths cannot be converted. + false + + + ERROR: XPath Variable References cannot be converted. + ERROR: XPath Variable References cannot be converted. + false + + + ERROR: XPath last() function cannot be converted. + ERROR: XPath last() function cannot be converted. + false + + + ERROR: XPath position() function cannot be converted. + ERROR: XPath position() function cannot be converted. + false + + + ERROR: XPath count() function cannot be converted. + ERROR: XPath count() function cannot be converted. + false + + + ERROR: XPath local-name() function cannot be converted. + ERROR: XPath local-name() function cannot be converted. + false + + + ERROR: XPath namespace-uri() function cannot be converted. + ERROR: XPath namespace-uri() function cannot be converted. + false + + + ERROR: XPath name() function cannot be converted. + ERROR: XPath name() function cannot be converted. + false + + + ERROR: XPath string() function cannot be converted. + ERROR: XPath string() function cannot be converted. + false + + + ERROR: XPath starts-with() function cannot be converted. + ERROR: XPath starts-with() function cannot be converted. + false + + + ERROR: XPath contains() function cannot be converted. + ERROR: XPath contains() function cannot be converted. + false + + + ERROR: XPath substring-before() function cannot be converted. + ERROR: XPath substring-before() function cannot be converted. + false + + + ERROR: XPath substring-after() function cannot be converted. + ERROR: XPath substring-after() function cannot be converted. + false + + + ERROR: XPath substring() function cannot be converted. + ERROR: XPath substring() function cannot be converted. + false + + + ERROR: XPath string-length() function cannot be converted. + ERROR: XPath string-length() function cannot be converted. + false + + + ERROR: XPath normalize-space() function cannot be converted. + ERROR: XPath normalize-space() function cannot be converted. + false + + + ERROR: XPath translate() function cannot be converted. + ERROR: XPath translate() function cannot be converted. + false + + + ERROR: XPath lang() function cannot be converted. + ERROR: XPath lang() function cannot be converted. + false + + + ERROR: XPath number() function cannot be converted. + ERROR: XPath number() function cannot be converted. + false + + + ERROR: XPath sum() function cannot be converted. + ERROR: XPath sum() function cannot be converted. + false + + + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + false + + + + + + + + + + + + + + + + + + replace("") [] + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + 0 + + + + + + + + + + && + + + + + + + + + + / + + + + + + + + + + % + + + + + + + + + + + + + + + + + + + + + + + bit' + + + + + + + + + + ! + + + + + + + + + + real' + + + + + + + + + + $floor + + + + + + + + + + $ceil + + + + + + + + + + longint' + + + + + + + + + + == + + + + + + + + + + + + <= + + + + + + + + + + < + + + + + + + + + + + + + + >= + + + + + + + + + + > + + + + + + + + + + + + * + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint'($pow + + + + + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $log10( + + + + + + + + ) + + + + + + $ln( + + + + + + + + )/$ln( + + + + + + + + ) + + + + + + + + + + + + + + + || + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-token(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-closing-bracket(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmake/ipxact/upvert/convert_expressions-other.xsl b/cmake/ipxact/upvert/convert_expressions-other.xsl new file mode 100644 index 0000000..82ee088 --- /dev/null +++ b/cmake/ipxact/upvert/convert_expressions-other.xsl @@ -0,0 +1,745 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + validate("") [] + + + + + + + + + + + + + + + + + + + + + + ERROR: XPath Location Paths cannot be converted. + ERROR: XPath Location Paths cannot be converted. + false + + + ERROR: XPath Variable References cannot be converted. + ERROR: XPath Variable References cannot be converted. + false + + + ERROR: XPath last() function cannot be converted. + ERROR: XPath last() function cannot be converted. + false + + + ERROR: XPath position() function cannot be converted. + ERROR: XPath position() function cannot be converted. + false + + + ERROR: XPath count() function cannot be converted. + ERROR: XPath count() function cannot be converted. + false + + + ERROR: XPath local-name() function cannot be converted. + ERROR: XPath local-name() function cannot be converted. + false + + + ERROR: XPath namespace-uri() function cannot be converted. + ERROR: XPath namespace-uri() function cannot be converted. + false + + + ERROR: XPath name() function cannot be converted. + ERROR: XPath name() function cannot be converted. + false + + + ERROR: XPath string() function cannot be converted. + ERROR: XPath string() function cannot be converted. + false + + + ERROR: XPath starts-with() function cannot be converted. + ERROR: XPath starts-with() function cannot be converted. + false + + + ERROR: XPath contains() function cannot be converted. + ERROR: XPath contains() function cannot be converted. + false + + + ERROR: XPath substring-before() function cannot be converted. + ERROR: XPath substring-before() function cannot be converted. + false + + + ERROR: XPath substring-after() function cannot be converted. + ERROR: XPath substring-after() function cannot be converted. + false + + + ERROR: XPath substring() function cannot be converted. + ERROR: XPath substring() function cannot be converted. + false + + + ERROR: XPath string-length() function cannot be converted. + ERROR: XPath string-length() function cannot be converted. + false + + + ERROR: XPath normalize-space() function cannot be converted. + ERROR: XPath normalize-space() function cannot be converted. + false + + + ERROR: XPath translate() function cannot be converted. + ERROR: XPath translate() function cannot be converted. + false + + + ERROR: XPath lang() function cannot be converted. + ERROR: XPath lang() function cannot be converted. + false + + + ERROR: XPath number() function cannot be converted. + ERROR: XPath number() function cannot be converted. + false + + + ERROR: XPath sum() function cannot be converted. + ERROR: XPath sum() function cannot be converted. + false + + + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + false + + + + + + + + + + + + + + + + + + + replace("") [] + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + 0 + + + + + + + + + + && + + + + + + + + + + / + + + + + + + + + + % + + + + + + + + + + + + + + + + + + + + + + + bit' + + + + + + + + + + ! + + + + + + + + + + real' + + + + + + + + + + $floor + + + + + + + + + + $ceil + + + + + + + + + + longint' + + + + + + + + + + == + + + + + + + + + + + + <= + + + + + + + + + + < + + + + + + + + + + + + + + >= + + + + + + + + + + > + + + + + + + + + + + + * + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint'($pow + + + + + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $log10( + + + + + + + + ) + + + + + + $ln( + + + + + + + + )/$ln( + + + + + + + + ) + + + + + + + + + + + + + + + || + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-token(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-closing-bracket(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmake/ipxact/upvert/convert_expressions-xalan.xsl b/cmake/ipxact/upvert/convert_expressions-xalan.xsl new file mode 100644 index 0000000..52170f9 --- /dev/null +++ b/cmake/ipxact/upvert/convert_expressions-xalan.xsl @@ -0,0 +1,746 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + validate("") [] + + + + + + + + + + + + + + + + + + + + + + ERROR: XPath Location Paths cannot be converted. + ERROR: XPath Location Paths cannot be converted. + false + + + ERROR: XPath Variable References cannot be converted. + ERROR: XPath Variable References cannot be converted. + false + + + ERROR: XPath last() function cannot be converted. + ERROR: XPath last() function cannot be converted. + false + + + ERROR: XPath position() function cannot be converted. + ERROR: XPath position() function cannot be converted. + false + + + ERROR: XPath count() function cannot be converted. + ERROR: XPath count() function cannot be converted. + false + + + ERROR: XPath local-name() function cannot be converted. + ERROR: XPath local-name() function cannot be converted. + false + + + ERROR: XPath namespace-uri() function cannot be converted. + ERROR: XPath namespace-uri() function cannot be converted. + false + + + ERROR: XPath name() function cannot be converted. + ERROR: XPath name() function cannot be converted. + false + + + ERROR: XPath string() function cannot be converted. + ERROR: XPath string() function cannot be converted. + false + + + ERROR: XPath starts-with() function cannot be converted. + ERROR: XPath starts-with() function cannot be converted. + false + + + ERROR: XPath contains() function cannot be converted. + ERROR: XPath contains() function cannot be converted. + false + + + ERROR: XPath substring-before() function cannot be converted. + ERROR: XPath substring-before() function cannot be converted. + false + + + ERROR: XPath substring-after() function cannot be converted. + ERROR: XPath substring-after() function cannot be converted. + false + + + ERROR: XPath substring() function cannot be converted. + ERROR: XPath substring() function cannot be converted. + false + + + ERROR: XPath string-length() function cannot be converted. + ERROR: XPath string-length() function cannot be converted. + false + + + ERROR: XPath normalize-space() function cannot be converted. + ERROR: XPath normalize-space() function cannot be converted. + false + + + ERROR: XPath translate() function cannot be converted. + ERROR: XPath translate() function cannot be converted. + false + + + ERROR: XPath lang() function cannot be converted. + ERROR: XPath lang() function cannot be converted. + false + + + ERROR: XPath number() function cannot be converted. + ERROR: XPath number() function cannot be converted. + false + + + ERROR: XPath sum() function cannot be converted. + ERROR: XPath sum() function cannot be converted. + false + + + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + WARNING: XPath containsToken() function cannot be automatically converted, please convert manually! + false + + + + + + + + + + + + + + + + + + + replace("") [] + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + 0 + + + + + + + + + + && + + + + + + + + + + / + + + + + + + + + + % + + + + + + + + + + + + + + + + + + + + + + + bit' + + + + + + + + + + ! + + + + + + + + + + real' + + + + + + + + + + $floor + + + + + + + + + + $ceil + + + + + + + + + + longint' + + + + + + + + + + == + + + + + + + + + + + + <= + + + + + + + + + + < + + + + + + + + + + + + + + >= + + + + + + + + + + > + + + + + + + + + + + + * + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + longint'($pow + + + + + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $log10( + + + + + + + + ) + + + + + + $ln( + + + + + + + + )/$ln( + + + + + + + + ) + + + + + + + + + + + + + + + || + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-token(, , ) [] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + find-closing-bracket(, , ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmake/ipxact/upvert/convert_expressions.xsl b/cmake/ipxact/upvert/convert_expressions.xsl new file mode 100644 index 0000000..cb9aa48 --- /dev/null +++ b/cmake/ipxact/upvert/convert_expressions.xsl @@ -0,0 +1,267 @@ + + + + + + + ' + " + + + + + + parse-scale(, ) + + + + + + + 'b + + + + + + + 'h + + + + + + + + + 'h + + + + + + + + + 'h + + + + + + + + 'd + + + * (2 ** 10) + + + + + 'd + + + * (2 ** 10) + + + + + 'd + + + * (2 ** 20) + + + + + 'd + + + * (2 ** 20) + + + + + 'd + + + * (2 ** 30) + + + + + 'd + + + * (2 ** 30) + + + + + 'd + + + * (2 ** 40) + + + + + 'd + + + * (2 ** 40) + + + + otherwise: + + + + 'd + + + + + + + + + + + tokenize("", "") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _tokenize-delimiters("", "") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _tokenize-string("", "") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmake/ipxact/importer/from1685_2009_to_1685_2014.xsl b/cmake/ipxact/upvert/from1685_2009_to_1685_2014.xsl similarity index 100% rename from cmake/ipxact/importer/from1685_2009_to_1685_2014.xsl rename to cmake/ipxact/upvert/from1685_2009_to_1685_2014.xsl diff --git a/cmake/ipxact/importer/from1685_2014_to_1685_2022.xsl b/cmake/ipxact/upvert/from1685_2014_to_1685_2022.xsl similarity index 100% rename from cmake/ipxact/importer/from1685_2014_to_1685_2022.xsl rename to cmake/ipxact/upvert/from1685_2014_to_1685_2022.xsl diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 3502e2d..29abaed 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -30,6 +30,7 @@ set(EXCLUDE_FROM_RST -e "*FindYosys.cmake" -e "*graphviz*" -e "*sim_utils.cmake" + -e "*upvert" ) # Cminx is used to convert SoCMake function comments into rST format later transformed to a # static html documentation using sphinx