Commit Graph

13032 Commits

Author SHA1 Message Date
Krystine Sherwin 62d2f89c74
Revert artifact reuse 2024-01-25 12:18:06 +13:00
Krystine Sherwin 2a14c72110
test-docs: target examples directly 2024-01-25 11:36:59 +13:00
Krystine Sherwin 4ac983e56c
test-docs: Checkout Yosys 2024-01-25 11:32:39 +13:00
Krystine Sherwin bb4d69005f
Docs: can we re-use build artifacts? 2024-01-25 10:15:43 +13:00
Krystine Sherwin 57a7532227
Docs: add test-examples target
`test` becomes `test-macros`, with a new `test` calling both `test-*` targets.
2024-01-25 10:15:00 +13:00
Krystine Sherwin e10d9b1fe0
Remove python dep from test-docs 2024-01-25 09:38:50 +13:00
Krystine Sherwin 9b820108d6
Docs: add test-docs.yml 2024-01-24 11:22:38 +13:00
Krystine Sherwin 449135a9d4
Docs: adding other macro command lists
Also updates `macro_commands.py` to skip empty lines, and moves comment
stripping earlier in parsing.
2024-01-24 10:29:40 +13:00
Krystine Sherwin 6c8949cacc
Docs: static opt macro list
Also adds `docs/tests/macro_commands.py` which checks all commands in
`code_examples/macro_commands` against the current yosys build. Format similar
to `run-test.sh` files: logging the file under test and reporting errors.
2024-01-24 09:56:00 +13:00
Krystine Sherwin 95849edbba
Docs: changes from JF
`yosys-witness` prereq `click`.
Yosys environment vars & `yosys --help` output.
Removing Ubuntu/macOS version numbers/names.
Hide `troubleshooting` page.
2024-01-23 17:35:06 +13:00
Krystine Sherwin e63f1f5367
Docs: merge CI fix 2024-01-23 16:39:04 +13:00
github-actions[bot] 2f9fcc2e50 Bump version 2024-01-23 00:16:43 +00:00
Miodrag Milanović 3123dac77a
Merge pull request #4148 from YosysHQ/set_iverilog
Checkout specific iverilog version (can be master as well)
2024-01-22 18:29:36 +01:00
Miodrag Milanovic cfcd0b5729 Checkout specific iverilog version (can be master as well) 2024-01-22 17:18:39 +01:00
Catherine 3d9e44d182 hierarchy: keep display statements, like formal assertions. 2024-01-22 10:09:22 +00:00
Martin Povišer 2c4cf2b4b8
Merge pull request #4147 from stong/fix-typo
Fix typo in stat help
2024-01-22 10:52:01 +01:00
Krystine Sherwin 9ec1536f1f
Docs: getting_started tidy
Rename `show` intro and point to `/cmd/show`.
Add getting_started section overview.
2024-01-22 11:44:43 +13:00
Krystine Sherwin 65bb0d3059
Docs: updating to current 'master'
Pulling for #4133 and removing related TODO.
2024-01-22 11:18:07 +13:00
Krystine Sherwin 794ad381c6
Docs: scripting_intro/show_intro
Adds two new `show` commands to `fifo.ys` for demo purposes.
Mention referencing named selections with `@<name>`.
Also adds a note to `example_synth` to point to the show intro.
2024-01-22 11:10:02 +13:00
Stephen Tong b3e7390c0e
Fix typo in stat help 2024-01-21 16:32:05 -05:00
github-actions[bot] 8649e30668 Bump version 2024-01-20 00:16:07 +00:00
Catherine fc5ff7a265 cxxrtl: always lazily format print messages.
This is mostly useful for collecting coverage for the future `$check`
cell, where, depending on the flavor, formatting a message may not be
wanted even for a failed assertion.
2024-01-19 18:55:23 +00:00
Catherine b74d33d1b8 fmt: rename TIME to VLOG_TIME.
The behavior of these format specifiers is highly specific to Verilog
(`$time` and `$realtime` are only defined relative to `$timescale`)
and may not fit other languages well, if at all. If they choose to use
it, it is now clear what they are opting into.

This commit also simplifies the CXXRTL code generation for these format
specifiers.
2024-01-19 15:12:05 +00:00
Catherine 08d7f54726 cxxrtl: move a definition around. NFC 2024-01-19 15:12:05 +00:00
Miodrag Milanović 6282c1f27d
Merge pull request #4137 from yrabbit/bsram-infer
gowin: fix the BRAM mapping.
2024-01-19 08:45:39 +01:00
YRabbit ae991abf2e gowin: fix the BRAM mapping.
The primitives used have been corrected and changes have been made to the set of signals.
The empirically established need to set the OCEx signal to 1 when using READ_MODE=0 is reflected.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-01-19 15:26:37 +10:00
github-actions[bot] 7580821834 Bump version 2024-01-19 00:16:38 +00:00
N. Engelhardt 242ae4ef01
Merge pull request #4135 from YosysHQ/verific_clocking_fix
Fix verific clocking when no driver exist
2024-01-18 15:40:35 +01:00
Miodrag Milanovic 1764c0ee3c Fix verific clocking when no driver exist 2024-01-18 08:47:04 +01:00
Krystine Sherwin 14b7c581fa
Docs: reworking scripting_intro
Now comes *after* example_synth, with references back to it.
Includes some minor adjustment to the `fifo.ys` script to better demonstrate the `select` command.
Still needs an updated section on `show`.

