3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 09:35:32 +00:00
Commit graph

609 commits

Author SHA1 Message Date
whitequark
00e7dec7f5 Replace "ILANG" with "RTLIL" everywhere.
The only difference between "RTLIL" and "ILANG" is that the latter is
the text representation of the former, as opposed to the in-memory
graph representation. This distinction serves no purpose but confuses
people: it is not obvious that the ILANG backend writes RTLIL graphs.

Passes `write_ilang` and `read_ilang` are provided as aliases to
`write_rtlil` and `read_rtlil` for compatibility.
2020-08-26 17:29:32 +00:00
Alberto Gonzalez
bbfa2d65fa
glift: Use ID() rather than string literals. 2020-07-01 19:51:48 +00:00
Alberto Gonzalez
eda1af73c4
glift: Use worker pattern. 2020-07-01 19:51:47 +00:00
Alberto Gonzalez
3eb2593876
glift: Add support for $_NAND_ and $_NOR_ cells. 2020-07-01 19:51:47 +00:00
Alberto Gonzalez
8cb1a86c23
glift: Add support for $_MUX_ and $_NMUX_ cells. 2020-07-01 19:51:47 +00:00
Alberto Gonzalez
23defc6fe9
glift: Add support for $_XOR_ and $_XNOR_ cells. 2020-07-01 19:51:47 +00:00
Alberto Gonzalez
209a123b97
glift: Add initial hierarchy support. 2020-07-01 19:51:47 +00:00
Alberto Gonzalez
20ad371724
glift: Replace YS_OVERRIDE with override. 2020-07-01 19:51:47 +00:00
Alberto Gonzalez
91c20fca72
glift: Add -simple-cost-model option
Rather than assigning specific weights to specific versions of taint tracking logic and summing the weights of all GLIFT cells, sum the following values for each GLIFT cell:
  - 0 if the associated hole/$anyconst cell value is non-zero, i.e. reduced-precision taint tracking logic is chosen at this cell
  - 1 if the associated hole/$anyconst cell value is zero, i.e. the full-precision taint tracking logic is chosen at this cell

This simplified cost modeling reduces the potential for the QBF-SAT solver to minimize taint tracking logic area but significantly simplifies the QBF-SAT problem.
2020-07-01 19:51:47 +00:00
Alberto Gonzalez
26bd686259
glift: Add -instrument-more option to add 4 more versions of taint tracking logic. Also refactor a bit and update help text. 2020-07-01 19:51:46 +00:00
Alberto Gonzalez
bc207d5426
glift: Change command names to better represent their functions. 2020-07-01 19:51:46 +00:00
Alberto Gonzalez
ddfb9f08e2
glift: Add -create-imprecise command, rename other commands, and re-work the help text. 2020-07-01 19:51:46 +00:00
Alberto Gonzalez
72cebef279
glift: Add replacement scoring and area minimization option. 2020-07-01 19:51:46 +00:00
Alberto Gonzalez
c36440a7ee
glift: Remove outputs by default; add -keep-outputs option; properly reset internal state between calls. 2020-07-01 19:51:46 +00:00
Alberto Gonzalez
19dafcd4f1
glift: Initial implementation of the -sketchify option. 2020-07-01 19:51:46 +00:00
Alberto Gonzalez
09848b3b9f
glift: Initial implementation of GLIFT model construction. 2020-07-01 19:51:45 +00:00
Alberto Gonzalez
5f45fe51ea
glift: Add skeleton for glift command. 2020-07-01 19:51:45 +00:00
Marcelina Kościelnicka
b0bee396a8 Add new builtin FF types
The new types include:

- FFs with async reset and enable (`$adffe`, `$_DFFE_[NP][NP][01][NP]_`)
- FFs with sync reset (`$sdff`, `$_SDFF_[NP][NP][01]_`)
- FFs with sync reset and enable, reset priority (`$sdffs`, `$_SDFFE_[NP][NP][01][NP]_`)
- FFs with sync reset and enable, enable priority (`$sdffce`, `$_SDFFCE_[NP][NP][01][NP]_`)
- FFs with async reset, set, and enable (`$dffsre`, `$_DFFSRE_[NP][NP][NP][NP]_`)
- latches with reset or set (`$adlatch`, `$_DLATCH_[NP][NP][01]_`)

The new FF types are not actually used anywhere yet (this is left
for future commits).
2020-06-23 15:40:02 +02:00
whitequark
7191dd16f9 Use C++11 final/override keywords. 2020-06-18 23:34:52 +00:00
Alberto Gonzalez
f5d7cd60f5
splitnets: Clean up pseudo-private member usage 2020-06-13 05:47:55 +00:00
Alberto Gonzalez
b70de98bd1
splitnets: Slightly improve efficiency by avoiding some unnecessary lookups 2020-06-13 05:26:30 +00:00
whitequark
2139a5c21a splitnets: propagate (*hdlname*) and disambiguate via start_offset.
This allows reliably coalescing the split wires later.
2020-06-10 19:59:08 +00:00
clairexen
369dcb4e82
Merge pull request #2085 from rswarbrick/select
Silence warning in select.cc and pass some more args by ref
2020-06-08 15:55:52 +02:00
Eddie Hung
fe273faad1
Merge pull request #2081 from YosysHQ/eddie/blackbox_ast
blackbox: use Module::makeblackbox() method
2020-05-30 08:59:20 -07:00
Xiretza
edd8ff2c07
Add flooring division operator
The $div and $mod cells use truncating division semantics (rounding
towards 0), as defined by e.g. Verilog. Another rounding mode, flooring
(rounding towards negative infinity), can be used in e.g. VHDL. The
new $divfloor cell provides this flooring division.

