3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-22 00:26:40 +00:00
Commit graph

95 commits

Author SHA1 Message Date
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
Martin Povišer
c49d6e7874 techmap: Add Kogge-Stone test 2024-03-27 11:08:26 +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
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
4506e11d0f booth: Extend test to catch bug from previous commit 2023-10-04 23:30:29 +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
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
Charlotte
d130f7fca2 tests: use /usr/bin/env for bash. 2023-08-12 11:59:39 +10: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
ecfa7e9fbc add pmux option to bmuxmap for better fsm detection with verific frontend 2023-01-30 16:12:53 +01:00
Jannis Harder
0113f44faa Reenable existing equiv_opt tests 2022-10-07 16:04:51 +02:00
Jannis Harder
81906aa627 Fix tests for check in equiv_opt 2022-10-07 16:04:51 +02:00
Marcelina Kościelnicka
77b1dfd8c3 opt_mem: Remove constant-value bit lanes. 2022-05-07 23:13:16 +02:00
Claire Xenia Wolf
d6e4d3f1ba Fix the tests we just broke
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2021-12-10 00:22:37 +01:00
Marcelina Kościelnicka
0b31cb598e dfflegalize: Add tests for aldff lowering. 2021-10-27 14:14:01 +02:00
Marcelina Kościelnicka
54c79af64f dfflegalize: Add tests targetting aldff. 2021-10-27 14:14:01 +02:00
Marcelina Kościelnicka
0a0df8d38c dfflegalize: Refactor, add aldff support. 2021-10-27 14:14:01 +02:00
Marcelina Kościelnicka
4e70c30775 FfData: some refactoring.
- FfData now keeps track of the module and underlying cell, if any (so
  calling emit on FfData created from a cell will replace the existing cell)
- FfData implementation is split off to its own .cc file for faster
  compilation
- the "flip FF data sense by inserting inverters in front and after"
  functionality that zinit uses is moved onto FfData class and beefed up
  to have dffsr support, to support more use cases
