Skip to content

Commit 33d6580

Browse files
authored
fix: add bytefield-svg for CTP generation (#989)
Processor CTP generation requires the package `bytefield-svg`. Previously the following errors were encountered ```sh $ ./do gen:proc_ctp_html[RVI20-32] asciidoctor: ERROR: ext/riscv-isa-manual/src/images/bytefield/pmp-rv32.edn: line 2: Failed to generate image: Could not find the 'bytefield-svg' executable in PATH; add it to the PATH or specify its location using the 'bytefield-svg' document attribute /workspaces/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/asciidoctor-diagram-2.3.2/lib/asciidoctor-diagram/diagram_source.rb:144:in `find_command' /workspaces/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/asciidoctor-diagram-2.3.2/lib/asciidoctor-diagram/bytefield/converter.rb:18:in `convert' /workspaces/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/asciidoctor-diagram-2.3.2/lib/asciidoctor-diagram/diagram_processor.rb:196:in `create_image_block' ... ``` Now the CTP can be generated: <img width="1902" height="912" alt="image" src="https://github.com/user-attachments/assets/cbdd77c4-735f-40c7-a5de-6a933e7625d9" />
1 parent cc32c7f commit 33d6580

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

backends/portfolio/tasks.rake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def pf_adoc2pdf(adoc_file, target_pname)
9999
"-a pdf-theme=#{$root}/ext/docs-resources/themes/riscv-pdf.yml",
100100
"-a pdf-fontsdir=#{$root}/ext/docs-resources/fonts",
101101
"-a imagesdir=#{$root}/ext/docs-resources/images",
102+
"-a bytefield-svg=#{$root}/node_modules/.bin/bytefield-svg",
102103
"-r asciidoctor-diagram",
103104
"-r idl_highlighter",
104105
"-o #{target_pname}",
@@ -134,6 +135,7 @@ def pf_adoc2html(adoc_file, target_pname)
134135
"-v",
135136
"-a toc",
136137
"-a imagesdir=#{$root}/ext/docs-resources/images",
138+
"-a bytefield-svg=#{$root}/node_modules/.bin/bytefield-svg",
137139
"-r asciidoctor-diagram",
138140
"-r idl_highlighter",
139141
"-o #{target_pname}",

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"@commitlint/config-conventional": "19.8.0",
1111
"asciidoctor-mathjax": "^0.0.5",
1212
"prettier": "3.4.2",
13-
"wavedrom-cli": "^3.1.1"
13+
"wavedrom-cli": "^3.1.1",
14+
"bytefield-svg": "^1.8.0"
1415
}
1516
}

0 commit comments

Comments
 (0)