| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This avoids warnings in NDEBUG builds emitted when a variable is only
used in log_assert, but is always defined.
|
|\
| |
| | |
Use C++11 final/override/[[noreturn]]
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
For several reasons:
* They're more convenient than accessing .data.
* They accommodate variably-sized types like size_t transparently.
* They statically ensure that no out of range conversions happen.
For now these are only provided for unsigned integers, but eventually
they should be provided for signed integers too. (Annoyingly this
affects conversions to/from `char` at the moment.)
Fixes #2127.
|
|\
| |
| | |
cxxrtl: don't compute vital values in log_assert()
|
| |
| |
| |
| |
| |
| | |
This breaks NDEBUG builds.
Fixes #2166.
|
|\ \
| | |
| | | |
cxxrtl: restrict the debug info of a blackbox to its ports.
|
| |/ |
|
|\ \
| |/
|/| |
cxxrtl: avoid unused variable warning for transparent $memrd ports
|
| | |
|
|\ \
| |/
|/| |
cxxrtl: Implement chunk-wise multiplication
|
| | |
|
|\ \
| |/
|/| |
cxxrtl: fix sshr sign-extension.
|
| | |
|
|\ \
| |/
|/| |
cxxrtl: fix rzext()
|
| |
| |
| |
| |
| |
| |
| | |
This was a correctness issue, but one of the consequences is that it
resulted in jumps in generated machine code where there should have
been none. As a side effect of fixing the bug, Minerva SoC became 10%
faster.
|
|\ \
| | |
| | | |
cxxrtl: handle multipart signals
|
| | |
| | |
| | |
| | | |
This avoids losing design visibility when using the `splitnets` pass.
|
| | | |
|
| |/
|/|
| |
| |
| |
| | |
This can result in massive reduction in runtime, up to 50% depending
on workload. Currently people are using `-mllvm -inline-threshold=`
as a workaround (with clang++), but this solution is more portable.
|
| |
| |
| |
| |
| | |
On Minerva, this improves runtime by around 10%, mostly by ensuring
that the logic driving FFs is packed into edge conditionals.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without unbuffering output wires of, at least, toplevel modules, it
is not possible to have most designs that rely on IO via toplevel
ports (as opposed to using exclusively blackboxes) converge within
one delta cycle. That seriously impairs the performance of CXXRTL.
This commit avoids unbuffering outputs of all modules solely so that
in future, CXXRTL could gain fully separate compilation, and not for
any present technical reason.
|
|/
|
|
| |
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.
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
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.
|
|/
|
|
| |
Fixes #2124.
|
|
|
|
|
| |
The CXXRTL code that handled the `hdlname` attribute implemented
outdated semantics.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
To avoid confusion with the C++ source files that are a part of
the simulation itself and not a part of Yosys build.
|
|
|
|
| |
This C API is fully featured.
|
|
|
|
|
| |
On a representative design (Minerva SoC) this reduces VCD file size
by ~20× and runtime by ~3×.
|
| |
|
|
|
|
|
|
| |
Compared to the C++ API, the C API currently has two limitations:
1. Memories cannot be updated in a race-free way.
2. Black boxes cannot be implemented in C.
|
|
|
|
|
|
|
|
|
|
| |
Debug information describes values, wires, and memories with a simple
C-compatible layout. It can be emitted on demand into a map, which
has no runtime cost when it is unused, and allows late bound designs.
The `hdlname` attribute is used as the lookup key such that original
names, as emitted by the frontend, can be used for debugging and
introspection.
|
|\
| |
| | |
MacOS has even stricter stack limits in catalina.
|