yosys.git
2 years agoBump version
github-actions[bot] [Mon, 7 Feb 2022 00:56:31 +0000 (00:56 +0000)]
Bump version

2 years agonexus: Fix arith_map CO signal.
Marcelina Kościelnicka [Sun, 6 Feb 2022 11:48:44 +0000 (12:48 +0100)]
nexus: Fix arith_map CO signal.

Fixes #3187.

2 years agoBump version
github-actions[bot] [Thu, 3 Feb 2022 00:54:22 +0000 (00:54 +0000)]
Bump version

2 years agoMerge pull request #3183 from YosysHQ/micko/nto1mux
Miodrag Milanović [Wed, 2 Feb 2022 15:22:53 +0000 (16:22 +0100)]
Merge pull request #3183 from YosysHQ/micko/nto1mux

Use bmux for NTO1MUX

2 years agoUse bmux for NTO1MUX
Miodrag Milanovic [Wed, 2 Feb 2022 15:16:08 +0000 (16:16 +0100)]
Use bmux for NTO1MUX

2 years agoMerge pull request #3182 from yrabbit/wip-doc2
Miodrag Milanović [Wed, 2 Feb 2022 11:19:17 +0000 (12:19 +0100)]
Merge pull request #3182 from yrabbit/wip-doc2

Correct a typo in the manual

2 years agoCorrect a typo in the manual
YRabbit [Wed, 2 Feb 2022 11:14:38 +0000 (21:14 +1000)]
Correct a typo in the manual

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2 years agoUpdate comment
Scott Thibault [Wed, 2 Feb 2022 01:30:31 +0000 (20:30 -0500)]
Update comment

2 years agoFix unextend method for signed constants
Scott Thibault [Tue, 1 Feb 2022 22:55:09 +0000 (17:55 -0500)]
Fix unextend method for signed constants

2 years agoMerge pull request #3176 from higuoxing/fix-ref-manual
Miodrag Milanović [Mon, 31 Jan 2022 15:11:00 +0000 (16:11 +0100)]
Merge pull request #3176 from higuoxing/fix-ref-manual

Fix the help message of synth_quicklogic command.

2 years agoBump version
github-actions[bot] [Mon, 31 Jan 2022 00:54:31 +0000 (00:54 +0000)]
Bump version

2 years agoverilog backend: Emit a `wire` for ports as well.
Marcelina Kościelnicka [Sun, 30 Jan 2022 19:48:50 +0000 (20:48 +0100)]
verilog backend: Emit a `wire` for ports as well.

Fixes #3177.

2 years agoFix the help message of synth_quicklogic.
Xing GUO [Sun, 30 Jan 2022 14:10:05 +0000 (22:10 +0800)]
Fix the help message of synth_quicklogic.

2 years agoopt_reduce: Add $bmux and $demux optimization patterns.
Marcelina Kościelnicka [Sat, 29 Jan 2022 00:01:21 +0000 (01:01 +0100)]
opt_reduce: Add $bmux and $demux optimization patterns.

2 years agoBump version
github-actions[bot] [Sat, 29 Jan 2022 02:48:50 +0000 (02:48 +0000)]
Bump version

2 years agoAdd $bmux and $demux cells.
Marcelina Kościelnicka [Mon, 24 Jan 2022 15:02:29 +0000 (16:02 +0100)]
Add $bmux and $demux cells.

2 years agoopt_dff: Don't mutate muxes while ModWalker is active.
Marcelina Kościelnicka [Thu, 27 Jan 2022 16:06:57 +0000 (17:06 +0100)]
opt_dff: Don't mutate muxes while ModWalker is active.

2 years agokernel/mem: Add read-first semantic emulation code.
Marcelina Kościelnicka [Thu, 27 Jan 2022 22:26:56 +0000 (23:26 +0100)]
kernel/mem: Add read-first semantic emulation code.

2 years agoBump version
github-actions[bot] [Fri, 28 Jan 2022 02:39:40 +0000 (02:39 +0000)]
Bump version

