<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sfcX/src/main/scala/firrtl/backends, branch master</title>
<subtitle>Scala FIRRTL Compiler for chiselX</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/'/>
<entry>
<title>smt: make SMTExprMap object public (#2534)</title>
<updated>2022-08-03T16:05:36+00:00</updated>
<author>
<name>Kevin Laeufer</name>
</author>
<published>2022-08-03T16:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=ad0dd6a2808789d0eda3665d5f565f0988db2c77'/>
<id>ad0dd6a2808789d0eda3665d5f565f0988db2c77</id>
<content type='text'>
The simple functionality is needed in chiseltest.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The simple functionality is needed in chiseltest.</pre>
</div>
</content>
</entry>
<entry>
<title>Fold VerilogModulusCleanup into LegalizeVerilog (#2485)</title>
<updated>2022-03-02T17:31:57+00:00</updated>
<author>
<name>Jack Koenig</name>
</author>
<published>2022-03-02T17:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=95cae3cd0eb9ac72eb6373207dbf9f09fb1c7086'/>
<id>95cae3cd0eb9ac72eb6373207dbf9f09fb1c7086</id>
<content type='text'>
This fixes handling of signed modulus and removes some redundant work.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes handling of signed modulus and removes some redundant work.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix faulty MemorySynthInit behavior (#2468)</title>
<updated>2022-01-27T04:50:47+00:00</updated>
<author>
<name>John's Brew</name>
</author>
<published>2022-01-27T04:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=475c165ccf8a52f79a94766450c23090f15d1393'/>
<id>475c165ccf8a52f79a94766450c23090f15d1393</id>
<content type='text'>
- Fix &amp; test MemorySynthInit behavior with MemoryArrayInitAnnotation and MemoryScalarInitAnnotation.
Add test case for MemoryRandomInitAnnotation which is, on the contrary, expected not to leak any randomization statement in synthesis context.

- Refactor MemoryInitSpec for improved results readability

Context:

PR #2166 (commit: 4530152) introduced MemorySynthInit annotation to control whether statement generated with Memory*InitAnnotation (emitted within initial begin block in verilog) should be guarded with ifndef SYNTHESIS or not.
Unfortunately only one configuration (MemoryFileInlineAnnotation) has been tested while the others have been generating incorrect verilog statements (MemoryArrayInitAnnotation and MemoryScalarInitAnnotation).

Signed-off-by: Jean Bruant &lt;jean.bruant@ovhcloud.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix &amp; test MemorySynthInit behavior with MemoryArrayInitAnnotation and MemoryScalarInitAnnotation.
Add test case for MemoryRandomInitAnnotation which is, on the contrary, expected not to leak any randomization statement in synthesis context.

- Refactor MemoryInitSpec for improved results readability

Context:

PR #2166 (commit: 4530152) introduced MemorySynthInit annotation to control whether statement generated with Memory*InitAnnotation (emitted within initial begin block in verilog) should be guarded with ifndef SYNTHESIS or not.
Unfortunately only one configuration (MemoryFileInlineAnnotation) has been tested while the others have been generating incorrect verilog statements (MemoryArrayInitAnnotation and MemoryScalarInitAnnotation).

Signed-off-by: Jean Bruant &lt;jean.bruant@ovhcloud.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[smt] correct comparison for out-of-bounds memory access check (#2463)</title>
<updated>2022-01-17T23:29:14+00:00</updated>
<author>
<name>Kevin Laeufer</name>
</author>
<published>2022-01-17T23:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=5569c72c1b6246efd203e00f7af6041567575eec'/>
<id>5569c72c1b6246efd203e00f7af6041567575eec</id>
<content type='text'>
This fixes an off by one error, where 3 was erroneously
accepted as in-bounds for a memory of depth=3</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes an off by one error, where 3 was erroneously
accepted as in-bounds for a memory of depth=3</pre>
</div>
</content>
</entry>
<entry>
<title>Add FileInfo to asyncResetAlwaysBlocks (#2451)</title>
<updated>2022-01-06T04:17:52+00:00</updated>
<author>
<name>sinofp</name>
</author>
<published>2022-01-06T04:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=3e494b5cceda14a73f288a293dd007a82be18bb8'/>
<id>3e494b5cceda14a73f288a293dd007a82be18bb8</id>
<content type='text'>
* Add FileInfo to asyncResetAlwaysBlocks

Always blocks need three FileInfo (if, true, false) to show line numbers,
but initially, every always blocks only have one FileInfo (false).

RemoveReset adds the extra two FileInfo to sync always blocks,
so sync always blocks can have line numbers.

Async always blocks don't provide their only FileInfo, so there are no line numbers.

This commit gives async always block the extra FileInfo to show line numbers for them.

This code:

```scala
import chisel3._
import chisel3.stage._
import firrtl.CustomDefaultRegisterEmission

class Test extends Module with RequireAsyncReset {
  val io = IO(new Bundle {
    val in = Input(Bool())
    val out = Output(Bool())
  })
  val valid = RegInit(false.B)
  valid := io.in
  io.out := valid
}

object Test extends App {
  new ChiselStage().execute(Array(), Seq(
    ChiselGeneratorAnnotation(() =&gt; new Test()),
    CustomDefaultRegisterEmission(useInitAsPreset = false, disableRandomization = true)
  ))
}
```

will generate this Verilog:

```verilog
module Test(
  input   clock,
  input   reset,
  input   io_in,
  output  io_out
);
  reg  valid; // @[Playground.scala 10:22]
  assign io_out = valid; // @[Playground.scala 12:10]
  always @(posedge clock or posedge reset) begin
    if (reset) begin // @[Playground.scala 10:22]
      valid &lt;= 1'h0; // @[Playground.scala 10:22]
    end else begin
      valid &lt;= io_in; // @[Playground.scala 11:9]
    end
  end
endmodule
```

they have correct line numbers (10, 10, 11).

* Add test for async always block line numbers

* Add comment for review</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add FileInfo to asyncResetAlwaysBlocks

Always blocks need three FileInfo (if, true, false) to show line numbers,
but initially, every always blocks only have one FileInfo (false).

RemoveReset adds the extra two FileInfo to sync always blocks,
so sync always blocks can have line numbers.

Async always blocks don't provide their only FileInfo, so there are no line numbers.

This commit gives async always block the extra FileInfo to show line numbers for them.

This code:

```scala
import chisel3._
import chisel3.stage._
import firrtl.CustomDefaultRegisterEmission

class Test extends Module with RequireAsyncReset {
  val io = IO(new Bundle {
    val in = Input(Bool())
    val out = Output(Bool())
  })
  val valid = RegInit(false.B)
  valid := io.in
  io.out := valid
}

object Test extends App {
  new ChiselStage().execute(Array(), Seq(
    ChiselGeneratorAnnotation(() =&gt; new Test()),
    CustomDefaultRegisterEmission(useInitAsPreset = false, disableRandomization = true)
  ))
}
```

will generate this Verilog:

```verilog
module Test(
  input   clock,
  input   reset,
  input   io_in,
  output  io_out
);
  reg  valid; // @[Playground.scala 10:22]
  assign io_out = valid; // @[Playground.scala 12:10]
  always @(posedge clock or posedge reset) begin
    if (reset) begin // @[Playground.scala 10:22]
      valid &lt;= 1'h0; // @[Playground.scala 10:22]
    end else begin
      valid &lt;= io_in; // @[Playground.scala 11:9]
    end
  end
endmodule
```

they have correct line numbers (10, 10, 11).

* Add test for async always block line numbers

* Add comment for review</pre>
</div>
</content>
</entry>
<entry>
<title>Remove some warnings (#2448)</title>
<updated>2021-12-22T02:47:18+00:00</updated>
<author>
<name>Jack Koenig</name>
</author>
<published>2021-12-22T02:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=4f3d1003811aa38d10e32b347c8607414d9be034'/>
<id>4f3d1003811aa38d10e32b347c8607414d9be034</id>
<content type='text'>
* Fix unreachable code warning by changing match order

Simulation Statements did not previously extend IsDeclaration, but now
they do so their match blocks need to be above IsDeclaration.

* Handle MemoryNoInit case in RtlilEmitter

* Remove use of deprecated logToFile

* Fix uses of LegalizeClocksTransform

Replaced all uses of LegalizeClocksTransform with
LegalizeClocksAndAsyncResetsTransform.

* Remove use of CircuitForm in ZeroWidth</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix unreachable code warning by changing match order

Simulation Statements did not previously extend IsDeclaration, but now
they do so their match blocks need to be above IsDeclaration.

* Handle MemoryNoInit case in RtlilEmitter

* Remove use of deprecated logToFile

* Fix uses of LegalizeClocksTransform

Replaced all uses of LegalizeClocksTransform with
LegalizeClocksAndAsyncResetsTransform.

* Remove use of CircuitForm in ZeroWidth</pre>
</div>
</content>
</entry>
<entry>
<title>smt: deal correctly with negative SInt literals (#2447)</title>
<updated>2021-12-21T17:07:30+00:00</updated>
<author>
<name>Kevin Laeufer</name>
</author>
<published>2021-12-21T17:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=2d197c841c5400c6deaa1592525be6a1d81dc1e2'/>
<id>2d197c841c5400c6deaa1592525be6a1d81dc1e2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>smt: correctly serialize array index on read (#2446)</title>
<updated>2021-12-17T20:04:52+00:00</updated>
<author>
<name>Kevin Laeufer</name>
</author>
<published>2021-12-17T20:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=57ce615d73995a29f89c2f9b11482fe80442439b'/>
<id>57ce615d73995a29f89c2f9b11482fe80442439b</id>
<content type='text'>
This should fix issue #2436</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should fix issue #2436</pre>
</div>
</content>
</entry>
<entry>
<title>Deprecate all mutable methods on RenameMap (#2444)</title>
<updated>2021-12-17T18:07:25+00:00</updated>
<author>
<name>Jack Koenig</name>
</author>
<published>2021-12-17T18:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=37c8528cfed4395924820b54498ef761ded17393'/>
<id>37c8528cfed4395924820b54498ef761ded17393</id>
<content type='text'>
* Add renamemap.MutableRenameMap which includes these methods without
  deprecation
* Deprecate Stringly typed RenameMap APIs which were accidentally
  undeprecated a while ago

Co-authored-by: mergify[bot] &lt;37929162+mergify[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add renamemap.MutableRenameMap which includes these methods without
  deprecation
* Deprecate Stringly typed RenameMap APIs which were accidentally
  undeprecated a while ago

Co-authored-by: mergify[bot] &lt;37929162+mergify[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Disable random init (#2396)</title>
<updated>2021-11-19T19:17:37+00:00</updated>
<author>
<name>Jiuyang Liu</name>
</author>
<published>2021-11-19T19:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=b027eb466b033a0a9d229f19feb931ddb292a9fa'/>
<id>b027eb466b033a0a9d229f19feb931ddb292a9fa</id>
<content type='text'>
* Add option to disable random mem/reg init

Co-authored-by: Jiuyang Liu &lt;liu@jiuyang.me&gt;

* fix for code review.

Co-authored-by: SharzyL &lt;me@sharzy.in&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add option to disable random mem/reg init

Co-authored-by: Jiuyang Liu &lt;liu@jiuyang.me&gt;

* fix for code review.

Co-authored-by: SharzyL &lt;me@sharzy.in&gt;</pre>
</div>
</content>
</entry>
</feed>
