Martin Povišer
79e9258a31
wrapcell: Add new command
2024-11-27 14:01:00 +01:00
Miodrag Milanović
29e8812bab
Merge pull request #4724 from YosysHQ/micko/blackbox_verific
...
verific: fix blackbox regression and add test case
2024-11-25 15:06:54 +01:00
Emil J
5b6baa3ef1
Merge pull request #4744 from YosysHQ/emil/clockgate-liberty
...
clockgate: add -liberty
2024-11-20 15:04:00 +01:00
George Rennie
9043dc0ad6
tests: replace read_ilang with read_rtlil
...
* #4612 was written before read_ilang was deprecated but merged after so caused test failures. This switches read_ilang to read_rtlil
2024-11-20 14:54:23 +01:00
Emil J
cc17d5bb70
Merge pull request #4612 from georgerennie/george/opt_demorgan_zero_width
...
opt_demorgan: skip zero width cells
2024-11-20 13:33:16 +01:00
Emil J
18459b4b09
Merge pull request #4614 from georgerennie/george/opt_reduce_cell_width
...
opt_reduce: keep at least one input to $reduce_or/and cells
2024-11-20 13:33:04 +01:00
Martin Povišer
7ebe451f9a
Merge pull request #4714 from georgerennie/george/proc_dff_bug_multiple_sigs
...
proc_dff: fix early return bug
2024-11-20 13:26:32 +01:00
Martin Povišer
270846a49a
Merge pull request #4723 from povik/memv2-nordports
...
rtlil: Adjust internal check for `$mem_v2` cells
2024-11-18 15:44:39 +01:00
Emil J. Tywoniak
a5bc36f77e
clockgate: add -dont_use
2024-11-18 13:45:30 +01:00
Emil J. Tywoniak
b08441d95c
clockgate: shuffle test liberty to exercise comparison better
2024-11-18 12:48:50 +01:00
Emil J. Tywoniak
1e3f8cc630
clockgate: add test liberty file
2024-11-18 12:45:27 +01:00
Emil J. Tywoniak
c921d85a85
clockgate: fix test comments
2024-11-18 12:33:09 +01:00
Martin Povišer
0d5c412807
read_liberty: s/busses/buses/
2024-11-12 13:33:41 +01:00
Martin Povišer
56a9202a97
Add read_liberty tests of new options
2024-11-12 13:29:16 +01:00
Martin Povišer
5a0cb5d453
Check in filtered samples of IHP's Liberty data for tests
2024-11-12 13:28:15 +01:00
Martin Povišer
1b1a6c4aed
Merge pull request #4525 from georgerennie/peepopt_clock_gate
...
peepopt: Add formal opt to rewrite latches to ffs in clock gates
2024-11-11 14:49:09 +01:00
mszelwiga
8e508f2a2a
Fix setting bits of parameters in setundef pass
...
This commit also adds test that verifies correctness of this change.
2024-11-08 17:03:08 +01:00
Martin Povišer
e82e5f8b13
rtlil: Adjust internal check for `$mem_v2` cells
...
There's a mismatch between what `kernel/mem.cc` emits for memories
with no read ports and what the internal RTLIL check expects.
The point of dispute it whether some of the parameters relating to read
ports have a zero-width value in this case. The `mem.cc` code says no,
the internal checker says yes.
Surveying the other `$mem_v2` parameters, and internal cell parameters
in general, I am inclined to side with the `mem.cc` code.
This breaks RTLIL compatibility but for an obscure edge case.
2024-11-08 15:18:43 +01:00
Miodrag Milanovic
df391f5816
verific: fix blackbox regression and add test case
2024-11-08 14:57:04 +01:00
KrystalDelusion
4343c791cb
Merge pull request #4704 from YosysHQ/krys/drop_ilang
...
Remove references to ilang
2024-11-08 11:28:06 +13:00
George Rennie
a31c968340
tests/bufnorm: add test for bufnorm of constant
2024-11-07 12:55:50 +01:00
George Rennie
c23e64a236
tests/proc: add proc_dff bug 4712 as testcase
2024-11-07 00:10:17 +01:00
N. Engelhardt
2de9f00368
Merge pull request #4620 from RCoeurjoly/fix-vcd-parsing-ghdl-var-spacing
2024-11-06 16:29:07 +01:00
N. Engelhardt
9068ec5566
Merge pull request #4627 from RCoeurjoly/roland/assume_x
2024-11-06 16:27:30 +01:00
Martin Povišer
69a36aec3b
Add keep_hierarchy test
2024-11-05 09:28:45 +01:00
Krystine Sherwin
ee73a91f44
Remove references to ilang
2024-11-05 12:36:31 +13:00
Lofty
3250f2b82b
Merge pull request #4700 from povik/select-list-mod
...
Add `select -list-mod`
2024-11-04 15:38:42 +00:00
Martin Povišer
d752ca4847
Fix test after option change
2024-11-04 16:26:46 +01:00
Martin Povišer
f7400a06cd
Fix test
2024-11-04 16:19:59 +01:00
Martin Povišer
23922faecc
Test new Tcl methods
2024-11-04 16:18:50 +01:00
Martin Povišer
c9ed6d8dcf
cellmatch: Rename `-lut_attrs` to `-derive_luts`; document option
2024-11-04 14:28:40 +01:00
Martin Povišer
7aa3fdab80
select: Add `-list-mod` option
2024-11-04 13:16:13 +01:00
Martin Povišer
9432e972f7
Merge pull request #4626 from povik/select-t-at
...
select: Add new `t:@<name>` syntax
2024-10-16 10:18:05 +02:00
Emil J. Tywoniak
f9f509bc25
select: add t:@<name> test
2024-10-15 21:06:06 +02:00
Emil J. Tywoniak
785bd44da7
rtlil: represent Const strings as std::string
2024-10-14 06:28:12 +02:00
Miodrag Milanović
ecec156965
Merge pull request #4643 from donn/fix_wheels
...
wheels: fix missing yosys-abc/share directory
2024-10-09 18:05:58 +02:00
Emil J
038e262332
Merge pull request #4624 from YosysHQ/emil/cxxrtl-smoke-test
...
cxxrtl: test stream operator
2024-10-09 05:57:13 -07:00
Mohamed Gaber
3d6b8b8e1a
wheels: fix missing yosys-abc/share directory
...
* `misc/__init__.py`:
* checks if there's a `yosys-abc` in the same directory - if yes, sets the variable `sys._pyosys_abc`
* checks if there's a `share` in the same directory - if yes, sets the variable `sys._pyosys_share_dirname`
* `yosys.cc::init_share_dirname`: check for `sys._pyosys_share_dirname`, use it at the highest priority if Python is enabled
* `yosys.cc::init_abc_executable_name`: check for `sys._pyosys_abc`, use it at at the highest priority if Python is enabled
* `Makefile`: add new target, `share`, to only create the extra targets
* `setup.py`: compile libyosys.so, yosys-abc and share, and copy them all as part of the pyosys build
* `test/arch/ecp5/add_sub.py`: ported `add_sub.ys` to Python to act as a test for the share directory and abc with Python wheels, used in CI
2024-10-09 13:09:14 +03:00
Martin Povišer
e46cc57cc4
Merge pull request #4613 from povik/err-never-silence
...
log: Never silence `log_cmd_error`
2024-10-07 16:12:31 +02:00
Martin Povišer
0aab8b4158
Merge pull request #4605 from povik/liberty-unit-delay
...
read_liberty: Optionally import unit delay arcs
2024-10-07 16:11:51 +02:00
Martin Povišer
74e92d10e8
Merge pull request #4593 from povik/aiger2
...
New aiger backend
2024-10-07 16:11:25 +02:00
Martin Povišer
6c1450fdaf
Merge pull request #4607 from povik/ql-nodiv
...
quicklogic: Avoid carry chains in division mapping
2024-10-07 16:11:11 +02:00
Martin Povišer
ca5c2fdff1
quicklogic: Relax the LUT number test
2024-10-07 15:27:03 +02:00
Martin Povišer
b01b17689e
Add test of error not getting silenced
2024-10-07 14:49:17 +02:00
Martin Povišer
d0a11e26f3
aiger2: Add test of writing a flattened view
2024-10-07 12:04:33 +02:00
Lofty
13ecbd5c76
quicklogic: test that dividing by a constant does not infer carry chains
2024-10-03 20:05:28 +01:00
Roland Coeurjoly
5ea2c6e6e5
Assume x values for missing signal data in FST
...
Co-authored-by: Miodrag Milanovic <mmicko@gmail.com>
Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com>
2024-10-02 12:08:48 +02:00
Emil J. Tywoniak
997cb30f1f
cxxrtl: test stream operator
2024-10-01 13:25:07 +02:00
Roland Coeurjoly
76c615b2ae
Fix: handle VCD variable references with and without whitespace
...
Co-authored-by: Miodrag Milanović <mmicko@gmail.com>
Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com>
2024-10-01 11:51:20 +02:00
rherveille
ce7db661a8
Added cast to type support ( #4284 )
2024-09-29 17:03:01 -04:00
George Rennie
0572f8806f
opt_reduce: add test for constant $reduce_and/or not being zero width
2024-09-25 16:28:41 +01:00
George Rennie
e105cae4a9
opt_demorgan: add test for zero width cell
2024-09-25 16:10:16 +01:00
Martin Povišer
ea765686b6
aiger2: Adjust hierarchy/port handling
2024-09-18 16:55:02 +02:00
Martin Povišer
6c1fa45995
aiger2: Ingest `$pmux`
2024-09-18 16:42:56 +02:00
Martin Povišer
d5756eb9be
tests: Add trivial liberty -unit_delay test
2024-09-18 16:17:03 +02:00
Martin Povišer
31476e89b6
tests: Avoid temporary script file
2024-09-18 16:17:03 +02:00
Martin Povišer
8e29675a23
aiger2: Support `$bwmux`, comparison operators
2024-09-17 13:55:58 +02:00
Martin Povišer
fb26945a20
Start an 'aiger2' backend
2024-09-17 13:55:58 +02:00
Martin Povišer
4cfdb7ab50
Adjust operation naming in aigmap test
2024-09-17 13:55:58 +02:00
Emil J
52382c6544
Merge pull request #4583 from YosysHQ/emil/clock_gate
...
clockgate: centralize clock enables out of FFs
2024-09-16 15:41:01 +02:00
N. Engelhardt
c8b42b7d48
Merge pull request #4538 from RCoeurjoly/verific_bounds
2024-09-12 13:04:04 +02:00
Emil J. Tywoniak
1e999a3cb7
clockgate: EN can be a bit on a multi-bit wire
2024-09-11 19:18:25 +02:00
Roland Coeurjoly
bdc43c6592
Add left and right bound properties to wire. Add test. Fix printing
...
for signed attributes
Co-authored-by: N. Engelhardt <nak@yosyshq.com>
Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com>
2024-09-10 12:52:42 +02:00
Emil J. Tywoniak
7e473299bd
clockgate: bail on constant signals
2024-09-09 21:20:19 +02:00
Emil J. Tywoniak
dc039d8be4
clockgate: test fine-grained cells
2024-09-09 21:03:22 +02:00
Emil J. Tywoniak
e64fceef70
clockgate: prototype clock gating
2024-09-09 15:00:54 +02:00
Miodrag Milanović
b20df72e1e
Merge pull request #4536 from YosysHQ/functional
...
Functional Backend
2024-09-06 10:05:04 +02:00
Emily Schmidt
5a476a8d29
functional tests: run from make tests but not smtlib/rkt tests
2024-09-04 10:30:08 +01:00
Krystine Sherwin
7fe9157df2
smtr: Add rkt to functional tests
2024-09-03 11:32:02 +01:00
Miodrag Milanović
598d010349
Merge pull request #4504 from YosysHQ/nanoxplore
...
NanoXplore synthesis
2024-09-03 10:19:44 +02:00
Emily Schmidt
2b8db94aa0
functional backend: add test to verify test_generic
2024-08-29 13:14:18 +01:00
George Rennie
8206951f77
proc_dff: add tests
2024-08-28 16:24:47 +01:00
Emily Schmidt
761eff594f
functional backend: missing includes for stl containers
2024-08-22 11:13:58 +01:00
Roland Coeurjoly
91e3773b51
Ensure signed constants are correctly parsed, represented, and exported in RTLIL. Add a test to check parsing and exporting
2024-08-21 14:28:42 +01:00
Emily Schmidt
831da51255
add picorv test to functional backend
2024-08-21 11:04:11 +01:00
Emily Schmidt
99effb6789
add support for initializing registers and memories to the functional backend
2024-08-21 11:03:29 +01:00
Emily Schmidt
145af6f10d
fix memory handling in functional backend, add more error messages and comments for memory edgecases
2024-08-21 11:03:29 +01:00
Emily Schmidt
3cd5f4ed83
add support for RTLIL cells with multiple outputs to the functional backend, implement $fa,$lcu,$alu
2024-08-21 11:03:29 +01:00
Emily Schmidt
c0c90c2c31
functional backend: require shift width == clog2(operand width)
2024-08-21 11:03:29 +01:00
Emily Schmidt
6922633b0b
fix a few bugs in the functional backend and refactor the testing
2024-08-21 11:03:29 +01:00
Emily Schmidt
674e6d201d
rewrite functional backend test code in python
2024-08-21 11:03:29 +01:00
Roland Coeurjoly
80582ed3af
Check the existance of a different set of outputs. No need for (push 1) nor (pop 1)
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
7cff8fa3a3
Fix corner case of pos cell with input and output being same width
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
5780357cd9
Emit valid SMT for stateful designs, fix some cells
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
50f487e08c
Added $ff test
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
762f8dd822
Add readme explaining how to create test files
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
73ed514623
Check that there are not other solutions other than the first given
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
cb5f08364c
´SMT success only if simulation is equivalent
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
e235fc704d
Create std::mt19937 only once
2024-08-21 11:02:31 +01:00
Emily Schmidt
21bb1cf1bc
rewrite functional c++ simulation library
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
39bf4f04f7
Create VCD file from SMT file
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
b98210d8ac
Valid SMT is emitted, improved test script
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
71aaa1c80d
Consolidate tests scripts into one
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
547c5466ec
Ignore smt2 files, generated by the execution of the tests
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
54225b5c42
Add test for SMT backend. Tests if SMT is valid and compares simulation with yosys sim
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
720429b1fd
Add test_cell tests for C++ functional backend
2024-08-21 11:01:09 +01:00
Emil J
e0d3bbf3c3
Merge pull request #4452 from phsauter/shiftadd-underflow-fix
...
peepopt: avoid shift-amount underflow
2024-08-19 15:45:46 +02:00
Miodrag Milanovic
54d237ff82
add min_ce_use and min_srst_use parameters
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
dbf1d037e8
Cleanup
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
3848563600
Update tests
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
1a6e5c671f
Add meminit handling for NX_RFB_U
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
40f05009e3
Fix CY chaining and CI injection
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
f4d8ea4c40
Start adding RFB simulation models
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
7e4aef06e4
Add register file mapping
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
41ae513d60
support other I/O configurations
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
34f08bc639
Enable nanoxplore tests
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
a5bfb23b47
start cleaning rams
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
65d2ebac9d
fix test
2024-08-15 17:50:36 +02:00
Lofty
b0c4add642
Added lutram
2024-08-15 17:50:36 +02:00
Lofty
b3f59c9820
Add NX_CY
2024-08-15 17:50:36 +02:00
Lofty
b4e9bb0d85
Add FFs and related tests
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
b4a17cccc3
add few more tests
2024-08-15 17:50:36 +02:00
Miodrag Milanovic
93543bd874
add lut tests
2024-08-15 17:50:36 +02:00
Martin Povišer
c35f5e379c
Extend liberty tests
2024-08-13 18:47:36 +02:00
George Rennie
b6ceff2aab
peepopt clockgateff: add testcase
2024-08-07 10:21:52 +01:00
N. Engelhardt
9f869b265c
Merge pull request #4474 from tony-min-1/mchp
...
Add PolarFire FPGA support
2024-07-29 15:28:44 +02:00
Emil J. Tywoniak
01fd72520f
proc_rom: test src attribute on memories
2024-07-29 10:13:45 +02:00
chunlin min
3db69b7a10
inline all tests. Add switch to remove init values as PolarFire DFFs do not support init
2024-07-08 17:03:03 -04:00
Tony Min
d41688f7d7
Revisions ( #4 )
...
* area should be 1 for all LUTs
* clean up macros
* add log_assert to fail noisily when encountering oddly configured DFF
* clean help msg
* flatten set to true by default
* update
* merge mult tests
* remove redundant test
* move all dsp tests to single file and remove redundant tests
* update ram tests
* add more dff tests
* fix c++20 compile errors
* add option to dump verilog
* default to use abc9
* remove -abc9 option since its the default now
---------
Co-authored-by: tony <minchunlin@gmail.com>
2024-07-08 10:57:16 -04:00
Tony Min
6fe0e00050
Add missing u sram init ( #3 )
...
add missing INIT for uSRAM
2024-07-04 16:39:10 -04:00
chunlin min
8e7ec2d660
add assertions for synth_microchip tests
2024-07-04 15:45:44 -04:00
chunlin min
e3c4791e5b
move microchip tests from techlibs/microchip/tests to tests/arch/microchip
2024-07-04 14:16:52 -04:00
phsauter
34b5c6d062
peepopt: avoid shift-amount underflow
2024-06-13 23:30:07 +02:00
Marian Buschsieweke
7f89a45ad7
cxxxrtl: fix use of format specifiers in test
...
This fix a few instances of incorrect (and non-portable) use of format
specifiers.
2024-06-11 07:22:39 +01:00
Asherah Connor
dc69365258
cxxrtl: failing test: unconnected blackbox outputs don't compile.
2024-06-07 14:24:27 +03:00
Martin Povišer
4b67f3757f
Merge pull request #4404 from YosysHQ/povik/bbox_derive
...
box_derive: New command to derive modules for boxes
2024-05-31 19:09:18 +02:00
Martin Povišer
97fedff383
box_derive: Tune the test
2024-05-29 20:42:11 +02:00
Martin Povišer
bff2443af8
box_derive: Finish the test
2024-05-21 16:34:49 +02:00
Martin Povišer
c0a196173a
Rename `bbox_derive` to `box_derive`
2024-05-21 16:18:03 +02:00
N. Engelhardt
24f9329c67
Merge pull request #4367 from YosysHQ/lofty/intel_alm-drop-quartus
...
intel_alm: drop quartus support
2024-05-21 16:01:23 +02:00
Martin Povišer
557db4ea46
bbox_drive: Add an incomplete test
2024-05-21 14:57:49 +02:00
Martin Povišer
b143e5678f
cellmatch: Rename the special design to `$cellmatch`
2024-05-03 16:42:41 +02:00
Martin Povišer
913bc87c44
cellmatch: Add test
2024-05-03 16:42:41 +02:00
Emil J. Tywoniak
a833f05036
techmap: add dynamic cell type test
2024-05-03 13:53:49 +02:00
Lofty
8cc9aa7fc6
intel_alm: drop quartus support
2024-05-03 11:32:33 +01:00
George Rennie
4e6deb53b6
read_aiger: Fix incorrect read of binary Aiger without outputs
...
* Also makes all ascii parsing finish reading lines and adds a small
test
2024-04-29 14:06:58 +01:00
N. Engelhardt
e8ec19c273
add command that should not have any effect to hierarchy -generate test (this documents the current behavior, not sure if it is desired functionality)
2024-04-12 13:51:06 +02:00
N. Engelhardt
b87327d1b9
fix hierarchy -generate mode handling of cells
2024-04-12 13:38:33 +02:00
Miodrag Milanovic
0c7ac36dcf
Add workflows and CODEOWNERS and fixed gitignore
2024-04-11 14:56:00 +02:00
Martin Povišer
dc746080f5
Merge pull request #4298 from povik/kogge-stone
...
techmap: Add a Kogge-Stone option for `$lcu` mapping
2024-04-08 16:46:06 +02:00
N. Engelhardt
8e8885e1cc
Merge pull request #4323 from YosysHQ/tests_update
...
Tests update for latest more strict iverilog
2024-04-08 15:10:59 +02:00
Miodrag Milanovic
4ac10040ce
Enable SV for localparam use by Efinix cell_sim
2024-04-08 12:45:43 +02:00
Miodrag Milanovic
91e41d8c80
Move parameters to module declaration
2024-04-08 12:44:37 +02:00
Catherine
d9a4a42389
write_verilog: don't `assign` to a `reg`.
...
Fixes #2035 .
2024-04-03 13:06:45 +02:00
Merry
d07a55a852
cxxrtl: Fix sdivmod
...
x = x.neg(); results in the subsequent x.is_neg() always being false.
Ditto for the dividend.is_neg() != divisor.is_neg() test.
2024-03-30 07:56:11 +00:00
Martin Povišer
c49d6e7874
techmap: Add Kogge-Stone test
2024-03-27 11:08:26 +01:00
Martin Povišer
5924d97381
tests: Remove part of test involving combinational loops
2024-03-11 10:45:36 +01:00
Martin Povišer
87e72ef86f
celledges: Add read ports arst paths
2024-03-11 10:45:17 +01:00
Martin Povišer
e4296072c4
check: Rephrase regex for portability
2024-03-11 10:45:17 +01:00
Martin Povišer
e1e77a7fa9
check: Extend testing
2024-03-11 10:45:17 +01:00
Martin Povišer
3eef6450f1
check: Add coarse-grain false positive test
2024-03-11 10:43:49 +01:00
N. Engelhardt
d70113a909
Merge pull request #3972 from nakengelhardt/celledges_shift_ops
...
celledges: support shift ops
2024-03-08 09:35:47 +01:00
Jannis Harder
0db76c6ec4
tests/sva: Skip sva tests that use SBY until SBY is compatible again
...
This commit is part of a PR that requires corresponding changes in SBY.
To prevent CI failures, detect whether those changes already landed and
skip the SBY using tests until then.
2024-03-05 14:37:33 +01:00
Roland Coeurjoly
4a2fb18718
Changes in libs, passes and tests Makefiles. LDLIBS -> LIBS. LDFLAGS -> LINKFLAGS. CXX is clang++ or g++, not clang and gcc
2024-02-25 17:23:56 +01:00
Miodrag Milanović
bc8a3a5b18
Merge pull request #4219 from rovinski/master
...
dfflibmap: Add a -dont_use flag to ignore cells
2024-02-20 12:43:44 +01:00
Austin Rovinski
689feed012
dfflibmap: Add a -dont_use flag to ignore cells
...
This is an alternative to setting the dont_use property in lib. This brings
dfflibmap in parity with the abc pass for dont_use.
Signed-off-by: Austin Rovinski <rovinski@nyu.edu>
2024-02-19 13:00:18 -05:00
Martin Povišer
db947e4c71
Merge pull request #4218 from kivikakk/proc_rom-actionless-switch
...
proc_rom: don't assert on big actionless switch.
2024-02-19 16:21:40 +01:00
N. Engelhardt
edd154e3cd
Merge pull request #4215 from povik/xprop-race
...
Address race in `xprop` tests
2024-02-19 16:16:16 +01:00
Amelia Cuss
bf4a46ccb3
proc_rom: don't assert on big actionless switch.
...
See the test case. PROC_ROM will consider this for evaluation, even
though -- without any actions -- lhs is empty (but still "uniform").
A zero-width memory is constructed, which later fails check with:
ERROR: Assert `width != 0' failed in kernel/mem.cc:518.
Ensure we don't proceed if there's nothing to encode.
2024-02-18 01:33:28 +11:00
Jannis Harder
811b7b54d4
Merge pull request #4204 from YosysHQ/micko/gen_test
...
do not override existing shell variable
2024-02-16 14:28:56 +01:00
Martin Povišer
e51c77484a
tests: Comment on `A[0]`
2024-02-16 11:43:28 +01:00
Martin Povišer
5a05344d9c
tests: Fix initialization race in xprop tests
2024-02-16 11:43:28 +01:00
Jannis Harder
bbdfcfdf30
clk2fflogic: Fix handling of $check cells
...
Fixes a bug in the handling of the recently introduced $check cells.
Both $check and $print cells in clk2fflogic are handled by the same code
and the existing tests for that were only using $print cells. This
missed a bug where the additional A signal of $check cells that is not
present on $print cells was dropped due to a typo, rendering $check
cells non-functional.
Also updates the tests to explicitly cover both cell types such that
they would have detected the now fixed bug.
2024-02-14 11:42:27 +01:00
Miodrag Milanovic
353ccc9e58
do not override existing shell variable
2024-02-12 12:58:13 +01:00
Miodrag Milanović
edb95c69a9
Merge pull request #4084 from jix/scopeinfo
...
$scopeinfo support
2024-02-12 09:51:22 +01:00
Miodrag Milanovic
10297127be
fix test for verific
2024-02-12 09:19:58 +01:00
Dag Lem
f09ea16bd1
Resolve struct member multiple dimensions defined in stages with typedef
2024-02-11 11:26:52 -05:00
Dag Lem
a4ae773150
Added test for multidimensional packed arrays
2024-02-11 11:26:52 -05:00
Dag Lem
e0d3977e19
Add support for $dimensions and $unpacked_dimensions
2024-02-11 11:26:52 -05:00
Dag Lem
2125357e76
Add support for $increment
2024-02-11 11:26:52 -05:00
Dag Lem
a32d9b6c45
Fix test of memory vs. memory converted to registers
...
The purpose of memtest02 in tests/simple/memory.v is to test bit
select on both memory (mem1) and memory converted to registers (mem2).
After 7cfae2c52 , mem1 was automatically converted to registers,
and the test no longer worked as intended. This is fixed by
adding (* nomem2reg *) to mem1.
2024-02-11 11:26:52 -05:00
Dag Lem
39fea32c6e
Add support for packed multidimensional arrays
...
* Generalization of dimensions metadata (also simplifies $size et al.)
* Parsing and elaboration of multidimensional packed ranges
2024-02-11 11:26:52 -05:00
Thomas Watson
10e06f9b66
tests/various/clk2fflogic_effects.sh: remove /tmp use
...
Might not be accessible.
2024-02-10 15:09:54 -06:00
Thomas Watson
b1f8308772
tests/various/clk2fflogic_effects.sh: fix tail invocation
...
Previous syntax is a GNU extension and not accepted by macOS. Use
documented -n option instead, compatible with POSIX-compliant tail
implementations.
2024-02-10 15:07:55 -06:00
Jannis Harder
9288107f43
Test flatten and opt_clean's $scopeinfo handling
2024-02-06 17:51:29 +01:00
Miodrag Milanović
269c50f90e
Merge pull request #4130 from jix/hierarchy-defer-notop
...
hierarchy: Without a known top module, derive all deferred modules
2024-02-06 12:08:01 +01:00
Miodrag Milanovic
d00843d436
Add -nordff to test
2024-02-06 10:36:30 +01:00
Jannis Harder
0470cbb00d
hierarchy: Without a known top module, derive all deferred modules
...
This fixes hierarchy when used with cell libraries that were loaded with
-defer and also makes more of the hierarchy visible to the auto-top
heuristic.
2024-02-06 10:31:40 +01:00
Jannis Harder
ffb82df33c
Additional tests for FV $check compatibility
2024-02-02 16:07:10 +01:00
Jannis Harder
e1a59ba80b
async2sync, clk2fflogic: Add support for $check and $print cells
2024-02-01 20:10:39 +01:00
Jannis Harder
331ac5285f
tests: Run async2sync before sat and/or sim to handle $check cells
...
Right now neither `sat` nor `sim` have support for the `$check` cell.
For formal verification it is a good idea to always run either
async2sync or clk2fflogic which will (in a future commit) lower `$check`
to `$assert`, etc.
While `sim` should eventually support `$check` directly, using
`async2sync` is ok for the current tests that use `sim`, so this commit
also runs `async2sync` before running sim on designs containing
assertions.
2024-02-01 16:14:11 +01:00
Jannis Harder
2baa578d94
Remove too fragile smtlib2_module test
...
This compares the write_smt2 output pretty much verbatim, which contains
auto generated private names and fixes an arbitrary ordering. The tested
functionality is also covered by SBY tests which actually interpret the
write_smt2 output using an SMT solver and thus are much more robust, so
we can safely remove this test.
2024-02-01 16:14:11 +01:00
Martin Povišer
ea3dc7c1b4
rtlil: Add wire deletion test
2024-01-29 11:25:54 +01:00
Martin Povišer
08fd47e970
Test roundtripping some processes to Verilog and back
2024-01-24 16:32:25 +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
Martin Povišer
cb86efa50c
celledges: Add test of shift cells edge data
2024-01-19 11:14:10 +01: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
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
Dag Lem
e0566eafdb
Add test for rhs sign extension in array slice assignment
2024-01-10 21:15:00 +01:00
Dag Lem
dbec704b49
Include x bits in test of lhs dynamic part-select
2024-01-10 20:28:36 +01:00
Dag Lem
a105d2c050
Add torture test for (* nowrshmsk *) stride optimization
2024-01-10 20:28:36 +01:00
Dag Lem
2cab4ff173
Correction and optimization of nowrshmsk
...
This makes tests/verilog/dynamic_range_lhs.v pass, after ensuring that
nowrshmsk is actually tested.
Stride is extracted from indexing of two-dimensional packed arrays and
variable slices on the form dst[i*stride +: width] = src, and is used
to optimize the generated CASE block.
Also uses less confusing variable names for indexing of lhs wires.
2024-01-10 20:28:36 +01:00
Dag Lem
1bbea13f80
Correct hierarchical path names for structs and unions
2024-01-04 17:22:07 +01:00
N. Engelhardt
d87bd7ca3f
Merge pull request #3887 from kivikakk/env-bash
...
tests: use /usr/bin/env for bash.
2023-12-18 16:33:35 +01:00
Martin Povišer
449e3dbbd3
cxxrtl: Mask `bmux` result appropriately
2023-12-14 06:57:28 +00:00
Merry
1dff3c83d9
tests/cxxrtl: Add -O2
2023-12-13 12:27:06 +00:00
Merry
29e0cc6acd
cxxrtl: Add simple fuzzing tests for value
2023-12-13 12:21:44 +00:00
Merry
d7cb6981b5
cxxrtl: Fix value::ctlz
2023-12-13 12:21:44 +00:00
Merry
ded63bedd5
cxxrtl: Fix value::sshr
2023-12-13 12:11:57 +00:00
Merry
ff53f3d2b6
cxxrtl: Fix value::shl
2023-12-13 12:02:30 +00:00
Jannis Harder
7b74caa5db
peepopt: Fix padding for the peepopt_shiftmul_right pattern
...
The previous version could easily generate a large amount of padding
when the constant factor was significantly larger than the width of the
shift data input. This could lead to huge amounts of logic being
generated before then being optimized away at a huge performance and
memory cost.
Additionally and more critically, when the input width was not a
multiple of the constant factor, the input data was padded with 'x bits
to such a multiple before interspersing the 'x padding needed to align
the selectable windows to power-of-two offsets.
Such a final padding would not be correct for shifts besides $shiftx,
and the previous version did attempt to remove that final padding at the
end so that the native zero/sign/x-extension behavior of the shift cell
would be used, but since the last selectable window also got
power-of-two padding appended after the padding the code is trying to
remove got added, it did not actually fully remove it in some cases.
I changed the code to only add 'x padding between selectable windows,
leaving the last selectable window unpadded. This omits the need to add
final padding to a multiple of the constant factor in the first place.
In turn, that means the only 'x bits added are actually impossible to
select. As a side effect no padding is added when the constant factor is
equal to or larger than the width of the shift data input, also solving
the reported performance bug.
This fixes #4056
2023-12-06 18:35:44 +01:00
Martin Povišer
22cc4aff51
quicklogic: Test TDP36K inference with initial data
2023-12-04 15:52:03 +01:00
Krystine Sherwin
e5c32f399a
synth_quicklogic: Testing double_sync_ram_tdp
2023-12-04 15:52:03 +01:00
Krystine Sherwin
97354782c0
Adding double_sync_ram_tdp to blockram.v
2023-12-04 15:52:03 +01:00
Krystine Sherwin
215a777eb3
qlf_tests: minor adjustment
...
Renamed python script so that it sits next to the testbench file when alphabetically sorted.
Reverted `MAX_WIDTH` to full precision for truncation testing.
2023-12-04 15:52:03 +01:00
N. Engelhardt
33ca6994b7
remove example test
2023-12-04 15:52:03 +01:00
N. Engelhardt
3c5b0ab164
fix test setup for synth_quicklogic memory tests
2023-12-04 15:52:03 +01:00
Krystine Sherwin
509d176523
attempting to sim split memory tests
...
and failing
2023-12-04 15:52:03 +01:00
Krystine Sherwin
0d1668c1ee
QLF_TDP36K: asymmetric simulation tests
2023-12-04 15:52:03 +01:00
Krystine Sherwin
497cd021af
QLF_TDP36K: truncation tests matter
...
Expected values are now stored in full precision rather than truncating to the same value as the input.
i.e. 0x5a5a5a5a will truncate to 0x5a5a for write data but will remain 0x5a5a5a5a for expected read.
2023-12-04 15:52:03 +01:00
Krystine Sherwin
7f12d0ba95
QLF_TDP36K: more basic tdp/sdp sim tests
...
Adds TDP submodule to generator.
Adds shorthand expected signal to testbench (mostly to make it easier when I look at the vcd dump to figure out what I did wrong in tests).
2023-12-04 15:52:03 +01:00
Krystine Sherwin
3d08ed216d
QLF_TDP36K: parameterised sim test gen
...
Also limited to 16 tests per file to allow parallelism.
Previous tests are converted to new test format with no sim test steps.
2023-12-04 15:52:03 +01:00
Krystine Sherwin
ba3be3fd1c
QLF_TDP36K: test bram_tdp post synth
2023-12-04 15:52:03 +01:00
N. Engelhardt
f9c8978128
add example memory test
2023-12-04 15:52:03 +01:00
Krystine Sherwin
ede4eaeee2
quicklogic: wildcard asymmetric memory tests
2023-12-04 15:52:03 +01:00
Krystine Sherwin
8ded7020f4
tests: asymmetric sync rams now correctly asymmetric
...
Also both use the same named parameters for better mirroring.
2023-12-04 15:52:03 +01:00
Krystine Sherwin
ba09866217
quicklogic: testing port widths on split rams
2023-12-04 15:52:03 +01:00
Krystine Sherwin
1a843b2a86
quicklogic: testing 1:4 assymetric memory
2023-12-04 15:52:03 +01:00
Krystine Sherwin
7513bfcbfe
quicklogic: fix double width read
2023-12-04 15:52:03 +01:00
Krystine Sherwin
8d3b238b9b
quicklogic: Testing split TDP36K
...
Adds `double_sync_ram_sdp` to `common/blockram.v`, providing a test for two disjoint memories.
Refactor python blockram template to take a list of params to support the above.
Also change the smaller single TDP36K tests to also test `port_a_width` value.
2023-12-04 15:52:03 +01:00
Krystine Sherwin
991850e1c9
quicklogic: Initial blockram tests
...
Use python script to generate tests for both SDP and TDP across multiple sizes of RAM.
Adds sync_ram_sdp_(wwr|wrr) to common blockram.v for double width write and double width read respectively.
2023-12-04 15:52:03 +01:00
Martin Povišer
a5c8d246f7
quicklogic: Add k6n10f DSP test
2023-12-04 15:52:03 +01:00
Martin Povišer
db9e5b4f14
quicklogic: Fix `dffs.ys` test
2023-12-04 15:52:03 +01:00
Martin Povišer
554d8caef7
quicklogic: Add basic k6n10f tests
2023-12-04 15:52:03 +01:00
Martin Povišer
6672b6c1b3
quicklogic: Move pp3 tests one level down
2023-12-04 15:52:02 +01:00
N. Engelhardt
98769010af
synth_quicklogic: rearrange files to prepare for adding more architectures
2023-12-04 15:52:02 +01:00
Catherine
62bbd086b1
cxxrtl: reorganize runtime component files.
...
In preparation for substantial expansion of CXXRTL's runtime, this commit
reorganizes the files used by the implementation. Only minimal changes are
required in a consumer.
First, change:
-I$(yosys-config --datdir)/include
to:
-I$(yosys-config --datdir)/include/backends/cxxrtl/runtime
Second, change:
#include <backends/cxxrtl/cxxrtl.h>
to:
#include <cxxrtl/cxxrtl.h>
(and do the same for cxxrtl_vcd.h, etc.)
2023-11-28 15:32:36 +00:00
Lofty
7ae4041e20
ice40, ecp5, gowin: enable ABC9 by default
2023-11-13 15:28:13 +00:00
N. Engelhardt
63cec22a0c
Merge pull request #3883 from phsauter/peepopt-shiftadd
...
peepopt: Add `shiftadd` pattern
2023-11-07 10:42:15 +01:00
phsauter
c3b8de54da
test: add tests for `shiftadd` and `shiftmul`
...
This expands the part-select tests with one additional module.
It specifically tests the different variants of the `peepopt`
optimizations `shiftadd` and `shiftmul`.
Not all these cases are actually transformed using `shiftadd`,
including them also checks if the correct variants are rejected.
2023-11-06 14:01:37 +01:00
Lofty
b8b47f7c6c
Revert "ice40, ecp5: enable ABC9 by default"
2023-11-03 14:52:52 +00:00
Lofty
32082477b5
ice40, ecp5: enable ABC9 by default
2023-11-03 08:52:54 +00:00
N. Engelhardt
833b67af80
verific: import attributes on ports
...
Co-authored-by: Miodrag Milanović <mmicko@gmail.com>
2023-10-20 18:31:41 +02:00
N. Engelhardt
1b6d1e9419
memory_libmap: look for ram_style attributes on surrounding signals
2023-10-19 19:23:35 +02:00
Martin Povišer
62d6338688
quicklogic: Fix pp3 `dffs` test
...
Fix name confusion which was making the test look into the vendor's cell
blackbox rather than into the synthesis results.
2023-10-12 12:45:40 +02:00
Adrian Parvin Ouano
062dbf2c96
alumacc: add signed-independent comparison tests
2023-10-09 00:36:22 +08:00
Martin Povišer
4506e11d0f
booth: Extend test to catch bug from previous commit
2023-10-04 23:30:29 +02:00
Jannis Harder
c174597014
Fix sva_value_change_changed test for updated verific
2023-10-03 11:46:43 +02:00
Martin Povišer
b0045300fd
booth: Cut down the test
...
Cut the test down from taking ~25 s to ~3 s.
2023-09-28 11:55:51 +02:00
Martin Povišer
c4762d930e
Merge pull request #3930 from povik/verific-test-memsemantics
...
verific: Add test of accurate semantics in memory inference
2023-09-20 11:46:42 +02:00
Martin Povišer
99a5773911
Merge pull request #3920 from zachjs/asgn-expr
...
sv: support assignments within expressions
2023-09-20 11:30:14 +02:00
Zachary Snow
28e99f2b8c
fix width of post-increment/decrement expressions
2023-09-18 23:46:06 -04:00
Zachary Snow
7d07615dee
allow attributes in front of ++/-- statements
2023-09-18 23:46:02 -04:00
Martin Povišer
8222121164
verific: Add test of accurate semantics in memory inference
2023-09-18 16:37:15 +02:00
andyfox-rushc
6d29dc659b
renamed passname to booth, replaced connect_sigSpecToWire with connect, updated test script
2023-09-08 15:34:56 -07:00
Martin Povišer
25a33d4082
techmap: Make the Booth test deterministic
2023-09-07 14:56:56 +02:00
Martin Povišer
0c2a99ca47
techmap: Test the Booth multiplier
2023-09-07 14:46:59 +02:00
Zachary Snow
4edb1a1921
sv: support assignments within expressions
...
- Add support for assignments within expressions, e.g., `x[y++] = z;` or
`x = (y *= 2) - 1;`. The logic is handled entirely within the parser
by injecting statements into the current procedural block.
- Add support for pre-increment/decrement statements, which are
behaviorally equivalent to post-increment/decrement statements.
- Fix non-standard attribute position used for post-increment/decrement
statements.
2023-09-05 22:27:55 -04:00
Miodrag Milanovic
a42c630264
put back previous test state, due to default change
2023-08-29 10:21:58 +02:00
Miodrag Milanovic
3b9ebfa672
Addressed code review comments
2023-08-25 11:10:20 +02:00
Miodrag Milanovic
ea50d96135
fixed tests
2023-08-23 10:54:29 +02:00
Asherah Connor
4a475fa7a2
cxxrtl: include iostream when prints are used
2023-08-17 07:08:22 +02:00
Charlotte
d130f7fca2
tests: use /usr/bin/env for bash.
2023-08-12 11:59:39 +10:00
Charlotte
860e3e4056
proc_clean: only consider fully-defined switch operands too.
2023-08-12 02:46:31 +02:00
Charlotte
bf84861fc2
proc_clean: only consider fully-defined case operands.
2023-08-12 02:46:31 +02:00
Charlotte
ce245b5105
cxxrtl_backend: respect sync `$print` priority
...
We add a new flow graph node type, PRINT_SYNC, as they don't get handled
with regular CELL_EVALs. We could probably move this grouping out of
the dump method.
2023-08-11 04:46:52 +02:00
Charlotte
04582f2fb7
verilog_backend: emit sync `$print` cells with same triggers together
...
Sort by PRIORITY, ensuring output order.
2023-08-11 04:46:52 +02:00
Charlotte
4ffdee65e0
cxxrtl: store comb $print cell last EN/ARGS in module
...
statics were obviously wrong -- may be multiple instantiations of any
given module. Extend test to cover this.
2023-08-11 04:46:52 +02:00
Charlotte
843ad9331b
cxxrtl: WIP: adjust comb display cells to only fire on change
...
Naming and use of statics to be possibly revised.
2023-08-11 04:46:52 +02:00
Charlotte
eb0fb4d662
tests: -std=c++11 not optional
2023-08-11 04:46:52 +02:00
Charlotte
992a728ec7
tests: CXX may be e.g. gcc, so use CC and link stdc++ explicitly
2023-08-11 04:46:52 +02:00
Charlotte
f9b149fa7b
cxxrtl: add "-print-output" option, test in fmt
2023-08-11 04:46:52 +02:00
Charlotte
a1de898fcc
fmt: merge fuzzers since we don't rely on BigInteger logic
...
This is per fmt's (effective) use, as it turns out, so we're not losing
any fidelity in the comparison.
2023-08-11 04:46:52 +02:00
Charlotte
3571bf2c2d
fmt: fuzz, remove some unnecessary busywork
...
Removing some signed checks and logic where we've already guaranteed the
values to be positive. Indeed, in these cases, if a negative value got
through (per my realisation in the signed fuzz harness), it would cause
an infinite loop due to flooring division.
2023-08-11 04:46:52 +02:00
Charlotte
2ae551c0af
fmt: fuzz, fix (remove extraneous + incorrect fill)
...
"blk + chunks" is often an overrun, plus the fill is unnecessary; we
throw blk away immediately.
2023-08-11 04:46:52 +02:00
Charlotte
9f9561379b
fmt: format %t consistently at initial
2023-08-11 04:46:52 +02:00
Charlotte
75b44f21d1
fmt: rudimentary %m support (= %l)
2023-08-11 04:46:52 +02:00
Charlotte
c382d7d3ac
fmt: %t/$time support
2023-08-11 04:46:52 +02:00
Charlotte
b0f69f2cd5
tests: test cxxrtl against iverilog (and uncover bug!)
2023-08-11 04:46:52 +02:00
Charlotte
51d9b73107
fmt: tests completing again
...
We need to invoke "read_verilog" manually, since the default action on
input files is to defer processing. Under such conditions, we never
simplify the AST, and initial $prints never execute.
2023-08-11 04:46:52 +02:00
Charlotte
1eff84cb92
fmt: ensure test exits on fail
...
shebang not honoured when directly called with "bash run-test.sh".
2023-08-11 04:46:52 +02:00
whitequark
c285880684
fmt: add tests for Verilog round trip of format expressions.
2023-08-11 04:46:52 +02:00
whitequark
67052f62ec
fmt: add tests for Yosys evaluation of format expressions.
2023-08-11 04:46:52 +02:00
whitequark
9f8e039a4b
ast: use new format string helpers.
2023-08-11 04:46:52 +02:00
Martin Povišer
f8325f66b7
opt_expr: Fix 'signed X>=0' replacement for wide output ports
...
If the `$ge` cell we are replacing has wide output port, the upper bits
on the port should be driven to zero. That's not what a `$not` cell with
a single-bit input does. Instead opt for a `$logic_not` cell, which does
zero-pad its output.
Fixes #3867 .
2023-08-01 13:50:12 +01:00
Martin Povišer
93988ef5df
tests: Extend aigmap.ys with SAT comparison
...
Extend the aigmap.ys test with SAT-based comparison of the original
cells and their AIG implementations.
This tests both the usual cells and the single-bit Yosys gates.
2023-07-31 16:26:50 +02:00
N. Engelhardt
43780c9812
Merge pull request #3838 from povik/various-cleanup
2023-07-24 16:24:23 +02:00
Dag Lem
cff53d6d87
Corrected handling of nested typedefs of struct/union
...
This also corrects shadowing of constants in struct/union types.
2023-07-20 23:39:44 -04:00
Martin Povišer
f0ae046c5a
opt_share: Fix input confusion with ANDNOT, ORNOT gates
...
Distinguish between the A, B input ports of `$_ANDNOT_`, `$_ORNOT_`
gates when considering those for sharing. Unlike the input ports of the
other supported single-bit gates, those are not interchangeable.
Fixes #3848 .
2023-07-20 20:58:52 +01:00
Martin Povišer
7c6cc4c40b
tests: Fix invocation of 'help -cells'
...
There's no such thing as 'help -celltypes' and there probably never was.
2023-07-10 12:42:09 +02:00
Jannis Harder
a07f8ac38a
check: Also check for conflicts with constant drivers
2023-06-23 18:07:28 +02:00
Miodrag Milanovic
e6f7cf3b29
Update tests
2023-06-09 14:41:45 +02:00
Eddie Hung
862631d657
Add ABC9 DSP cascade test
2023-05-25 18:42:08 +01:00
Lofty
00b0e850db
intel_alm: re-enable carry chains for ABC9
2023-05-25 18:28:10 +01:00
CORRADI Quentin
e7156c644d
Standard compliance for tests/verilog/block_labels.ys
...
genvar declaration cannot take an initial value when declared as a module_or_generate_item_declaration.
Correct this test so that it doesn't fail unexpectedly if Yosys aligns with the standard.
2023-05-21 16:38:14 -04:00
Miodrag Milanovic
c2285b3460
fix file rights
2023-05-17 13:39:57 +02:00
Muthiah Annamalai (முத்து அண்ணாமலை)
693c609eec
Merge branch 'YosysHQ:master' into main/issue2525
2023-05-16 21:21:32 -07:00
Miodrag Milanović
acfdc5cc42
Merge pull request #3755 from RTLWorks/muthu/issue3498
...
[YOSYS] Issue #3498 - Fix Synopsys style unquoted Liberty style
2023-05-15 16:34:35 +02:00
Miodrag Milanović
5c7cc6ff06
Merge pull request #3745 from rfuest/gowin_alu
...
gowin: Fix X output of $alu techmap
2023-05-09 11:12:50 +02:00
Muthu Annamalai
17cfc969dd
[YOSYS] Issue #3498 - Fix Synopsys style unquoted Liberty style function body parsing with unittest
2023-05-06 23:37:47 -07:00
Muthu Annamalai
d2f3251528
adding unittest
2023-05-04 22:43:04 -07:00
Dag Lem
fb7f3bb290
Cleaner tests for RTLIL cells in struct_dynamic_range.sv
2023-05-04 14:28:21 +02:00
Dag Lem
ad437c178d
Handling of attributes for struct / union variables
...
(* nowrshmsk *) on a struct / union variable now affects dynamic
bit slice assignments to members of the struct / union.
(* nowrshmsk *) can in some cases yield significant resource savings; the
combination of pipeline shifting and indexed writes is an example of this.
Constructs similar to the one below can benefit from (* nowrshmsk *), and
in addition it is no longer necessary to split out the shift assignments
on separate lines in order to avoid the error message "ERROR: incompatible
mix of lookahead and non-lookahead IDs in LHS expression."
always_ff @(posedge clk) begin
if (rotate) begin
{ v5, v4, v3, v2, v1, v0 } <= { v4, v3, v2, v1, v0, v5 };
if (res) begin
v0.bytes <= '0;
end else if (w) begin
v0.bytes[addr] <= data;
end
end
end
2023-05-03 18:44:07 +02:00
Ralf Fuest
30f1d10948
gowin: Fix X output of $alu techmap
2023-05-01 17:56:41 +02:00
Jannis Harder
cee3cb31b9
Merge pull request #3734 from jix/fix_unbased_unsized_const
...
verilog: Fix const eval of unbased unsized constants
2023-04-24 16:08:48 +02:00
Benjamin Barzen
8611429237
ABC9: Cell Port Bug Patch ( #3670 )
...
* ABC9: RAMB36E1 Bug Patch
* Add simplified testcase
* Also fix xaiger writer for under-width output ports
* Remove old testcase
* Missing top-level input port
* Fix tabs
---------
Co-authored-by: Eddie Hung <eddie@fpgeh.com>
2023-04-22 16:24:36 -07:00
Jannis Harder
985f4926b7
verilog: Fix const eval of unbased unsized constants
...
When the verilog frontend perfomed constant evaluation of unbased
unsized constants in a context-determined expression it did not properly
extend them by repeating the bit value. This only affected constant
evaluation and not constants that made it through unchanged to RTLIL.
The latter case was already covered by tests and working before.
This fixes the const-eval issue by checking the `is_unsized` flag in
bitsAsConst and extending the value accordingly.
The newly added test also tests the already working non-const-eval case
to highlight that both cases should behave the same.
2023-04-20 12:12:50 +02:00
Miodrag Milanovic
0f5e7c244d
add additional dff and lutram tests
2023-04-06 09:10:14 +02:00
Miodrag Milanovic
54d313efc3
add test for CCU2D
2023-04-06 09:10:14 +02:00
Jannis Harder
fb1c2be76b
verilog: Support void functions
...
The difference between void functions and tasks is that always_comb's
implicit sensitivity list behaves as if functions were inlined, but
ignores signals read only in tasks. This only matters for event based
simulation, and for synthesis we can treat a void function like a task.
2023-03-20 12:52:46 +01:00
Miodrag Milanovic
61da330a38
Update tests
2023-03-20 09:58:41 +01:00
Jannis Harder
390d1c583a
verific: Fix enum_values support and signed attribute values
...
This uses the same constant parsing for enum_values and for attributes
and extends it to handle signed values as those are used for enums that
implicitly use the int type.
2023-03-15 09:51:36 +01:00
Jannis Harder
c50f641812
Merge pull request #3682 from daglem/struct-member-out-of-bounds
...
Out of bounds checking for struct/union members
2023-03-10 16:14:56 +01:00
Dag Lem
1af7d6121f
Added test for dynamic indexing within struct members
2023-03-08 20:25:39 +01:00
Dag Lem
0d3423ddea
Index struct/union members within corresponding wire chunks
...
This guards against access to bits outside of struct/union
members via dynamic indexing.
2023-03-05 14:54:17 +01:00
Miodrag Milanović
21e87f7986
Merge pull request #3646 from YosysHQ/lofty/fix-3591
...
muxcover: do not add decode muxes with x inputs
2023-02-27 16:26:57 +01:00
N. Engelhardt
842cdad575
Merge pull request #3674 from YosysHQ/fix_wide_case
2023-02-27 16:04:11 +01:00
gatecat
2ab3747cc9
fabulous: Add support for mapping carry chains
...
Signed-off-by: gatecat <gatecat@ds0.me>
2023-02-27 09:50:34 +01:00
Miodrag Milanovic
d8cefec169
Added ranged case check
2023-02-27 09:24:04 +01:00
Miodrag Milanovic
53a4f0fb56
Add test example
2023-02-27 09:24:04 +01:00
KrystalDelusion
f80920bd9f
Genericising bug1836.ys
2023-02-21 05:23:16 +13:00
KrystalDelusion
445a801a85
bug3205.ys removed
...
Made redundant by TDP test(s) in memories.ys
2023-02-21 05:23:16 +13:00
KrystalDelusion
51c2d476c2
Removing extra `default_nettype` lines
2023-02-21 05:23:16 +13:00
KrystalDelusion
8f6a06951c
Fix for sync_ram_sdp not being final module
...
Explicitly declare -top in synth_intel_alm.
2023-02-21 05:23:16 +13:00
KrystalDelusion
7f033d3c1f
More tests in memlib/generate.py
...
Covers most of the todo list, at least functionally. Some minor issues with not always using hardware features.
2023-02-21 05:23:15 +13:00
KrystalDelusion
af1b9c9e07
Tests for ram_style = "huge"
...
iCE40 SPRAM and Xilinx URAM
2023-02-21 05:23:15 +13:00
KrystalDelusion
de2f140c09
Testing TDP synth mapping
...
New common sync_ram_tdp.
Used in ecp5 and gatemate mem*.ys.
2023-02-21 05:23:15 +13:00
KrystalDelusion
48f4e09202
Asymmetric port ram tests with Xilinx
...
Uses verilog code from User Guide 901 (2021.1)
2023-02-21 05:23:14 +13:00
KrystalDelusion
ac5fa9a838
Addings tests for #1836 and #3205
2023-02-21 05:23:14 +13:00
Dag Lem
79043cb849
Out of bounds checking for struct/union members
...
Currently, only constant indices are checked.
2023-02-19 23:25:08 +01:00
Jannis Harder
1cedad7a68
Merge pull request #3675 from daglem/struct-item-queries
...
Support for data and array queries on struct/union item expressions
2023-02-15 13:33:34 +01:00
Jannis Harder
68480dfa19
Merge pull request #3671 from zachjs/master
...
Add test for typenames using constants shadowed later on
2023-02-15 13:04:43 +01:00
Dag Lem
f8219289b2
Corrected tests for data and array queries on struct/union item expressions
2023-02-15 12:36:29 +01:00
Dag Lem
c1e12877f0
Support for data and array queries on struct/union item expressions
...
For now, $bits, $left, $right, $low, $high, and $size are supported.
2023-02-15 11:44:24 +01:00
Jannis Harder
53bda9de54
Merge pull request #3661 from daglem/struct-array-range-offset
...
Handle range offsets in packed arrays within packed structs
2023-02-15 11:21:56 +01:00
Jannis Harder
ec94703619
Merge pull request #2995 from georgerennie/cover_precond
...
chformal: Add -coverenable option
2023-02-14 17:46:31 +01:00
Jannis Harder
85f611fb23
Merge pull request #3126 from georgerennie/equiv_make_assertions
...
equiv_make: Add -make_assert option
2023-02-14 17:15:55 +01:00
Jannis Harder
d2032ac6fd
Merge pull request #3669 from jix/fix-xprop-tests-yosys-call
...
tests: Fix path of yosys invocation in xprop tests
2023-02-13 17:55:36 +01:00
Jannis Harder
55ad3fe6c7
xprop tests: Make iverilog invocation more portable
2023-02-13 16:54:11 +01:00
Jannis Harder
2a68eee5f1
xprop: Test fixes and abort on test failure
...
Use `$finish(0)` to silently exit even when using recent iverlog
versions. Run `write_verilog -noexpr` before `write_verilog` as the
latter can modify the design.
This also enables checking the tests results, as xprop should be in a
state where the existing tests pass.
2023-02-13 14:05:16 +01:00
Jannis Harder
9f20beb7df
xprop: Smaller subset of tests to run by default
2023-02-13 14:02:02 +01:00
Dag Lem
615adc4253
Resolve package types in interfaces ( #3658 )
...
* Resolve package types in interfaces
* Added test for resolving of package types in interfaces
2023-02-12 18:25:39 -05:00
Zachary Snow
26a6c60478
Add test for typenames using constants shadowed later on
...
This possible edge case came up while reviewing #3555 . It is currently
handled correctly, but there is no clear test coverage.
2023-02-12 17:03:37 -05:00
Jannis Harder
6d021f04d4
tests: Fix path of yosys invocation in xprop tests
...
For now xprop test failures are still expected and ignored, but without
this change, they did not even run unless the yosys build was in path.
2023-02-10 19:17:16 +01:00
Jannis Harder
d31d5da69f
tests: in xprop tests, use MAKE variable if set
2023-02-10 15:01:04 +01:00
Dag Lem
777c589e85
Handle range offsets in packed arrays within packed structs
...
This brings the metadata for packed arrays in packed structs
in line with the metadata for unpacked arrays, and correctly
handles the case when both lsb and msb in an address range are
non-zero.
2023-02-05 17:09:51 +01:00
Jannis Harder
c235802f4a
Merge pull request #3650 from jix/rtlil_roundtrip_z_bits
...
backends/rtlil: Do not shorten a value with z bits to 'x
2023-01-30 16:14:24 +01:00
N. Engelhardt
ecfa7e9fbc
add pmux option to bmuxmap for better fsm detection with verific frontend
2023-01-30 16:12:53 +01:00
Dag Lem
26db5a11d3
Resolve struct member package types
2023-01-29 13:51:44 -05:00
Dag Lem
db13c6df2b
Handle struct members of union type ( #3641 )
2023-01-29 13:45:45 -05:00
Jannis Harder
b08a880704
backends/rtlil: Do not shorten a value with z bits to 'x
2023-01-29 14:02:25 +01:00
Lofty
822c7b0341
muxcover: do not add decode muxes with x inputs
2023-01-26 05:19:45 +00:00
Jannis Harder
5abaa59080
Merge pull request #3537 from jix/xprop
...
New xprop pass
2023-01-11 16:26:04 +01:00
Jannis Harder
3ebc50dee4
Merge pull request #3467 from jix/fix_cellarray_simplify
...
simplify: Do not recursively simplify AST_CELL within AST_CELLARRAY
2022-12-19 16:05:13 +01:00
Jannis Harder
cf3570abde
simplify: regression test for AST_CELLARRAY simplification issue
2022-12-07 18:41:55 +01:00
Dag Lem
f94eec952f
Support for packed multidimensional arrays within packed structs
2022-12-03 19:54:47 +01:00
Jannis Harder
4a2b7287ca
Merge pull request #3551 from daglem/struct-array-swapped-range
...
Support for arrays with swapped ranges within structs
2022-12-01 00:58:32 +01:00
Jannis Harder
ce708122a5
New xprop pass to encode 3-valued x-propagation using 2-valued logic
2022-11-30 19:01:28 +01:00