2 years agomanual: Fix a custom pass example.
Marcelina Kościelnicka [Thu, 27 Jan 2022 22:26:43 +0000 (23:26 +0100)]
manual: Fix a custom pass example.

Fixes #3156.

2 years agomemory_bram: Make use of new mem emulation functions to map more RAMs.
Marcelina Kościelnicka [Thu, 27 Jan 2022 17:19:43 +0000 (18:19 +0100)]
memory_bram: Make use of new mem emulation functions to map more RAMs.

2 years agokernel/mem: Add functions to emulate read port enable/init/reset signals.
Marcelina Kościelnicka [Thu, 27 Jan 2022 15:08:33 +0000 (16:08 +0100)]
kernel/mem: Add functions to emulate read port enable/init/reset signals.

2 years agoBump version
github-actions[bot] [Thu, 27 Jan 2022 00:56:19 +0000 (00:56 +0000)]
Bump version

2 years agochange to windows-2019
Miodrag Milanović [Wed, 26 Jan 2022 17:00:41 +0000 (18:00 +0100)]
change to windows-2019

2 years agoBump version
github-actions[bot] [Thu, 20 Jan 2022 01:06:01 +0000 (01:06 +0000)]
Bump version

2 years agonexus: Fix BB sim model
gatecat [Wed, 19 Jan 2022 16:04:55 +0000 (16:04 +0000)]
nexus: Fix BB sim model

Signed-off-by: gatecat <gatecat@ds0.me>
2 years agoRemoved dbits 8 since 9 will always be picked
Miodrag Milanovic [Wed, 19 Jan 2022 07:51:25 +0000 (08:51 +0100)]
Removed dbits 8 since 9 will always be picked

2 years agoMerge pull request #3120 from Icenowy/anlogic-bram
Miodrag Milanović [Wed, 19 Jan 2022 07:49:58 +0000 (08:49 +0100)]
Merge pull request #3120 from Icenowy/anlogic-bram

anlogic: support BRAM mapping

2 years agoBump version
github-actions[bot] [Tue, 18 Jan 2022 01:00:53 +0000 (01:00 +0000)]
Bump version

2 years agoMerge pull request #3162 from YosysHQ/mmicko/windows_guidelines
Miodrag Milanović [Mon, 17 Jan 2022 12:20:45 +0000 (13:20 +0100)]
Merge pull request #3162 from YosysHQ/mmicko/windows_guidelines

Add info about VS build

2 years agoUpdate guidelines/Windows
Miodrag Milanović [Mon, 17 Jan 2022 12:11:15 +0000 (13:11 +0100)]
Update guidelines/Windows

Co-authored-by: N. Engelhardt <nakengelhardt@gmail.com>
2 years agoMerge pull request #3145 from nakengelhardt/advertise_suite_in_readme
N. Engelhardt [Mon, 17 Jan 2022 11:50:53 +0000 (12:50 +0100)]
Merge pull request #3145 from nakengelhardt/advertise_suite_in_readme

mention tabby+oss cad suite in readme

2 years agomention distributions' package manager
N. Engelhardt [Mon, 17 Jan 2022 11:49:32 +0000 (12:49 +0100)]
mention distributions' package manager

2 years agoAdd info about VS build
Miodrag Milanović [Mon, 17 Jan 2022 09:07:56 +0000 (10:07 +0100)]
Add info about VS build

2 years agoBump version
github-actions[bot] [Wed, 12 Jan 2022 00:59:23 +0000 (00:59 +0000)]
Bump version

2 years agoForgot one
Miodrag Milanovic [Tue, 11 Jan 2022 08:39:45 +0000 (09:39 +0100)]
Forgot one

2 years agoChange url to https
Miodrag Milanovic [Tue, 11 Jan 2022 07:56:33 +0000 (08:56 +0100)]
Change url to https

2 years agoNext dev cycle
Miodrag Milanovic [Tue, 11 Jan 2022 07:39:34 +0000 (08:39 +0100)]
Next dev cycle

