Skip to content

Commit

Permalink
Update JSON format doc with missing attribute
Browse files Browse the repository at this point in the history
For constant values used as input to a calculation, we require a
'bitwidth' attribute. This was missing in the documentation.
  • Loading branch information
antoninbas committed Aug 31, 2017
1 parent 48b1889 commit 1ef898d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/JSON_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,12 @@ attributes:
- `input`: a JSON array of objects with the following attributes:
- `type`: one of `field`, `hexstr`, `header`, `payload`
- `value`: the appropriate value or reference (see
[here](#the-type-value-object))
[here](#the-type-value-object)). For `hexstr`, we require an extra attribute
(in addition to `type` and `value`), `bitwidth`, whose value must be a
positive integer equal to the desired bitwidth for the constant. Note that
we require this attribute because the bitwidth cannot be inferred from the
hexadecimal string directly, as the desired bitwidth may not be a multiple
of a byte.

If `type` is `payload`, all the headers present after the last included header
(or after the enclosing header of the last included field) will be included in
Expand Down

0 comments on commit 1ef898d

Please sign in to comment.