Also includes some other minor updates.
2024-01-18 15:33:59 +13:00
Krystine Sherwin 74d2c918cd
Docs: installation/source tree 2024-01-18 14:05:34 +13:00
Krystine Sherwin 93ceda5c63
Docs: auxlibs 2024-01-18 12:14:00 +13:00
N. Engelhardt e1f4c5c9cb
Merge pull request #4133 from YosysHQ/show_color_proc
show: allow setting colors via selection on PROC boxes
2024-01-17 17:56:53 +01:00
Martin Povišer 6a7fad4dd9
Merge pull request #4132 from povik/opt_lut_ice40
opt_lut: Replace `-dlogic` with `-tech ice40`
2024-01-17 14:26:28 +01:00
Catherine c4c55cb565
Merge pull request #4134 from whitequark/cxxrtl-capture-print
CXXRTL: Allow capturing `$print` cell output
2024-01-17 13:13:15 +00:00
github-actions[bot] 37a6c9a097 Bump version 2024-01-17 00:16:14 +00:00
Krystine Sherwin 27ae093dba
Docs: working on opt page
Replace leftover `opt` example source/images with examples specific to the `opt_*` pass.
Currently has images for `opt_expr`, `opt_merge`, `opt_muxtree`, and `opt_share`.
Also includes some other TODO updates.
2024-01-17 11:00:42 +13:00
Krystine Sherwin 63a0f80996
Docs: opt_share 2024-01-17 08:47:50 +13:00
Krystine Sherwin 14f2208e47
Docs: opt_expr 2024-01-17 08:40:48 +13:00
Catherine 5a1fcdea13 cxxrtl: include attributes in `performer::on_print` callback.
This is useful primarily to determine the source location, but can also
be used for any other purpose.
2024-01-16 16:39:11 +00:00
Catherine 905f07c03f cxxrtl: introduce `performer`, a context object for `eval()`. (breaking change)
At the moment the only thing it allows is redirecting `$print` cell
output in a context-dependent manner. In the future, it will allow
customizing handling of `$check` cells (where the default is to abort),
of out-of-range memory accesses, and other runtime conditions with
effects.

This context object also allows a suitably written testbench to add
Verilog-compliant `$time`/`$realtime` handling, albeit it involves
the ceremony of defining a `performer` subclass. Most people will
want something like this to customize `$time`:

    int64_t time = 0;
    struct : public performer {
      int64_t *time_ptr;
      int64_t time() const override { return *time_ptr; }
    } performer = { &time };

    p_top.step(&performer);
2024-01-16 16:37:07 +00:00
Catherine 02e3d508fa cxxrtl: remove `module::steps`. (breaking change)
This approach to tracking simulation time was a mistake that I did not
catch in review. It has several issues:
1. There is absolutely no requirement to call `step()`, as it is
   a convenience function. In particular, `steps` will not be
   incremented in submodules if `-noflatten` is used.
2. The semantics of `steps` does not match that of the Verilog `$time`
   construct.
3. There is no way to make the semantics of `%t` match that of Verilog.
4. The `module` interface is intentionally very barebones. It is little
   more than a container for three method pointers, `reset`, `eval`,
   and `commit`. Adding ancillary data to it goes against this.

If similar functionality is introduced again it should probably be
a variable that is global per toplevel design using some object that is
unique for an entire hierarchy of modules, and ideally exposed via
the C API. For now, it is being removed (in this commit) and (in next
commit) the capability is being reintroduced through a context object
that can be specified for `eval()`.
2024-01-16 16:35:51 +00:00
Catherine a33acb7cd9 cxxrtl: refactor the formatter and use a closure.
This commit achieves three roughly equally important goals:
1. To bring the rendering code in kernel/fmt.cc and in cxxrtl.h as close
   together as possible, with an ideal of only having the bigint library
   as the difference between the render functions.
2. To make the treatment of `$time` and `$realtime` in CXXRTL closer to
   the Verilog semantics, at least in the formatting code.
3. To change the code generator so that all of the `$print`-to-`string`
   conversion code is contained inside of a closure.

There are two reasons to aim for goal (3):
a. Because output redirection through definition of a global ostream
   object is neither convenient nor useful for environments where
   the output is consumed by other code rather than being printed on
   a terminal.
b. Because it may be desirable to, in some cases, ignore the `$print`
   cells that are present in the netlist based on a runtime decision.
   This is doubly true for an upcoming `$check` cell implementing
   assertions, since failing a `$check` would by default cause a crash.
2024-01-16 16:35:51 +00:00
Catherine bf1a99da09 cxxrtl: make observer methods non-virtual. (breaking change)
This avoids having to devirtualize them later to get performance back,
and simplifies the code a bit.

The change is prompted by the desire to add a similar observer object
to `eval()`, and a repeated consideration of whether the dispatch on
these should be virtual in first place.
2024-01-16 09:58:21 +00:00
Catherine ed81cc5f81 cxxrtl: rename observer::{on_commit→on_update}. (breaking change)
The name `on_commit` was terrible since it would not be called, as one
may conclude from the name, on each `commit()`, but only whenever that
method actually updates a value.
2024-01-16 09:58:21 +00:00
Miodrag Milanovic bd956d76ba Next dev cycle 2024-01-16 08:16:07 +01:00
Miodrag Milanovic a5c7f69ed8 Release version 0.37 2024-01-16 08:13:21 +01:00
Krystine Sherwin aa652f9634
Docs: fix scripting_intro.rst images 2024-01-16 13:23:30 +13:00
Krystine Sherwin 5a4c2e5c79
example_synth: proc and opt_expr
Highlight `proc` blocks and intro `opt_expr`.
2024-01-16 13:23:04 +13:00
github-actions[bot] 740265bfbd Bump version 2024-01-16 00:16:26 +00:00