2 years agoRelease version 0.13 yosys-0.13
Miodrag Milanovic [Tue, 11 Jan 2022 07:35:50 +0000 (08:35 +0100)]
Release version 0.13

2 years agoUpdate CHANGELOG
Miodrag Milanovic [Tue, 11 Jan 2022 07:21:12 +0000 (08:21 +0100)]
Update CHANGELOG

2 years agoBump version
github-actions[bot] [Sun, 9 Jan 2022 01:01:33 +0000 (01:01 +0000)]
Bump version

2 years agosv: auto add nosync to certain always_comb local vars
Zachary Snow [Fri, 7 Jan 2022 05:04:00 +0000 (22:04 -0700)]
sv: auto add nosync to certain always_comb local vars

If a local variable is always assigned before it is used, then adding
nosync prevents latches from being needlessly generated.

2 years agosv: fix size cast internal expression extension
Zachary Snow [Thu, 6 Jan 2022 06:33:08 +0000 (23:33 -0700)]
sv: fix size cast internal expression extension

2 years agoBump version
github-actions[bot] [Wed, 5 Jan 2022 01:00:24 +0000 (01:00 +0000)]
Bump version

2 years agologger: fix unmatched expected warnings and errors
Zachary Snow [Tue, 4 Jan 2022 03:12:22 +0000 (20:12 -0700)]
logger: fix unmatched expected warnings and errors

- Prevent unmatched expected error patterns from self-matching
- Prevent infinite recursion on unmatched expected warnings
- Always print the error message for unmatched error patterns
- Add test coverage for all unmatched message types
- Add test coverage for excess matched logs and warnings

2 years agoopt_dff: fix sequence point copy paste bug
Austin Seipp [Tue, 4 Jan 2022 16:49:54 +0000 (10:49 -0600)]
opt_dff: fix sequence point copy paste bug

Newer GCCs emit the following warning for opt_dff:

    passes/opt/opt_dff.cc:560:17: warning: operation on ‘ff.Yosys::FfData::has_clk’ may be undefined [-Wsequence-point]
      560 |      ff.has_clk = ff.has_ce = ff.has_clk = false;
          |      ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Which is correct: the order of whether the read or write of has_clk
occurs first is undefined since there is no sequence point between them.

This is almost certainly just a typo/copy paste error and objectively
wrong, so just fix it.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2 years agomention tabby+oss cad suite in readme
N. Engelhardt [Tue, 4 Jan 2022 14:44:37 +0000 (15:44 +0100)]
mention tabby+oss cad suite in readme

2 years agomanual: Fix cell-stmt order
gatecat [Sat, 1 Jan 2022 18:26:59 +0000 (18:26 +0000)]
manual: Fix cell-stmt order

Signed-off-by: gatecat <gatecat@ds0.me>
2 years agoBump version
github-actions[bot] [Tue, 4 Jan 2022 00:58:28 +0000 (00:58 +0000)]
Bump version

2 years agofix iverilog compatibility for new case expr tests
Zachary Snow [Wed, 29 Dec 2021 17:38:55 +0000 (10:38 -0700)]
fix iverilog compatibility for new case expr tests

2 years agofixup verilog doubleslash test
Zachary Snow [Thu, 30 Dec 2021 07:06:23 +0000 (00:06 -0700)]
fixup verilog doubleslash test

- add generated doubleslash.v to .gitignore
- ensure backend verilog can be read again

2 years agosv: fix size cast clipping expression width
Zachary Snow [Thu, 30 Dec 2021 07:01:30 +0000 (00:01 -0700)]
sv: fix size cast clipping expression width

2 years agoUpdate manual
Miodrag Milanovic [Mon, 3 Jan 2022 10:57:11 +0000 (11:57 +0100)]
Update manual

2 years agoBump version
github-actions[bot] [Sun, 26 Dec 2021 01:00:33 +0000 (01:00 +0000)]
Bump version

2 years agoMerge pull request #3127 from whitequark/cxxrtl-no-reset-elided
Catherine [Sat, 25 Dec 2021 12:29:44 +0000 (12:29 +0000)]
Merge pull request #3127 from whitequark/cxxrtl-no-reset-elided

