Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify capability encoding diagrams #191

Open
arichardson opened this issue Apr 8, 2024 · 0 comments
Open

Simplify capability encoding diagrams #191

arichardson opened this issue Apr 8, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@arichardson
Copy link
Collaborator

Showing all the bounds components the capability encoding overview diagram immediately exposes readers to a lot of complexity that only needs to be understood when implementing the encoding/decoding. Grouping everything together as a BOUNDS field and having the bounds decoding section describe how this is interpreted would push some of that complexity to a more appropriate subsection.
I think the suggestions from @Timmmm in #23 (comment) makes a lot of sense:


image
image

The other thing that I think would make things clearer is a separate diagram for E=0, but that can probably wait, or maybe go in a separate explanatory document.

image

[bytefield]
----
(def svg-attrs {:style "background-color:white"})
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 30}])
(defattrs :bg-yellow {:fill "#ffffc0"})
(def row-height 80)
(def row-header-fn nil)
(def left-margin 30)
(def right-margin 30)
(def bottom-margin 30)
(def boxes-per-row 32)
(draw-column-headers {:height 50 :font-size 26 :labels [
    "63" "" "" "57"
    "56" "53"
    "52" "48"
    "47" "" "" "" "" "" "" "" "28"
    "27"
    "26" "" "" "" "" "" "" "" "" "" "" "" "" "0"
]})

(draw-box "Reserved"    {:span 4})
(draw-box "SDP"         {:span 2})
(draw-box "AP"          {:span 2})
(draw-box "Reserved"    {:span 9})
(draw-box "S"           {:span 1})
(draw-box "BOUNDS"      [{:span 14} :bg-yellow])
(draw-box "Address"     {:span 32})
----

[bytefield]
----
(def svg-attrs {:style "background-color:white"})
(defattrs :plain [:plain {:font-family "M+ 1p Fallback" :font-size 30}])
(defattrs :bg-yellow {:fill "#ffffc0"})
(def row-height 80)
(def left-margin 30)
(def right-margin 30)
(def bottom-margin 30)
(def boxes-per-row 14)
(draw-column-headers {:height 50 :font-size 26 :labels [
    "26"
    "25" "" "" "17"
    "16" "14"
    "13" "" "" "" "3"
    "2" "0"
]})

(draw-box "EF"          [{:span 1} :bg-yellow])
(draw-box "T[11:3]"     [{:span 4} :bg-yellow])
(draw-box "TE"          [{:span 2} :bg-yellow])
(draw-box "B[13:3]"     [{:span 5} :bg-yellow])
(draw-box "BE"          [{:span 2} :bg-yellow])
----
@arichardson arichardson added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant