| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/
| |
| |
| | |
This also fixes an edge case with (*keep*) input ports.
|
|/ |
|
|\
| |
| | |
cxxrtl: various compiler compatibility fixes
|
| |
| |
| |
| | |
This is necessary to be able to build CXXRTL models via yosys-config.
|
| | |
|
| | |
|
|\ \
| |/
|/| |
cxxrtl: disambiguate values/wires and their aliases in debug info
|
|/
|
|
|
|
|
| |
With this change, it is easier to see which signals carry state (only
wire<>s appear as `reg` in VCD files) and to construct a minimal
checkpoint (CXXRTL_WIRE debug items represent the canonical smallest
set of state required to fully reconstruct the simulation).
|
|\
| |
| | |
cxxrtl: introduce -Og optimization level
|
| |
| |
| |
| |
| |
| |
| | |
Although logically two separate steps, these were treated as one for
historic reasons. Splitting the two makes it possible to have designs
that are only 2× slower than fastest possible (and are without extra
delta cycles) that allow probing all public wires.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Historically, elision was implemented before localization, so levels
with elision are lower than corresponding levels with localization.
This is unfortunate for two reasons:
1. Elision is a logical subset of localization, since it equals to
not giving a name to a temporary.
2. "Localize" currently actually means "unbuffer and localize",
and it would be useful to split those steps (at least for
public wires) for improved design visibility.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Although these options can be thought of as optimizations, they are
essentially orthogonal to the core of -O, which is managing signal
buffering and scope. Going from -O4 to -O2 means going from limited
to complete design visibility, yet in both cases proc and flatten
are desirable.
|
|\ \
| | |
| | | |
Do not optimize away FFs in "prep" and Verific front-end
|
| | |
| | |
| | |
| | |
| | |
| | | |
This only passed before because "prep" was also running opt_rmdff
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
|
| |/
| |
| |
| | |
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
|
|\ \
| | |
| | | |
verific - detect missing memory to prevent crash.
|
|/ / |
|
|\ \
| |/
|/| |
Add latch detection for use_case_method in part-select write
|
| |
| |
| |
| | |
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
|
|\ \
| | |
| | | |
flatten: accept processes
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
cxxrtl: fix two buggy split_by functions
|
|/ / |
|
|\ \
| | |
| | | |
cxxrtl: ignore cell input signedness when it is irrelevant
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before this commit, Verilog expressions like `x && 1` would result in
references to `logic_and_us` in generated CXXRTL code, which would
not compile. After this commit, since cells like that actually behave
the same regardless of signedness attributes, the signedness is
ignored, which also reduces the template instantiation pressure.
|
|\ \ \
| |/ /
|/| | |
cxxrtl: add missing namespace
|
|/ /
| |
| |
| | |
Fixes #2124.
|
|\ \
| | |
| | | |
flatten: preserve original object names
|
| | |
| | |
| | |
| | |
| | | |
The CXXRTL code that handled the `hdlname` attribute implemented
outdated semantics.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| | |
The only difference in behavior is that this removes the attribute
when the pool becomes empty.
|
|\ \
| | |
| | | |
flatten: make hygienic
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this commit, `flatten` matched the template objects with
the newly created objects solely by their name. Because of this,
it could be confused by code such as:
module bar();
$dff a();
endmodule
module foo();
bar b();
$dff \b.a ();
endmodule
After this commit, `flatten` avoids every possible case of name
collision.
Fixes #2106.
|
|\ \
| | |
| | | |
cxxrtl: improve design visibility
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit changes the VCD writer such that for all signals that
have `debug_item.type == VALUE && debug_item.next == nullptr`, it
would only sample the value once.
Commit f2d7a187 added more debug information by including constant
wires, and decreased the performance of VCD writer proportionally
because the constant wires were still repeatedly sampled; this commit
eliminates the performance hit.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Constant wires can represent a significant chunk of the design in
generic designs or after optimization. Emitting them in VCD files
significantly improves usability because gtkwave removes all traces
that are not present in the VCD file after reload, and iterative
development suffers if switching a varying signal to a constant
disrupts the workflow.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit changes the VCD writer such that for all signals that
share `debug_item.curr`, it would only emit a single VCD identifier,
and sample the value once.
Commit 9b39c6f7 added redundancy to debug information by including
alias wires, and increased the size of VCD files proportionally; this
commit eliminates the redundancy from VCD files so that their size
is the same as before.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Alias wires can represent a significant chunk of the design in highly
hierarchical designs; in Minerva SRAM, there are 273 member wires and
527 alias wires. Showing them in every hierarchy level significantly
improves usability.
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Silence warning in select.cc and pass some more args by ref
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before this patch, the code passed around std::string objects by
value. It's probably not a hot-spot, but it can't hurt to avoid the
copying.
Removing the copy and clean-up code means the resulting code is ~6.1kb
smaller when compiled with GCC 9.3 and standard settings.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Pass a string argument by reference
- Avoid multiple calls to IdString::str and IdString::c_str
- Avoid combining checks for size > 0 and first char (C strings are
null terminated, so foo[0] != '\0' implies that foo has positive
length)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With GCC 9.3, at least, compiling select.cc spits out a warning about
an implausible bound being passed to strncmp. This comes from inlining
IdString::compare(): it turns out that passing std::string::npos as a
bound to strncmp triggers it.
This patch replaces the compare call with a memcmp with the same
effect. The repeated calls to IdString::c_str are slightly
inefficient, but I'll address that in a follow-up commit.
|
|\ \ \ \
| | | | |
| | | | | |
Simplify a modport check in hierarchy.cc
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This code originally comes from commit 458a940. When an interface is
used via a modport, code in genrtlil.cc sets '\\interface_type' and
'\\interface_modport' properties on the wire.
In hierarchy.cc, we pick up the modport name and add it to a dict
called modports_used_in_submodule (that maps connection source to
modport name).
Before this patch, the modport name is retrieved as a strpool and then
iterated over in an arbitrary order, discarding all entries but the
last. In practice, the pool will always have 0 or 1 entries because
the string used to construct it is a valid identifier, so doesn't
contain any pipe symbols.
This patch changes the code to retrieve the modport name as just a
string. This will have the same effect in practice, but may be a bit
less confusing!
The code also gets moved down closer to where the result is used,
which might be a bit more efficient since we won't always get as far
as the check.
The patch also removes some commented-out code, which I think was
intended to add some typechecking at some point, but was never
implemented. Since this dates back to October 2018, I think it makes
more sense to just take it out.
|