Replies: 2 comments 1 reply
-
Stepping up a level, there are several things we want to identify about each statement in the prose.
Given that, here is a strawman for how we might represent prose in the database: For the prose:
description:
- type: spec # short for normative
text: |
The `mimpid` CSR provides a unique encoding of the version of the processor implementation.
id: misa-01
- type: spec
text: |
This register must be readable in any implementation,
but a value of 0 can be returned to indicate that the field is not implemented.
misa-02
- type: spec
text: |
The Implementation value should reflect the design of the RISC-V processor itself
and not any surrounding system.
id: misa-03
- type: spec
text: |
The `mimpid` CSR is MXLEN (32) bits long.
cond: XLEN == 32
id: misa-04
- type: spec
text: |
The `mimpid` CSR is MXLEN (64) bits long.
cond: XLEN == 64
id: misa-05
- type: info # short for non-normative
text: |
The format of this field is left to the provider of the architecture source code,
but will often be printed by standard tools as a hexadecimal string without any leading
or trailing zeros, so the Implementation value can be left-justified (i.e., filled in from
most-significant nibble down) with subfields aligned on nibble boundaries to ease human
readability.
id: misa-06 Things I like:
Things I don't like:
Note that we can probably come up with a way to generate the ids so you would never have to hand-type those. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
Those "id" fields might become a pain to maintain. Do they need to persist, forever associated with the text? If a statement gets split during editing, does the original "id" need to continue to be associated with each new statement? I guess there could be some CI magic that tried to maintain order, but even that seems challenging. (Maybe it's good that editing the spec will become very difficult, and require great attention to detail?) |
Beta Was this translation helpful? Give feedback.
-
We've tried two methods to conditionally apply asciidoc source depending on parameters or equations.
First, we tried using ERB. It works fine but requires some basic knowledge of Ruby.
Second, we tried using a [when,"condition"] Asciidoc style. It works for asciidoctor.js because I made a plugin, but doesn't work with asciidoctor(-pdf) because there is no plugin there yet.
I'm not sold on either approach. More discussion is needed.
Beta Was this translation helpful? Give feedback.
All reactions