diff options
| author | Alasdair Armstrong | 2018-01-05 17:26:07 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-01-05 17:26:07 +0000 |
| commit | 2cf9dc9d40794912ce8af7d776326b271f52d942 (patch) | |
| tree | fc7472ff4292de363dcbc313b53d760c323e28c9 /src/pretty_print_sail.ml | |
| parent | 8147deaf0bccdbb19d4c020583fc8a5c7b6197e8 (diff) | |
Added bitfield syntax to replicate register bits type
For example:
bitfield cr : vector(8, dec, bit) = {
CR0 : 7 .. 4,
LT : 7,
CR1 : 3 .. 2,
CR2 : 1,
CR3 : 0,
}
The difference this creates a newtype wrapper around the vector type,
then generates getters and setters for all the fields once, rather
than having to handle this construct separately in every backend.
Diffstat (limited to 'src/pretty_print_sail.ml')
| -rw-r--r-- | src/pretty_print_sail.ml | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml index 30eb71e0..38b9e134 100644 --- a/src/pretty_print_sail.ml +++ b/src/pretty_print_sail.ml @@ -432,16 +432,6 @@ let doc_typdef (TD_aux(td,_)) = match td with doc_op equals (concat [string "typedef"; space; doc_id id; doc_namescm nm]) (string "enumerate" ^^ space ^^ braces enums_doc) - | TD_register(id,n1,n2,rs) -> - let doc_rid (r,id) = separate space [doc_range r; colon; doc_id id] ^^ semi in - let doc_rids = group (separate_map (break 1) doc_rid rs) in - doc_op equals - (string "typedef" ^^ space ^^ doc_id id) - (separate space [ - string "register bits"; - brackets (doc_nexp n1 ^^ colon ^^ doc_nexp n2); - braces doc_rids; - ]) let doc_kindef (KD_aux(kd,_)) = match kd with | KD_nabbrev(kind,id,nm,n) -> |
