<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chiselX/src/test/scala/chisel3/internal, branch scala3-support</title>
<subtitle>Chisel with SFC compatibility</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/chiselX/'/>
<entry>
<title>Implement compressed Namespace (backport #2856) (#2860)</title>
<updated>2022-11-29T17:24:38+00:00</updated>
<author>
<name>mergify[bot]</name>
</author>
<published>2022-11-29T17:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/chiselX/commit/?id=c21f31d09f2511497cea5cb03bd6ddba440c55fe'/>
<id>c21f31d09f2511497cea5cb03bd6ddba440c55fe</id>
<content type='text'>
* Implement compressed Namespace (#2856)

The namespace disambiguates requests for the same name with _&lt;idx&gt;.
Rather than storing every disambiguated name in the underlying HashMap,
it now only stores the base along with the "next available" index. This
makes the logic for checking if a name is already contained in the
namespace slightly more sophisticated because users can name things in a
way that will collide with disambiguated names from a common substring.

For example, in naming the sequence "foo", "foo", "foo_1", the 2nd "foo"
takes the name "foo_1" so the following "foo_1" gets disambiguated to
"foo_1_1". But since we compressed that original "foo_1" into the same
HashMap entry as just "foo", we have to do a form of "prefix checking"
whenever naming something that ends in "_&lt;idx&gt;".

In practice, the saved memory allocations more than make up for the more
complicated logic to disambiguate names because the common case is still
fast.

(cherry picked from commit 1654d87a02ca799bf12805a611a91e7524d49843)

# Conflicts:
#	core/src/main/scala/chisel3/internal/Builder.scala

* Resolve backport conflicts

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Implement compressed Namespace (#2856)

The namespace disambiguates requests for the same name with _&lt;idx&gt;.
Rather than storing every disambiguated name in the underlying HashMap,
it now only stores the base along with the "next available" index. This
makes the logic for checking if a name is already contained in the
namespace slightly more sophisticated because users can name things in a
way that will collide with disambiguated names from a common substring.

For example, in naming the sequence "foo", "foo", "foo_1", the 2nd "foo"
takes the name "foo_1" so the following "foo_1" gets disambiguated to
"foo_1_1". But since we compressed that original "foo_1" into the same
HashMap entry as just "foo", we have to do a form of "prefix checking"
whenever naming something that ends in "_&lt;idx&gt;".

In practice, the saved memory allocations more than make up for the more
complicated logic to disambiguate names because the common case is still
fast.

(cherry picked from commit 1654d87a02ca799bf12805a611a91e7524d49843)

# Conflicts:
#	core/src/main/scala/chisel3/internal/Builder.scala

* Resolve backport conflicts

Co-authored-by: Jack Koenig &lt;koenig@sifive.com&gt;</pre>
</div>
</content>
</entry>
</feed>