cxxrtl: don't reset elided wires with \init attribute

2 years agocxxrtl: don't reset elided wires with \init attribute.
Catherine [Sat, 25 Dec 2021 01:06:10 +0000 (01:06 +0000)]
cxxrtl: don't reset elided wires with \init attribute.

2 years agoBump version
github-actions[bot] [Wed, 22 Dec 2021 00:58:25 +0000 (00:58 +0000)]
Bump version

2 years agointel_alm: disable 256x40 M10K mode
Lofty [Tue, 21 Dec 2021 18:11:45 +0000 (18:11 +0000)]
intel_alm: disable 256x40 M10K mode

This BRAM mode uses both address ports, making it effectively single-port.
Since memory_bram can't presently map to single-port memories, remove it.

2 years agoBump version
github-actions[bot] [Tue, 21 Dec 2021 00:59:45 +0000 (00:59 +0000)]
Bump version

2 years agomemory_share: Fix SAT-based sharing for wide ports.
Marcelina Kościelnicka [Mon, 20 Dec 2021 16:10:30 +0000 (17:10 +0100)]
memory_share: Fix SAT-based sharing for wide ports.

Fixes #3117.

2 years agoBump version
github-actions[bot] [Sun, 19 Dec 2021 01:00:40 +0000 (01:00 +0000)]
Bump version

2 years agofix width detection of array querying function in case and case item expressions
Zachary Snow [Thu, 16 Dec 2021 01:15:09 +0000 (18:15 -0700)]
fix width detection of array querying function in case and case item expressions

I also removed the unnecessary shadowing of `width_hint` and `sign_hint`
in the corresponding case in `simplify()`.

2 years agoanlogic: support BRAM mapping
Icenowy Zheng [Fri, 17 Dec 2021 12:25:32 +0000 (20:25 +0800)]
anlogic: support BRAM mapping

Anlogic FPGAs all have two kinds of BRAMs, one is 9bit*1K when being
true dual port (or 18bit*512 when simple dual port), the other is
16bit*2K.

Supports mapping of these two kinds of BRAMs. 9Kbit BRAM in SDP mode and
32Kbit BRAM with 8bit width are not support yet.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2 years agoBump version
github-actions[bot] [Fri, 17 Dec 2021 00:58:02 +0000 (00:58 +0000)]
Bump version

2 years agoMerge pull request #3115 from whitequark/issue-3112
Catherine [Thu, 16 Dec 2021 07:29:29 +0000 (07:29 +0000)]
Merge pull request #3115 from whitequark/issue-3112

cxxrtl: demote wires not inlinable only in debug_eval to locals

2 years agoMerge pull request #3114 from whitequark/issue-3113
Catherine [Thu, 16 Dec 2021 07:29:19 +0000 (07:29 +0000)]
Merge pull request #3114 from whitequark/issue-3113

bugpoint: avoid infinite loop between -connections and -wires

2 years agopreprocessor: do not destroy double slash escaped identifiers
Thomas Sailer [Wed, 25 Aug 2021 19:34:26 +0000 (21:34 +0200)]
preprocessor: do not destroy double slash escaped identifiers

