Skip to content

Commit

Permalink
[patch] Remove dead alternative syntax
Browse files Browse the repository at this point in the history
Remove alternative syntax sections (which duplicate mandatory syntax
sections).  Remove syntax highlighting of deprecated syntax.

Signed-off-by: Schuyler Eldridge <[email protected]>
  • Loading branch information
seldridge committed Jun 30, 2023
1 parent 242c088 commit 046c3fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 60 deletions.
7 changes: 0 additions & 7 deletions include/firrtl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
<Detect2Chars char="{" char1="|" context="field" attribute="Separator"/>
<DetectChar char="{" context="field" attribute="Separator"/>
<DetectChar char="`" context="field" attribute="ID"/>
<Detect2Chars char="&lt;" char1="-" attribute="Operator" context="#stay"/>
<Detect2Chars char="=" char1="&gt;" attribute="Operator" context="#stay"/>
<AnyChar String=":=.,()" attribute="Separator" context="#stay"/>
<DetectChar char="[" attribute="Operator" context="widthOrDepthOrLit"/>
Expand All @@ -138,12 +137,6 @@
<context name="register" attribute="ID" lineEndContext="#pop">
<keyword String="types" attribute="Keyword" context="type"/>
<AnyChar String=":=&gt;.,()" attribute="Separator" context="#stay"/>
<StringDetect String="with" attribute="Keyword" context="#pop!registerinit"/>
</context>
<context name="registerinit" attribute="comment" lineEndContext="#stay">
<AnyChar String=":=&gt;.,()" attribute="Separator" context="#stay"/>
<StringDetect String="reset" attribute="Keyword" context="#pop"/>
<DetectChar char= ";" context="comment" attribute="Comment"/>
</context>
<context name="comment" attribute="Comment" lineEndContext="#pop">
</context>
Expand Down
54 changes: 1 addition & 53 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,43 +342,6 @@ The following string-encoded integer literals all have the value `-42`:
Radix-specified integer literals are only usable when constructing hardware
integer literals. Any use in place of an integer is disallowed.

### Alternative Syntax

A _radix-specified integer literal_ is a special integer literal with one of the
following leading character sequences to indicate the numerical encoding:

- `0b`{.firrtl} -- for representing binary numbers
- `0o`{.firrtl} -- for representing octal numbers
- `0d`{.firrtl} -- for representing decimal numbers
- `0h`{.firrtl} -- for representing hexadecimal numbers

Signed radix-specified integer literals have their sign _before_ the leading
character sequence.

The following radix-encoded integer literals all have the value `42`:

``` firrtl
0b101010
0o52
0d42
0h2a
```

The following radix-encoded integer literals all have the value `-42`:

``` firrtl
-0b101010
-0o52
-0d42
-0h2a
```

Radix-encoded integer literals are usable in any place where an integer would be
unless explicitly disallowed.

Radix-specified integer literals will replace string-encoded integer literals in
the 3.0.0 FIRRTL specification.

# Types

FIRRTL has three classes of types: _ground_ types, _aggregate_ types, and
Expand Down Expand Up @@ -490,7 +453,7 @@ The following example demonstrates usage of an asynchronous reset.
input clock : Clock
input reset : AsyncReset
input x : UInt<8>
reg y : UInt<8>, clock with : (reset => (reset, UInt(123)))
regreset y : UInt<8>, clock, reset, UInt(123)
; ...
```

Expand Down Expand Up @@ -1288,21 +1251,6 @@ regreset myreg: SInt, myclock, myreset, myinit
A register is initialized with an indeterminate value (see
[@sec:indeterminate-values]).

### Alternative Syntax

A register with a reset may also be declared using an alternative syntax using
the keyword `regreset`{.firrtl}. Using this syntax, the operation takes four
arguments: a type, a clock, a reset, and a reset value. This syntax will become
mandatory in the 3.0.0 FIRRTL specification.

``` firrtl
wire clock: Clock
wire reset: UInt<1>
wire resetValue: UInt<8>(0)
regreset a: UInt<8>, clock, reset, resetValue
; equivalent to reg a: UInt<8>, clock with: (reset => (reset, resetValue))
```

## Invalidates

An invalidate statement is used to indicate that a circuit component contains
Expand Down

0 comments on commit 046c3fc

Please sign in to comment.