2021-10-07 04:24:06 +02:00
Eddie Hung
96b6410dcb
abc9: make re-entrant (#2993)
* Add testcase

* Cleanup some state at end of abc9

* Re-assign abc9_box_id from scratch

* Suppress delete unless prep_bypass did something
2021-09-09 10:06:31 -07:00
Eddie Hung
65316ec926
abc9: holes module to instantiate cells with NEW_ID (#2992)
* Add testcase

* holes module to instantiate cells with NEW_ID
2021-09-09 10:06:20 -07:00
Marcelina Kościelnicka
62d41d4639 opt_clean: Make the init attribute follow the FF's Q.
Previously, opt_clean would reconnect all ports (including FF Q ports)
to a "canonical" SigBit chosen by complex rules, but would leave the
init attribute on the old wire.  This change applies the same
canonicalization rules to the init attributes, ensuring that init moves
to wherever the Q port moved.

Part of another jab at #2920.
2021-08-22 15:38:29 +02:00
Marcelina Kościelnicka
b05b98521c Add tests for some common techmap files. 2021-02-24 01:07:34 +01:00
Xiretza
acd47bbd52
tests: Centralize test collection and Makefile generation 2020-09-21 15:07:02 +02:00
whitequark
9f0892159e flatten, techmap: don't canonicalize tpl driven bits via sigmap.
For connection `assign a = b;`, `sigmap(a)` returns `b`. This is
exactly the opposite of the desired canonicalization for driven bits.
Consider the following code:

    module foo(inout a, b);
      assign a = b;
    endmodule
    module bar(output c);
      foo f(c, 1'b0);
    endmodule

Before this commit, the inout ports would be swapped after flattening
(and cause a crash while attempting to drive a constant value).

This issue was introduced in 9f772eb9.

Fixes #2183.
2020-08-26 16:29:42 +00:00
clairexen
d9dd8bc748
Merge pull request #2347 from YosysHQ/mwk/techmap-shift-fixes
techmap/shift_shiftx: Remove the "shiftx2mux" special path.
2020-08-20 16:25:56 +02:00
clairexen
799076af24
Merge pull request #2333 from YosysHQ/mwk/peepopt-shiftmul-signed
peeopt.shiftmul: Add a signedness check.
2020-08-20 16:23:07 +02:00
clairexen
6a68b8ed54
Merge pull request #2328 from YosysHQ/mwk/opt_dff-cleanup
Remove passes redundant with opt_dff
2020-08-20 16:21:58 +02:00
Marcelina Kościelnicka
50d532f01c techmap/shift_shiftx: Remove the "shiftx2mux" special path.
Our techmap rules for $shift and $shiftx cells contained a special path
that aimed to decompose the shift LSB-first instead of MSB-first in
select cases that come up in pmux lowering.  This path was needlessly
overcomplicated and contained bugs.

Instead of doing that, just switch over the main path to iterate
LSB-first (except for the specially-handled MSB for signed shifts
and overflow handling).  This also makes the code consistent with
shl/shr/sshl/sshr cells, which are already decomposed LSB-first.

Fixes #2346.
2020-08-20 12:44:09 +02:00
Marcelina Kościelnicka
5693386a4e Remove now-redundant dff2dffs pass. 2020-08-07 13:21:34 +02:00
Marcelina Kościelnicka
c1ed1c28be peeopt.shiftmul: Add a signedness check.
Fixes #2332.
2020-08-05 21:01:20 +02:00
Marcelina Kościelnicka
b4a4cb081d techmap.CONSTMAP: Handle outputs before inputs.
Fixes #2321.
2020-08-05 12:28:18 +02:00
Marcelina Kościelnicka
18ad56ef41 Add dffunmap pass.
To be used with backends that cannot deal with fancy FF types (like blif
or smt).
2020-07-31 00:59:51 +02:00
Marcelina Kościelnicka
1c8483b7dd zinit: Refactor to use FfInitVals. 2020-07-24 11:22:31 +02:00
Marcelina Kościelnicka
abe4e9e607 clk2fflogic: Support all FF types. 2020-07-24 03:19:48 +02:00
Marcelina Kościelnicka
dc07ae9677 techmap: Add _TECHMAP_CELLNAME_ special parameter.
This parameter will resolve to the name of the cell being mapped.  The
first user of this parameter will be synth_intel_alm's Quartus output,
which requires a unique (and preferably descriptive) name passed as
a cell parameter for the memory cells.
2020-07-21 15:00:54 +02:00
Marcelina Kościelnicka
7ed9d18907 dfflibmap: Refactor to use dfflegalize internally. 2020-07-09 18:51:03 +02:00
Marcelina Kościelnicka
32d2cc8c28 clkbufmap: improve input pad handling.
- allow inserting only the input pad cell
- do not insert the usual buffer if the input pad already acts as a
  buffer
2020-07-09 18:48:01 +02:00
Marcelina Kościelnicka
03e28f7ab4 clk2fflogic: Consistently treat async control signals as negative hold.
This fixes some dfflegalize equivalence checks, and breaks others — and
I strongly suspect the others are due to bad support for multiple
async inputs in `proc` (in particular, lack of proper support for
dlatchsr and sketchy circuits on dffsr control inputs).
2020-07-09 18:12:47 +02:00
Marcelina Kościelnicka
e9c2c1b717 dfflegalize: Add special support for const-D latches.
Those can be created by `opt_dff` when optimizing `$adff` with const
clock, or with D == Q.  Make dfflegalize do the opposite transform
when such dlatches would be otherwise unimplementable.
2020-07-09 18:11:32 +02:00
Marcelina Kościelnicka
6b42819a37 dfflegalize: Add tests. 2020-07-01 01:57:15 +02:00
Marcelina Kościelnicka
88e7f90663 Update dff2dffe, dff2dffs, zinit to new FF types. 2020-06-23 18:24:53 +02:00
Eddie Hung
383fe4a4bc tests: zinit for new types 2020-04-14 13:08:37 -07:00
Marcelina Kościelnicka
7a36728b2f dffinit: Avoid setting init parameter to zero-length value.
Fixes #1704.
2020-04-14 19:52:19 +02:00
Eddie Hung
b75c5bf743 zinit: resolve one more comment by @mwkmwkmwk 2020-04-13 15:25:37 -07:00
Eddie Hung
c6afce7638 zinit: fix review comments from @mwkmwkmwk 2020-04-13 15:16:51 -07:00
Eddie Hung
091297b9ee tests: zinit on $adff 2020-04-13 14:29:44 -07:00