<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sfcX/src/test/scala/firrtlTests/execution, branch 1.6.x</title>
<subtitle>Scala FIRRTL Compiler for chiselX</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/'/>
<entry>
<title>[deprecation clean up] remove trait firrtl.util.BackendCompilationUtilities (#2423)</title>
<updated>2021-11-30T03:16:02+00:00</updated>
<author>
<name>Jiuyang Liu</name>
</author>
<published>2021-11-30T03:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=a4d13a5024f7488e1d2b9fdd27d3917157a67268'/>
<id>a4d13a5024f7488e1d2b9fdd27d3917157a67268</id>
<content type='text'>
Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Change to Apache 2.0 License (#1901)</title>
<updated>2020-09-17T01:52:16+00:00</updated>
<author>
<name>Chick Markley</name>
</author>
<published>2020-09-17T01:52:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=ecb96e83324ea17cf38b7b90753d745d3c7f51bd'/>
<id>ecb96e83324ea17cf38b7b90753d745d3c7f51bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>All of src/ formatted with scalafmt</title>
<updated>2020-08-15T02:47:53+00:00</updated>
<author>
<name>chick</name>
</author>
<published>2020-08-15T02:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=6fc742bfaf5ee508a34189400a1a7dbffe3f1cac'/>
<id>6fc742bfaf5ee508a34189400a1a7dbffe3f1cac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>File Serialization of Annotations (#1277)</title>
<updated>2020-08-11T21:45:10+00:00</updated>
<author>
<name>Schuyler Eldridge</name>
</author>
<published>2020-08-11T21:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=8bdbbac28cbec95181dfd9742b2ac614f6833d01'/>
<id>8bdbbac28cbec95181dfd9742b2ac614f6833d01</id>
<content type='text'>
* Transform, not run in LegalizeAndReduction test

Switch from using FirrtlStage.transform to FirrtlStage.run in one
test. The latter is problematic as it doesn't include wrappers or
pre/post phases which are how things will work in the future for doing
file writing (via HowToSerialize ideas).

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Use execute in FIRRTL testing infra (not run)

Changes the FirrtlStage method in FIRRTL testing infrastructure from
"run" (which does not include Stage-global Phases) to "execute" (which
does).

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add HowToSerialize Annotation mix-in

This adds an Annotation mix-in, HowToSerialize, that allows an
annotation to declare how it should be serialized to a file. The
mix-in is abstract in a baseFileName and a suffix (used to generate a
filename), a howToSerialize method (defining the string contents of
the file), and a howToResume method (that defines a replacement for
the file-serialized annotation that allows this to be resumed) [^1].

A default implementation for generating a filename (called filename)
is defined that will put the baseFileName+suffix file in the target
directory. This can be overridden by the annotation if desired.

[^1]: When an annotation is serialized to a file, it should be removed
from the emitted JSON-serialized annotations. The howToResume method
defines a way of adding replacement annotations to the JSON-serialized
annotations that tell a downstream tool how to find the serialized
file. E.g., if a FIRRTL circuit is written to a file, this could be
used to add a FirrtlFileAnnotation defining the location of the new
file.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Handle HowToSerialize in WriteOutputAnnotations

This extends firrtl.options.phase.WriteOutputAnnotations to serialize
HowToSerialize annotations to files.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Test HowToSerialize in WriteOutputAnnotationsSpec

This adds tests of the HowToSerialize mix-in inside the
WriteOutputAnnotationsSpec.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* [skip chisel tests] Migrate to HowToSerialize

This migrates EmittedAnnotations (and its children) to mixin the
HowToSerialize trait. This enables this annotations to be
automatically written to files via WriteOutputAnnotations

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Deprecated firrtl.stage.phases.WriteEmitted

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Use streams in HowToSerialize

This converts the HowToSerialize trait to use a Stream[Char] when
defining how an annotation should be serialized.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Switch from Stream[Char] to Stream[Byte]

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Change howToSerialize method to Iterable

Change the type of the HowToSerialize.howToSerialize method from a
stream to an iterable. Using the latter (the superset of both lazy
streams and non-lazy things like String) avoids problems with users
having to choose laziness when they already have an eager object.

In effect, this makes the API more general.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add Scaladoc to HowToSerialize trait

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Change HowToSerialize to CustomFileEmission

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add default implementation of replacements

Add a default implementation of CustomFileEmission.replacements.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Avoid unnecessary 2x monad in CustomFileEmission

Change the type of CustomFileEmission.replacements from
Option[AnnotationSeq] to AnnotationSeq. The latter has all the
properties of the former that I'm trying to express here: (1) can
emptiness and (2) monadicity (if the AnnotationSeq is converted to a
sequence first). The latter property is exploited in the
WriteOutputAnnotations phase to concisely flatMap over the annotations
and doing the double-monad is unnecessary.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Restrict CustomFileEmission filename API

Change the API of CustomFileEmission to use a final def for the actual
filename. The baseFileName is then made a method with an AnnotationSeq
parameter to allow the filename to change as a function of other
annotations, e.g., by an output circuit annotation.

By restricting this API, we have more control over the default
behavior of where things are written using the fixed behavior of the
filename method---files will always be written using the behavior that
StageOptions define. Previously, if users want customized behavior,
they would need to duplicate this StageOptions functionality (and
likely subtly deviate from the standard behavior and introduce
problems with their build).

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add file conflict behavior for CustomFileEmission

Set behavior of file conflicts in CustomFileEmission to be the
following: No two annotations in the same annotation sequence can
serialize to the same file during the WriteOutputAnnotations phase.
However, if the output annotation file already exists, it will be
overwritten.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Return relative path from getBuildFileName

Change FirrtlOptions.getBuildFileName to simply serialize the
underlying Java File instead of converting this to its canonical path.
This should improve the relocatability of files produced by the
CustomFileEmission API.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Normalize paths in StageOptions.getBuildFile

Normalize paths inside the getBuildFileName utility of StageOptions.
Add a check to prevent a null pointer dereference.

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;
Co-authored-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;
Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Refer to CustomFIleEmission in deprecation message

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;
Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Simplify CustomFileEmission toBytes implementation

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;
Co-authored-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;
Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Use toBytes, not getBytes, in CustomFileEmission

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Transform, not run in LegalizeAndReduction test

Switch from using FirrtlStage.transform to FirrtlStage.run in one
test. The latter is problematic as it doesn't include wrappers or
pre/post phases which are how things will work in the future for doing
file writing (via HowToSerialize ideas).

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Use execute in FIRRTL testing infra (not run)

Changes the FirrtlStage method in FIRRTL testing infrastructure from
"run" (which does not include Stage-global Phases) to "execute" (which
does).

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add HowToSerialize Annotation mix-in

This adds an Annotation mix-in, HowToSerialize, that allows an
annotation to declare how it should be serialized to a file. The
mix-in is abstract in a baseFileName and a suffix (used to generate a
filename), a howToSerialize method (defining the string contents of
the file), and a howToResume method (that defines a replacement for
the file-serialized annotation that allows this to be resumed) [^1].

A default implementation for generating a filename (called filename)
is defined that will put the baseFileName+suffix file in the target
directory. This can be overridden by the annotation if desired.

[^1]: When an annotation is serialized to a file, it should be removed
from the emitted JSON-serialized annotations. The howToResume method
defines a way of adding replacement annotations to the JSON-serialized
annotations that tell a downstream tool how to find the serialized
file. E.g., if a FIRRTL circuit is written to a file, this could be
used to add a FirrtlFileAnnotation defining the location of the new
file.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Handle HowToSerialize in WriteOutputAnnotations

This extends firrtl.options.phase.WriteOutputAnnotations to serialize
HowToSerialize annotations to files.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Test HowToSerialize in WriteOutputAnnotationsSpec

This adds tests of the HowToSerialize mix-in inside the
WriteOutputAnnotationsSpec.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* [skip chisel tests] Migrate to HowToSerialize

This migrates EmittedAnnotations (and its children) to mixin the
HowToSerialize trait. This enables this annotations to be
automatically written to files via WriteOutputAnnotations

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Deprecated firrtl.stage.phases.WriteEmitted

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Use streams in HowToSerialize

This converts the HowToSerialize trait to use a Stream[Char] when
defining how an annotation should be serialized.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Switch from Stream[Char] to Stream[Byte]

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Change howToSerialize method to Iterable

Change the type of the HowToSerialize.howToSerialize method from a
stream to an iterable. Using the latter (the superset of both lazy
streams and non-lazy things like String) avoids problems with users
having to choose laziness when they already have an eager object.

In effect, this makes the API more general.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add Scaladoc to HowToSerialize trait

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Change HowToSerialize to CustomFileEmission

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add default implementation of replacements

Add a default implementation of CustomFileEmission.replacements.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Avoid unnecessary 2x monad in CustomFileEmission

Change the type of CustomFileEmission.replacements from
Option[AnnotationSeq] to AnnotationSeq. The latter has all the
properties of the former that I'm trying to express here: (1) can
emptiness and (2) monadicity (if the AnnotationSeq is converted to a
sequence first). The latter property is exploited in the
WriteOutputAnnotations phase to concisely flatMap over the annotations
and doing the double-monad is unnecessary.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Restrict CustomFileEmission filename API

Change the API of CustomFileEmission to use a final def for the actual
filename. The baseFileName is then made a method with an AnnotationSeq
parameter to allow the filename to change as a function of other
annotations, e.g., by an output circuit annotation.

By restricting this API, we have more control over the default
behavior of where things are written using the fixed behavior of the
filename method---files will always be written using the behavior that
StageOptions define. Previously, if users want customized behavior,
they would need to duplicate this StageOptions functionality (and
likely subtly deviate from the standard behavior and introduce
problems with their build).

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Add file conflict behavior for CustomFileEmission

Set behavior of file conflicts in CustomFileEmission to be the
following: No two annotations in the same annotation sequence can
serialize to the same file during the WriteOutputAnnotations phase.
However, if the output annotation file already exists, it will be
overwritten.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Return relative path from getBuildFileName

Change FirrtlOptions.getBuildFileName to simply serialize the
underlying Java File instead of converting this to its canonical path.
This should improve the relocatability of files produced by the
CustomFileEmission API.

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Normalize paths in StageOptions.getBuildFile

Normalize paths inside the getBuildFileName utility of StageOptions.
Add a check to prevent a null pointer dereference.

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;
Co-authored-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;
Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Refer to CustomFIleEmission in deprecation message

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;
Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Simplify CustomFileEmission toBytes implementation

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;
Co-authored-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;
Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

* Use toBytes, not getBytes, in CustomFileEmission

Signed-off-by: Schuyler Eldridge &lt;schuyler.eldridge@ibm.com&gt;

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Support Memory Initialization for Simulation and FPGA Flows (#1645)</title>
<updated>2020-06-22T19:35:41+00:00</updated>
<author>
<name>Kevin Laeufer</name>
</author>
<published>2020-06-22T19:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=732d08761a97faedb878f022927c2cb429398d6f'/>
<id>732d08761a97faedb878f022927c2cb429398d6f</id>
<content type='text'>
* Support Memory Initialization for Simulation and FPGA Flows

This adds a minimal annotation that allows users to
influence if memories are randomly initialized,
if all entries are initialized to the same scalar or
if each entry should be initialized to a different value.
We use the init block in order to initialize memories
which is supported by verilator as well as yosys
and has previously been used to randomize the initial
memory contents.

* LowerTypes: error when trying to split up a memory with MemoryInitAnnotation

Currently the MemoryInitAnnotation only works for
ground-type memories.
We catch misuse of this annotation at the point of
the firrtl compiler at which memories on non-ground type
get split up, i.e., the LowerTypes transform.
Chisel should try to prevent annotating non-ground
type memories in the frontend, but it is nice to
have an additional check.

* MemoryInitSpec: test JSON deserialization

* MemoryInitAnnotation: split up into three different annotations instead of exposing MemoryInitValue

Co-authored-by: Albert Magyar &lt;albert.magyar@gmail.com&gt;
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>
* Support Memory Initialization for Simulation and FPGA Flows

This adds a minimal annotation that allows users to
influence if memories are randomly initialized,
if all entries are initialized to the same scalar or
if each entry should be initialized to a different value.
We use the init block in order to initialize memories
which is supported by verilator as well as yosys
and has previously been used to randomize the initial
memory contents.

* LowerTypes: error when trying to split up a memory with MemoryInitAnnotation

Currently the MemoryInitAnnotation only works for
ground-type memories.
We catch misuse of this annotation at the point of
the firrtl compiler at which memories on non-ground type
get split up, i.e., the LowerTypes transform.
Chisel should try to prevent annotating non-ground
type memories in the frontend, but it is nice to
have an additional check.

* MemoryInitSpec: test JSON deserialization

* MemoryInitAnnotation: split up into three different annotations instead of exposing MemoryInitValue

Co-authored-by: Albert Magyar &lt;albert.magyar@gmail.com&gt;
Co-authored-by: mergify[bot] &lt;37929162+mergify[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[RFC] Factor out common test classes; package them (#1412)</title>
<updated>2020-03-17T20:26:40+00:00</updated>
<author>
<name>David Biancolin</name>
</author>
<published>2020-03-17T20:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=ba1f24345ac5ab20c669c73b871920001ac3a8ed'/>
<id>ba1f24345ac5ab20c669c73b871920001ac3a8ed</id>
<content type='text'>
* Pull out common test utilities into a separate package

* Project a fat jar for test utilities

Co-authored-by: Albert Magyar &lt;albert.magyar@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Pull out common test utilities into a separate package

* Project a fat jar for test utilities

Co-authored-by: Albert Magyar &lt;albert.magyar@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Removed unused imports in src/test/ (#1381)</title>
<updated>2020-02-12T03:46:46+00:00</updated>
<author>
<name>Jim Lawson</name>
</author>
<published>2020-02-12T03:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=081848854ce692964491cfc4fa8e8ed47c13bcef'/>
<id>081848854ce692964491cfc4fa8e8ed47c13bcef</id>
<content type='text'>
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>
Co-authored-by: mergify[bot] &lt;37929162+mergify[bot]@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Redirect testing shell commands to logger</title>
<updated>2020-01-08T03:35:50+00:00</updated>
<author>
<name>Jack Koenig</name>
</author>
<published>2019-11-29T23:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=3c8e22dc9e4f033be167aa721e6d8ad54330ca3c'/>
<id>3c8e22dc9e4f033be167aa721e6d8ad54330ca3c</id>
<content type='text'>
This includes the built-in functions in BackendCompilationUtilities
which are a public API
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This includes the built-in functions in BackendCompilationUtilities
which are a public API
</pre>
</div>
</content>
</entry>
<entry>
<title>Add library for streamlined Verilog execution tests</title>
<updated>2019-10-21T17:02:46+00:00</updated>
<author>
<name>Albert Magyar</name>
</author>
<published>2019-10-16T08:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sfcX/commit/?id=24df1cdcc0981f6e32662a42fe01135681db18c4'/>
<id>24df1cdcc0981f6e32662a42fe01135681db18c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