This commit also fixes the handling of $div in opt_expr, which was
previously optimized as if it was $divfloor.
2020-05-28 22:59:04 +02:00
Xiretza
17163cf43a
Add flooring modulo operator
The $div and $mod cells use truncating division semantics (rounding
towards 0), as defined by e.g. Verilog. Another rounding mode, flooring
(rounding towards negative infinity), can be used in e.g. VHDL. The
new $modfloor cell provides this flooring modulo (also known as "remainder"
in several languages, but this name is ambiguous).

This commit also fixes the handling of $mod in opt_expr, which was
previously optimized as if it was $modfloor.
2020-05-28 22:59:03 +02:00
Alberto Gonzalez
5896ffd56f
printattrs: Simplify get_indent_str().
Co-Authored-By: Xiretza <xiretza@xiretza.xyz>
2020-05-28 05:34:28 +00:00
Alberto Gonzalez
f671c99cb8
printattrs: Refactor indentation string building for clarity.
Co-Authored-By: whitequark <whitequark@whitequark.org>
2020-05-27 23:15:07 +00:00
Rupert Swarbrick
d681c9df85 Pass some more args by reference in select.cc
Before this patch, the code passed around std::string objects by
value. It's probably not a hot-spot, but it can't hurt to avoid the
copying.

Removing the copy and clean-up code means the resulting code is ~6.1kb
smaller when compiled with GCC 9.3 and standard settings.
2020-05-27 09:42:23 +01:00
Rupert Swarbrick
061d1f0c07 Minor optimisations in select.cc's match_ids function
- Pass a string argument by reference

  - Avoid multiple calls to IdString::str and IdString::c_str

  - Avoid combining checks for size > 0 and first char (C strings are
    null terminated, so foo[0] != '\0' implies that foo has positive
    length)
2020-05-27 09:36:33 +01:00
Rupert Swarbrick
0d9beb5b2e Silence warning in select.cc
With GCC 9.3, at least, compiling select.cc spits out a warning about
an implausible bound being passed to strncmp. This comes from inlining
IdString::compare(): it turns out that passing std::string::npos as a
bound to strncmp triggers it.

This patch replaces the compare call with a memcmp with the same
effect. The repeated calls to IdString::c_str are slightly
inefficient, but I'll address that in a follow-up commit.
2020-05-27 09:34:15 +01:00
Alberto Gonzalez
e50e4ee285
printattrs: Use flags to pretty-print the RTLIL::Const appropriately.
Co-Authored-By: whitequark <whitequark@whitequark.org>
2020-05-27 08:00:00 +00:00
Alberto Gonzalez
b8365547e9
misc: Add printattrs command. 2020-05-27 08:00:00 +00:00
Eddie Hung
721283ac2a blackbox: re-use existing Module::makeblackbox() method 2020-05-25 10:53:49 -07:00
Alberto Gonzalez
8297afe925
log: Use dict instead of std::vector<std::pair> for log_expect_{error, warning, log} to better express the intent that each element is unique. 2020-05-15 00:55:32 +00:00
Eddie Hung
425867d175 logger: clean up doc 2020-05-14 10:38:31 -07:00
Eddie Hung
65395168a0 logger: fix for multiple calls with same pattern 2020-05-14 10:32:07 -07:00
whitequark
b43c282e4e Add WASI platform support.
This includes the following significant changes:
  * Patching ezsat and minisat to disable resource limiting code
    on WASM/WASI, since the POSIX functions they use are unavailable.
  * Adding a new definition, YOSYS_DISABLE_SPAWN, present if platform
    does not support spawning subprocesses (i.e. Emscripten or WASI).
    This definition hides the definition of `run_command()`.
  * Adding a new Makefile flag, DISABLE_SPAWN, present in the same
    condition. This flag disables all passes that require spawning
    subprocesses for their function.
2020-04-30 18:56:25 +00:00
Eddie Hung
56dd036b97 bugpoint: improve messaging 2020-04-24 13:41:19 -07:00
Eddie Hung
e602184856 bugpoint: (* keep *) to (* bugpoint_keep *); also apply to modules/cells 2020-04-24 13:26:04 -07:00
Eddie Hung
4bfe6ebea9 bugpoint: skip ports with (* keep *) on; add header 2020-04-24 11:17:09 -07:00
Eddie Hung
bf021a0e1f bugpoint: improve help text 2020-04-23 12:16:55 -07:00
Eddie Hung
fa9df06c9d
Merge pull request #1949 from YosysHQ/eddie/select_blackbox
select: do not select inside black-/white- boxes unless '=' prefix used
2020-04-22 15:35:05 -07:00
Claire Wolf
beb9e4b299
Update passes/cmds/select.cc
Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
2020-04-22 21:31:32 +02:00
Eddie Hung
eaa5a3e786 select: do not select black/white boxes by default, '=' prefix to do so 2020-04-22 10:15:56 -07:00
Eddie Hung
28623f19ee
Merge pull request #1950 from YosysHQ/eddie/design_import
design: -import to not count black/white-boxes as candidates for top
2020-04-22 09:32:13 -07:00
Marcelina Kościelnicka
cd82afb740 bugpoint: Don't remove modules or cells while iterating over them.
Reported by @ZirconiumX.
2020-04-22 00:09:01 +02:00
Claire Wolf
d834cc7afb Add '=' selection pattern prefix for non-blackbox only patterns
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
2020-04-21 14:23:24 +02:00
whitequark
f2064c8131
Merge pull request #1888 from boqwxp/cleanup_scatter
Clean up `passes/cmds/scatter.cc`.
2020-04-17 02:21:23 +00:00
whitequark
5c428996a9
Merge pull request #1882 from boqwxp/cleanup_rename
Clean up pseudo-private member usage in `passes/cmds/rename.cc`.
2020-04-17 02:20:54 +00:00