Skip to content

Commit

Permalink
Merge pull request #14 from henry-hsieh/update-image
Browse files Browse the repository at this point in the history
Use bytefield to generate images
  • Loading branch information
Ddnirvana authored Sep 10, 2024
2 parents a5931da + 5dc4396 commit 357edc4
Show file tree
Hide file tree
Showing 9 changed files with 405 additions and 34 deletions.
78 changes: 78 additions & 0 deletions sspmp/images/bytefield/spmp-rv32.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[bytefield]
----
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 20}])
(def row-height 40)
(def row-header-fn nil)
(def boxes-per-row 20)
(draw-box "31" {:span 2 :text-anchor "start" :borders {}})
(draw-box "24" {:span 2 :text-anchor "end" :borders {}})
(draw-box "23" {:span 2 :text-anchor "start" :borders {}})
(draw-box "16" {:span 2 :text-anchor "end" :borders {}})
(draw-box "15" {:span 2 :text-anchor "start" :borders {}})
(draw-box "8" {:span 2 :text-anchor "end" :borders {}})
(draw-box "7" {:span 2 :text-anchor "start" :borders {}})
(draw-box "0" {:span 2 :text-anchor "end" :borders {}})
(draw-box nil {:span 4 :text-anchor "start" :borders {}})
(draw-box "spmp3cfg" {:span 4})
(draw-box "spmp2cfg" {:span 4})
(draw-box "spmp1cfg" {:span 4})
(draw-box "spmp0cfg" {:span 4})
(draw-box "spmpcfg0" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box nil {:span 4 :borders {}})
(draw-box "31" {:span 2 :text-anchor "start" :borders {}})
(draw-box "24" {:span 2 :text-anchor "end" :borders {}})
(draw-box "23" {:span 2 :text-anchor "start" :borders {}})
(draw-box "16" {:span 2 :text-anchor "end" :borders {}})
(draw-box "15" {:span 2 :text-anchor "start" :borders {}})
(draw-box "8" {:span 2 :text-anchor "end" :borders {}})
(draw-box "7" {:span 2 :text-anchor "start" :borders {}})
(draw-box "0" {:span 2 :text-anchor "end" :borders {}})
(draw-box nil {:span 4 :text-anchor "start" :borders {}})
(draw-box "spmp7cfg" {:span 4})
(draw-box "spmp6cfg" {:span 4})
(draw-box "spmp5cfg" {:span 4})
(draw-box "spmp4cfg" {:span 4})
(draw-box "spmpcfg1" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box nil {:span 4 :borders {}})
(draw-box nil {:span 20 :borders {}})
(draw-box nil {:span 8 :borders {}})
(draw-box "⋮" {:span 12 :text-anchor "start" :borders {}})
(draw-box nil {:span 20 :borders {}})
(draw-box "31" {:span 2 :text-anchor "start" :borders {}})
(draw-box "24" {:span 2 :text-anchor "end" :borders {}})
(draw-box "23" {:span 2 :text-anchor "start" :borders {}})
(draw-box "16" {:span 2 :text-anchor "end" :borders {}})
(draw-box "15" {:span 2 :text-anchor "start" :borders {}})
(draw-box "8" {:span 2 :text-anchor "end" :borders {}})
(draw-box "7" {:span 2 :text-anchor "start" :borders {}})
(draw-box "0" {:span 2 :text-anchor "end" :borders {}})
(draw-box nil {:span 4 :text-anchor "start" :borders {}})
(draw-box "spmp63cfg" {:span 4})
(draw-box "spmp62cfg" {:span 4})
(draw-box "spmp61cfg" {:span 4})
(draw-box "spmp60cfg" {:span 4})
(draw-box "spmpcfg15" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box nil {:span 4 :borders {}})
----
129 changes: 129 additions & 0 deletions sspmp/images/bytefield/spmp-rv64.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
[bytefield]
----
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 20}])
(def row-height 40)
(def row-header-fn nil)
(def boxes-per-row 40)
(draw-box "63" {:span 2 :text-anchor "start" :borders {}})
(draw-box "56" {:span 2 :text-anchor "end" :borders {}})
(draw-box "55" {:span 2 :text-anchor "start" :borders {}})
(draw-box "48" {:span 2 :text-anchor "end" :borders {}})
(draw-box "47" {:span 2 :text-anchor "start" :borders {}})
(draw-box "40" {:span 2 :text-anchor "end" :borders {}})
(draw-box "39" {:span 2 :text-anchor "start" :borders {}})
(draw-box "32" {:span 2 :text-anchor "end" :borders {}})
(draw-box "31" {:span 2 :text-anchor "start" :borders {}})
(draw-box "24" {:span 2 :text-anchor "end" :borders {}})
(draw-box "23" {:span 2 :text-anchor "start" :borders {}})
(draw-box "16" {:span 2 :text-anchor "end" :borders {}})
(draw-box "15" {:span 2 :text-anchor "start" :borders {}})
(draw-box "8" {:span 2 :text-anchor "end" :borders {}})
(draw-box "7" {:span 2 :text-anchor "start" :borders {}})
(draw-box "0" {:span 2 :text-anchor "end" :borders {}})
(draw-box nil {:span 8 :text-anchor "start" :borders {}})
(draw-box "spmp7cfg" {:span 4})
(draw-box "spmp6cfg" {:span 4})
(draw-box "spmp5cfg" {:span 4})
(draw-box "spmp4cfg" {:span 4})
(draw-box "spmp3cfg" {:span 4})
(draw-box "spmp2cfg" {:span 4})
(draw-box "spmp1cfg" {:span 4})
(draw-box "spmp0cfg" {:span 4})
(draw-box "spmpcfg0" {:span 4 :borders {}})
(draw-box nil {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box nil {:span 8 :borders {}})
(draw-box "63" {:span 2 :text-anchor "start" :borders {}})
(draw-box "56" {:span 2 :text-anchor "end" :borders {}})
(draw-box "55" {:span 2 :text-anchor "start" :borders {}})
(draw-box "48" {:span 2 :text-anchor "end" :borders {}})
(draw-box "47" {:span 2 :text-anchor "start" :borders {}})
(draw-box "40" {:span 2 :text-anchor "end" :borders {}})
(draw-box "39" {:span 2 :text-anchor "start" :borders {}})
(draw-box "32" {:span 2 :text-anchor "end" :borders {}})
(draw-box "31" {:span 2 :text-anchor "start" :borders {}})
(draw-box "24" {:span 2 :text-anchor "end" :borders {}})
(draw-box "23" {:span 2 :text-anchor "start" :borders {}})
(draw-box "16" {:span 2 :text-anchor "end" :borders {}})
(draw-box "15" {:span 2 :text-anchor "start" :borders {}})
(draw-box "8" {:span 2 :text-anchor "end" :borders {}})
(draw-box "7" {:span 2 :text-anchor "start" :borders {}})
(draw-box "0" {:span 2 :text-anchor "end" :borders {}})
(draw-box nil {:span 8 :text-anchor "start" :borders {}})
(draw-box "spmp15cfg" {:span 4})
(draw-box "spmp14cfg" {:span 4})
(draw-box "spmp13cfg" {:span 4})
(draw-box "spmp12cfg" {:span 4})
(draw-box "spmp11cfg" {:span 4})
(draw-box "spmp10cfg" {:span 4})
(draw-box "spmp9cfg" {:span 4})
(draw-box "spmp8cfg" {:span 4})
(draw-box "spmpcfg2" {:span 4 :borders {}})
(draw-box nil {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box nil {:span 8 :borders {}})
(draw-box nil {:span 40 :borders {}})
(draw-box nil {:span 16 :borders {}})
(draw-box "⋮" {:span 24 :text-anchor "start" :borders {}})
(draw-box nil {:span 40 :borders {}})
(draw-box "63" {:span 2 :text-anchor "start" :borders {}})
(draw-box "56" {:span 2 :text-anchor "end" :borders {}})
(draw-box "55" {:span 2 :text-anchor "start" :borders {}})
(draw-box "48" {:span 2 :text-anchor "end" :borders {}})
(draw-box "47" {:span 2 :text-anchor "start" :borders {}})
(draw-box "40" {:span 2 :text-anchor "end" :borders {}})
(draw-box "39" {:span 2 :text-anchor "start" :borders {}})
(draw-box "32" {:span 2 :text-anchor "end" :borders {}})
(draw-box "31" {:span 2 :text-anchor "start" :borders {}})
(draw-box "24" {:span 2 :text-anchor "end" :borders {}})
(draw-box "23" {:span 2 :text-anchor "start" :borders {}})
(draw-box "16" {:span 2 :text-anchor "end" :borders {}})
(draw-box "15" {:span 2 :text-anchor "start" :borders {}})
(draw-box "8" {:span 2 :text-anchor "end" :borders {}})
(draw-box "7" {:span 2 :text-anchor "start" :borders {}})
(draw-box "0" {:span 2 :text-anchor "end" :borders {}})
(draw-box nil {:span 8 :text-anchor "start" :borders {}})
(draw-box "spmp63cfg" {:span 4})
(draw-box "spmp62cfg" {:span 4})
(draw-box "spmp61cfg" {:span 4})
(draw-box "spmp60cfg" {:span 4})
(draw-box "spmp59cfg" {:span 4})
(draw-box "spmp58cfg" {:span 4})
(draw-box "spmp57cfg" {:span 4})
(draw-box "spmp56cfg" {:span 4})
(draw-box "spmpcfg14" {:span 4 :borders {}})
(draw-box nil {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box "8" {:span 4 :borders {}})
(draw-box nil {:span 8 :borders {}})
----
13 changes: 13 additions & 0 deletions sspmp/images/bytefield/spmpaddr-rv32.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[bytefield]
----
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 20}])
(def row-height 40)
(def row-header-fn nil)
(def boxes-per-row 32)
(draw-column-headers {:height 20 :font-size 18 :labels (reverse ["0" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "31"])})
(draw-box "address[33:2]" {:span 16 :text-anchor "end" :borders {:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-size 20 :font-weight "bold"}) {:span 16 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "32" {:span 32 :borders {}})
----
15 changes: 15 additions & 0 deletions sspmp/images/bytefield/spmpaddr-rv64.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[bytefield]
----
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 20}])
(def row-height 40)
(def row-header-fn nil)
(def boxes-per-row 32)
(draw-column-headers {:height 20 :font-size 18 :labels (reverse ["0" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "53" "54" "" "" "" "" "" "" "63"])})
(draw-box (text "WARL" {:font-size 20 :font-weight "bold"}) {:span 8})
(draw-box "address[55:2]" {:span 12 :text-anchor "end" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-size 20 :font-weight "bold"}) {:span 12 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "10" {:span 8 :borders {}})
(draw-box "54" {:span 24 :borders {}})
----
35 changes: 35 additions & 0 deletions sspmp/images/bytefield/spmpcfg.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[bytefield]
----
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 20}])
(def row-height 40)
(def row-header-fn nil)
(def boxes-per-row 32)
(draw-box "7" {:span 5 :borders {}})
(draw-box "6" {:span 3 :text-anchor "start" :borders {}})
(draw-box "5" {:span 3 :text-anchor "end" :borders {}})
(draw-box "4" {:span 3 :text-anchor "left" :borders {}})
(draw-box "3" {:span 3 :text-anchor "end" :borders {}})
(draw-box "2" {:span 5 :borders {}})
(draw-box "1" {:span 5 :borders {}})
(draw-box "0" {:span 5 :borders {}})
(draw-box "S" {:span 2 :text-anchor "end" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-weight "bold" :font-size 20}) {:span 3 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "Reserved" {:span 6 :text-anchor "middle" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box "A" {:span 3 :text-anchor "end" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-weight "bold" :font-size 20}) {:span 3 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "X" {:span 2 :text-anchor "end" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-weight "bold" :font-size 20}) {:span 3 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "W" {:span 2 :text-anchor "end" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-weight "bold" :font-size 20}) {:span 3 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "R" {:span 2 :text-anchor "end" :borders{:top :border-unrelated :bottom :border-unrelated :left :border-unrelated}})
(draw-box (text "(WARL)" {:font-weight "bold" :font-size 20}) {:span 3 :text-anchor "start" :borders{:top :border-unrelated :bottom :border-unrelated :right :border-unrelated}})
(draw-box "1" {:span 5 :borders {}})
(draw-box "2" {:span 6 :borders {}})
(draw-box "2" {:span 6 :borders {}})
(draw-box "1" {:span 5 :borders {}})
(draw-box "1" {:span 5 :borders {}})
(draw-box "1" {:span 5 :borders {}})
----
Loading

0 comments on commit 357edc4

Please sign in to comment.