Skip to content

Using JSpec input

Scott Nellenbach edited this page Nov 7, 2017 · 6 revisions

Ordt can read pre-processed jspec (.js) files for describing registers. Ordt supports integer constant definition and simple constant arithmetic in jspec, but non-integer constants will be ignored by the parser. Also, while the internal register model used by ordt includes jspec field_set hierarchy, all outputs generated by ordt will collapse out field_sets and prepend any field_set instance names to the generated field names. Pack_msb and pad_msb are assumed when reading jspec.
Also, the ordt internal model assumes most attributes are at the field level, while jspec assigns some at the register level. Thus, some jspec register level attributes such as access_mode are used to set corresponding child field properties during jspec input processing. This allows outputs such as the uvm model to correctly reflect access configurations.

JSpec categories

Jspec category settings will be retained and passed through to some ordt outputs (xml, uvmregs, rdl, jspec). However, ordt does not use category values (in jspec or rdl input) directly when generating register rtl as the category info is insufficient/ambiguous in many cases. Ordt will perform a rudimentary translation of jspec category values to rdl properties as follows:

JSpec user-defined parameters

Jspec user-defined parameters (form: typedef param name = type) will be imported as rdl user-defined properties having prefix js_ appended to name. Supported types are string, integer, and boolean.