The preprocessor currently destroys double slash containing escaped
identifiers (for example \a//b ). This is due to next_token trying to
convert single line comments (//) into /* */ comments. This then leads
to an unintuitive error message like this:
ERROR: syntax error, unexpected '*'

This patch fixes the error by recognizing escaped identifiers and
returning them as single token. It also adds a testcase.

2 years agocxxrtl: demote wires not inlinable only in debug_eval to locals.
Catherine [Wed, 15 Dec 2021 08:48:49 +0000 (08:48 +0000)]
cxxrtl: demote wires not inlinable only in debug_eval to locals.

Fixes #3112.

Co-authored-by: Irides <irides@irides.network>
2 years agobugpoint: avoid infinite loop between -connections and -wires.
Catherine [Wed, 15 Dec 2021 08:15:54 +0000 (08:15 +0000)]
bugpoint: avoid infinite loop between -connections and -wires.

Fixes #3113.

2 years agoBump version
github-actions[bot] [Wed, 15 Dec 2021 00:59:04 +0000 (00:59 +0000)]
Bump version

2 years agoMerge pull request #3111 from whitequark/issue-3110
Catherine [Tue, 14 Dec 2021 21:25:06 +0000 (21:25 +0000)]
Merge pull request #3111 from whitequark/issue-3110

Fix null pointer dereference after failing to extract DFF from memory

2 years agoHotfix for run_shell auto-detection
Claire Xenia Wolf [Tue, 14 Dec 2021 20:38:58 +0000 (21:38 +0100)]
Hotfix for run_shell auto-detection

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2 years agoFix null pointer dereference after failing to extract DFF from memory.
Catherine [Tue, 14 Dec 2021 16:27:37 +0000 (16:27 +0000)]
Fix null pointer dereference after failing to extract DFF from memory.

Fixes #3110.

2 years agoBump version
github-actions[bot] [Tue, 14 Dec 2021 00:59:10 +0000 (00:59 +0000)]
Bump version

2 years agoMerge pull request #3108 from YosysHQ/claire/verificdefs
Claire Xen [Mon, 13 Dec 2021 21:03:29 +0000 (22:03 +0100)]
Merge pull request #3108 from YosysHQ/claire/verificdefs

Add YOSYS to the implicitly defined verilog macros in verific

2 years agoAdd YOSYS to the implicitly defined verilog macros in verific
Claire Xenia Wolf [Mon, 13 Dec 2021 17:20:08 +0000 (18:20 +0100)]
Add YOSYS to the implicitly defined verilog macros in verific

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2 years agoBump version
github-actions[bot] [Mon, 13 Dec 2021 00:55:45 +0000 (00:55 +0000)]
Bump version

2 years agoAdd clean_zerowidth pass, use it for Verilog output.
Marcelina Kościelnicka [Sat, 11 Dec 2021 15:07:29 +0000 (16:07 +0100)]
Add clean_zerowidth pass, use it for Verilog output.

This should remove instances of zero-width sigspecs in the netlist,
avoiding problems in the Verilog backend with emitting them.

See #3103.

2 years agoMerge pull request #3105 from whitequark/cxxrtl-reset-memories-2
Catherine [Sun, 12 Dec 2021 01:23:03 +0000 (01:23 +0000)]
Merge pull request #3105 from whitequark/cxxrtl-reset-memories-2

cxxrtl: preserve interior memory pointers across reset

2 years agoBump version
github-actions[bot] [Sun, 12 Dec 2021 01:12:53 +0000 (01:12 +0000)]
Bump version

2 years agoFix unused param warning with ENABLE_NDEBUG.
Marcelina Kościelnicka [Sat, 11 Dec 2021 16:17:43 +0000 (17:17 +0100)]
Fix unused param warning with ENABLE_NDEBUG.

2 years agortlil: Dump empty connections when whole module is selected.
Marcelina Kościelnicka [Sat, 11 Dec 2021 15:53:54 +0000 (16:53 +0100)]
rtlil: Dump empty connections when whole module is selected.

Without this, empty connections will be always skipped by `dump`, since
they contain no selected wires.  This makes debugging rather confusing.

2 years agocxxrtl: preserve interior memory pointers across reset.
Catherine [Sat, 11 Dec 2021 15:38:43 +0000 (15:38 +0000)]
cxxrtl: preserve interior memory pointers across reset.

Before this commit, values, wires, and memories with an initializer
were value-initialized in emitted C++ code. After this commit, all
values, wires, and memories are default-initialized, and the default
constructor of generated modules calls the reset() method, which
assigns the members that have an initializer.

2 years agoMerge pull request #3103 from whitequark/write_verilog-more-zero-width-values
Catherine [Sat, 11 Dec 2021 16:24:47 +0000 (16:24 +0000)]
Merge pull request #3103 from whitequark/write_verilog-more-zero-width-values

write_verilog: dump zero width sigspecs correctly

2 years agocxxrtl: use unique_ptr<value<>[]> to store memory contents.
whitequark [Sun, 20 Dec 2020 17:17:37 +0000 (17:17 +0000)]
cxxrtl: use unique_ptr<value<>[]> to store memory contents.

This makes the depth properly immutable.

2 years agowrite_verilog: dump zero width sigspecs correctly.
whitequark [Sat, 11 Dec 2021 12:01:52 +0000 (12:01 +0000)]
write_verilog: dump zero width sigspecs correctly.

Before this commit, zero width sigspecs were dumped as "" (empty
string). Unfortunately, 1364-2005 5.2.3.3 indicates that an empty
string is equivalent to "\0", and is 8 bits wide, so that's wrong.

After this commit, a replication operation with a count of zero is
used instead, which is explicitly permitted per 1364-2005 5.1.14,
and is defined to have size zero. (Its operand has to have a non-zero
size for it to be legal, though.)

PR #1203 has addressed this issue before, but in an incomplete way.

2 years agoBump version
github-actions[bot] [Sat, 11 Dec 2021 00:54:59 +0000 (00:54 +0000)]
Bump version

2 years agoMerge pull request #3102 from YosysHQ/claire/enumxz
Miodrag Milanović [Fri, 10 Dec 2021 18:36:37 +0000 (19:36 +0100)]
Merge pull request #3102 from YosysHQ/claire/enumxz

Fix verific import of enum values with x and/or z

2 years agoFix verific import of enum values with x and/or z
Claire Xenia Wolf [Fri, 10 Dec 2021 13:52:27 +0000 (14:52 +0100)]
Fix verific import of enum values with x and/or z

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2 years agoMerge pull request #3097 from YosysHQ/modport
Miodrag Milanović [Fri, 10 Dec 2021 13:32:14 +0000 (14:32 +0100)]
Merge pull request #3097 from YosysHQ/modport

If direction NONE use that from first bit

2 years agoUpdate verific.cc
Claire Xen [Fri, 10 Dec 2021 13:27:18 +0000 (14:27 +0100)]
Update verific.cc

Ad-hoc fixes/improvements

2 years agoMerge pull request #3099 from YosysHQ/claire/readargs
Claire Xen [Fri, 10 Dec 2021 10:23:53 +0000 (11:23 +0100)]
Merge pull request #3099 from YosysHQ/claire/readargs

Use "read" command to parse HDL files from Yosys command-line

2 years agoFix the tests we just broke
Claire Xenia Wolf [Thu, 9 Dec 2021 23:22:37 +0000 (00:22 +0100)]
Fix the tests we just broke

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2 years agoAdded "yosys -r <topmodule>"
Claire Xenia Wolf [Thu, 9 Dec 2021 21:24:58 +0000 (22:24 +0100)]
Added "yosys -r <topmodule>"

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2 years agoUse "read" command to parse HDL files from Yosys command-line
Claire Xenia Wolf [Thu, 9 Dec 2021 09:33:55 +0000 (10:33 +0100)]
Use "read" command to parse HDL files from Yosys command-line

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2 years agoBump version
github-actions[bot] [Thu, 9 Dec 2021 00:55:26 +0000 (00:55 +0000)]
Bump version

2 years agoopt_mem_priority: Fix non-ascii char in help message.
Marcelina Kościelnicka [Wed, 8 Dec 2021 22:23:03 +0000 (23:23 +0100)]
opt_mem_priority: Fix non-ascii char in help message.

This is a fixed version of #3072.

2 years agoIf direction NONE use that from first bit
Miodrag Milanovic [Wed, 8 Dec 2021 10:50:10 +0000 (11:50 +0100)]
If direction NONE use that from first bit

2 years agoBump version
github-actions[bot] [Sat, 4 Dec 2021 00:54:12 +0000 (00:54 +0000)]
Bump version

2 years agoNext dev cycle
Miodrag Milanovic [Fri, 3 Dec 2021 11:51:34 +0000 (12:51 +0100)]
Next dev cycle