diff --git a/arch/ext/Zve32f.yaml b/arch/ext/Zve32f.yaml new file mode 100644 index 000000000..a1ecdf9cf --- /dev/null +++ b/arch/ext/Zve32f.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=../../schemas/ext_schema.json + +$schema: "ext_schema.json#" +kind: extension +name: Zve32f +long_name: Vector Extension for Minimal Single-Precision Embedded Floating-Point +description: | + TBD - See GitHub issue 616 +type: unprivileged +versions: + - version: "1.0.0" + state: ratified + ratification_date: null + requires: F diff --git a/backends/isa_explorer/isa_explorer.rb b/backends/isa_explorer/isa_explorer.rb index fadd487d6..d56d58961 100644 --- a/backends/isa_explorer/isa_explorer.rb +++ b/backends/isa_explorer/isa_explorer.rb @@ -39,9 +39,9 @@ def arch2ext_table(arch) }, {name: "Description", formatter: "textarea", sorter: "alphanum", headerFilter: true}, {name: "IC", formatter: "textarea", sorter: "alphanum", headerFilter: true}, - {name: "Extensions\nIncluded\n(subsets)", formatter: "textarea", sorter: "alphanum"}, - {name: "Implied By\n(and\ntransitives)", formatter: "textarea", sorter: "alphanum"}, - {name: "Incompatible\n(and\ntransitives)", formatter: "textarea", sorter: "alphanum"}, + {name: "Implied By", formatter: "textarea", sorter: "alphanum"}, + {name: "Requires", formatter: "textarea", sorter: "alphanum"}, + {name: "Incompatible", formatter: "textarea", sorter: "alphanum"}, {name: "Ratified", formatter: "textarea", sorter: "boolean", headerFilter: true}, {name: "Ratification\nDate", formatter: "textarea", sorter: "alphanum", headerFilter: true}, sorted_profile_releases.map do |pr| @@ -55,14 +55,12 @@ def arch2ext_table(arch) arch.extensions.sort_by!(&:name).each do |ext| row = [ - ext.name, - ext.long_name, - ext.compact_priv_type, - "UDB Missing", - # See https://github.com/riscv-software-src/riscv-unified-db/issues/597 for the next 2 columns. - ext.max_version.implied_by.map(&:name), - # ext.max_version.transitive_conflicts.map(&:name), - "UDB MISSING", + ext.name, # Name + ext.long_name, # Description + ext.compact_priv_type, # IC + ext.max_version.implied_by.map(&:name), # Implied By + ext.max_version.requirement_condition.empty? ? "" : ext.max_version.requirement_condition.to_logic_tree.to_s, # Requires + ext.conflicts_condition.empty? ? "" : ext.conflicts_condition.to_logic_tree.to_s, # Incompatible ext.ratified, if ext.ratified if ext.min_ratified_version.ratification_date.nil? || ext.min_ratified_version.ratification_date.empty? diff --git a/lib/arch_obj_models/req_expression.rb b/lib/arch_obj_models/req_expression.rb index d08d4c0b4..1f2dbc06a 100644 --- a/lib/arch_obj_models/req_expression.rb +++ b/lib/arch_obj_models/req_expression.rb @@ -466,32 +466,36 @@ def to_logic_tree(hsh = @hsh, term_idx: [0], expand: true) when "oneOf" # expand oneOf into AND roots = T.let([], T::Array[LogicNode]) - raise "unexpected" if hsh["oneOf"].size < 2 - - hsh["oneOf"].size.times do |k| - root = - if k.zero? - LogicNode.new(TYPES::And, [to_logic_tree(hsh["oneOf"][0], term_idx:, expand:), LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][1], term_idx:, expand:)])]) - elsif k == 1 - LogicNode.new(TYPES::And, [LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][0], term_idx:, expand:)]), to_logic_tree(hsh["oneOf"][1], term_idx:, expand:)]) - else - LogicNode.new(TYPES::And, [LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][0], term_idx:, expand:)]), LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][1], term_idx:, expand:)])]) - end - (2...hsh["oneOf"].size).each do |i| + + if hsh["oneOf"].size < 2 + to_logic_tree(hsh["oneOf"][0], term_idx:, expand:) + else + hsh["oneOf"].size.times do |k| root = - if k == i - LogicNode.new(TYPES::And, [root, to_logic_tree(hsh["oneOf"][i], term_idx:, expand:)]) + if k.zero? + LogicNode.new(TYPES::And, [to_logic_tree(hsh["oneOf"][0], term_idx:, expand:), LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][1], term_idx:, expand:)])]) + elsif k == 1 + LogicNode.new(TYPES::And, [LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][0], term_idx:, expand:)]), to_logic_tree(hsh["oneOf"][1], term_idx:, expand:)]) else - LogicNode.new(TYPES::And, [root, LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][i], term_idx:, expand:)])]) + LogicNode.new(TYPES::And, [LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][0], term_idx:, expand:)]), LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][1], term_idx:, expand:)])]) end - end - roots << root - end - root = LogicNode.new(TYPES::Or, [T.must(roots[0]), T.must(roots[1])]) - (2...roots.size).each do |i| - root = LogicNode.new(TYPES::Or, [root, T.must(roots[i])]) + (2...hsh["oneOf"].size).each do |i| + root = + if k == i + LogicNode.new(TYPES::And, [root, to_logic_tree(hsh["oneOf"][i], term_idx:, expand:)]) + else + LogicNode.new(TYPES::And, [root, LogicNode.new(TYPES::Not, [to_logic_tree(hsh["oneOf"][i], term_idx:, expand:)])]) + end + end + roots << root + end + + root = LogicNode.new(TYPES::Or, [T.must(roots[0]), T.must(roots[1])]) + (2...roots.size).each do |i| + root = LogicNode.new(TYPES::Or, [root, T.must(roots[i])]) + end + root end - root when "not" LogicNode.new(TYPES::Not, [to_logic_tree(hsh["not"], term_idx:, expand:)]) else diff --git a/lib/deploy.sh b/lib/deploy.sh index 978d99a59..0c5d47ee8 100755 --- a/lib/deploy.sh +++ b/lib/deploy.sh @@ -2,8 +2,9 @@ # deploy artifacts to a directory, in preparation for GitHub deployment -# Default to success +# Initialize globals used to track failures. exit_status=0 +declare -a failures # Array ROOT=$(dirname $(dirname $(realpath ${BASH_SOURCE[0]}))) @@ -14,30 +15,45 @@ function deploy_log() { echo "[DEPLOY] $(date) $*" } +# Put "FAIL" between [DEPLOY] and date to make it easier to grep for failures (ie.., "\[DEPLOY\] FAIL" RE does the trick) +# Don't put "FAIL" in [DEPLOY] so that we can first grep for [DEPLOY] and see all messages from this deploy.sh script. +# Record failures but don't exit so that we can see which artifacts pass & fail. +function deploy_fail() { + echo "[DEPLOY] FAIL $(date) $*" + failures+=("$*") # Append to array + exit_status=1 +} + function deploy_mkdir() { [[ $# -ne 1 ]] && { - deploy_log "deploy_mkdir(): Passed $# args but it needs 1" + deploy_fail "deploy_mkdir(): Passed $# args but it needs 1" + + # Exit if args are wrong. exit 1 } local dst_dir="$1" mkdir -p $dst_dir || { - deploy_log "mkdir -p $dst_dir failed" - exit_status=1 + deploy_fail "mkdir -p $dst_dir failed" } } function deploy_do() { - deploy_log "$@" + deploy_log + deploy_log 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv' + deploy_log "./do $*" + deploy_log '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' + deploy_log ./do "$@" || { - deploy_log "./do $* failed" - exit_status=1 + deploy_fail "./do $*" } } function deploy_cp_recursive() { [[ $# -ne 2 ]] && { - deploy_log "deploy_cp_recursive(): Passed $# args but it needs 2" + deploy_fail "deploy_cp_recursive(): Passed $# args but it needs 2" + + # Exit if args are wrong. exit 1 } @@ -45,14 +61,15 @@ function deploy_cp_recursive() { local dst_dir="$2" cp -R ${src_dir} ${dst_dir} || { - deploy_log "cp -R ${src_dir} ${dst_dir} failed" - exit_status=1 + deploy_fail "cp -R ${src_dir} ${dst_dir} failed" } } function deploy_cp() { [[ $# -ne 2 ]] && { - deploy_log "deploy_cp(): Passed $# args but it needs 2" + deploy_fail "deploy_cp(): Passed $# args but it needs 2" + + # Exit if args are wrong. exit 1 } @@ -60,12 +77,13 @@ function deploy_cp() { local dst_dir="$2" cp ${src_file} ${dst_dir} || { - deploy_log "cp ${src_file} ${dst_dir} failed" - exit_status=1 + deploy_fail "cp ${src_file} ${dst_dir} failed" } } -deploy_log "Starting" +deploy_log '***************************************************************' +deploy_log '* DEPLOY STARTING *' +deploy_log '***************************************************************' deploy_mkdir $DEPLOY_DIR deploy_mkdir $DEPLOY_DIR/example_cfg @@ -174,17 +192,17 @@ cat <<- EOF > $DEPLOY_DIR/index.html