yosys.git
4 years agoClean up pseudo-private member usage in `passes/cmds/rename.cc`.
Alberto Gonzalez [Wed, 8 Apr 2020 07:22:10 +0000 (07:22 +0000)]
Clean up pseudo-private member usage in `passes/cmds/rename.cc`.

4 years agoMerge pull request #1928 from YosysHQ/eddie/design_delete
Eddie Hung [Thu, 16 Apr 2020 17:51:09 +0000 (10:51 -0700)]
Merge pull request #1928 from YosysHQ/eddie/design_delete

kernel: add design -delete option

4 years agoMerge pull request #1896 from boqwxp/read_stdin_repl
whitequark [Thu, 16 Apr 2020 17:18:29 +0000 (17:18 +0000)]
Merge pull request #1896 from boqwxp/read_stdin_repl

Frontend: allow reading file input from stdin, like a REPL heredoc mode

4 years agoMerge pull request #1797 from epfl-vlsc/firrtl_backend_fileinfo
Claire Wolf [Thu, 16 Apr 2020 16:50:43 +0000 (18:50 +0200)]
Merge pull request #1797 from epfl-vlsc/firrtl_backend_fileinfo

Keep file information when emitting firrtl

4 years agoecp5: Force SIGNED ports to be 1 bit
David Shah [Thu, 16 Apr 2020 15:38:19 +0000 (16:38 +0100)]
ecp5: Force SIGNED ports to be 1 bit

Signed-off-by: David Shah <dave@ds0.me>
4 years agoMerge pull request #1927 from YosysHQ/eddie/design_remove_assert
Eddie Hung [Thu, 16 Apr 2020 15:06:12 +0000 (08:06 -0700)]
Merge pull request #1927 from YosysHQ/eddie/design_remove_assert

kernel: Design::remove(RTLIL::Module *) to check refcount_modules_

4 years agotests: add design -delete tests
Eddie Hung [Tue, 14 Apr 2020 17:34:23 +0000 (10:34 -0700)]
tests: add design -delete tests

4 years agokernel: add design -delete option
Eddie Hung [Tue, 14 Apr 2020 17:33:55 +0000 (10:33 -0700)]
kernel: add design -delete option

4 years agoMerge pull request #1915 from boqwxp/dict_move_semantics
whitequark [Thu, 16 Apr 2020 13:29:13 +0000 (13:29 +0000)]
Merge pull request #1915 from boqwxp/dict_move_semantics

kernel: Add `dict` support for rvalue references and C++11 move semantics.

4 years agoMerge pull request #1900 from Xiretza/suppress-makefile-echo
whitequark [Thu, 16 Apr 2020 13:28:34 +0000 (13:28 +0000)]
Merge pull request #1900 from Xiretza/suppress-makefile-echo

Suppress output of Makefile.conf when printing source versions

4 years agoMerge pull request #1937 from hzeller/consexpr-opportunity
whitequark [Thu, 16 Apr 2020 13:28:03 +0000 (13:28 +0000)]
Merge pull request #1937 from hzeller/consexpr-opportunity

Use static constexpr instead of static const where possible.

4 years agoMerge pull request #1943 from YosysHQ/dave/fix-1919
David Shah [Thu, 16 Apr 2020 12:48:20 +0000 (13:48 +0100)]
Merge pull request #1943 from YosysHQ/dave/fix-1919

ast: Fix handling of identifiers in the global scope

4 years agoopt_expr: Fix X and CO outputs for $alu identity-mapping rules.
Marcelina Kościelnicka [Tue, 14 Apr 2020 16:59:49 +0000 (18:59 +0200)]
opt_expr: Fix X and CO outputs for $alu identity-mapping rules.

4 years agoast: Fix handling of identifiers in the global scope
David Shah [Thu, 16 Apr 2020 09:27:59 +0000 (10:27 +0100)]
ast: Fix handling of identifiers in the global scope

Signed-off-by: David Shah <dave@ds0.me>
4 years agoRename overloaded `insert()` to `emplace()` and add overloaded versions for all possi...
Alberto Gonzalez [Wed, 15 Apr 2020 16:22:22 +0000 (16:22 +0000)]
Rename overloaded `insert()` to `emplace()` and add overloaded versions for all possible lvalue/rvalue combinationsfor its arguments.

4 years agoUse script-style heredoc syntax for REPL heredocs.
Alberto Gonzalez [Fri, 10 Apr 2020 20:06:12 +0000 (20:06 +0000)]
Use script-style heredoc syntax for REPL heredocs.

4 years agoAllow reading file input from stdin, improving REPL experience.
Alberto Gonzalez [Fri, 10 Apr 2020 19:30:22 +0000 (19:30 +0000)]
Allow reading file input from stdin, improving REPL experience.

4 years agoMerge pull request #1894 from YosysHQ/mingw_fix
Miodrag Milanović [Wed, 15 Apr 2020 15:43:31 +0000 (17:43 +0200)]
Merge pull request #1894 from YosysHQ/mingw_fix

Fix compile for mingw

4 years agoMerge pull request #1916 from YosysHQ/eddie/kernel_makeblackbox
Eddie Hung [Wed, 15 Apr 2020 15:42:39 +0000 (08:42 -0700)]
Merge pull request #1916 from YosysHQ/eddie/kernel_makeblackbox

kernel: Module::makeblackbox() to clear connections too

4 years agoMerge pull request #1933 from YosysHQ/eddie/zinit_more
Eddie Hung [Wed, 15 Apr 2020 15:36:25 +0000 (08:36 -0700)]
Merge pull request #1933 from YosysHQ/eddie/zinit_more

zinit: handle $__DFFS?E?_[NP][NP][01] too

4 years agoMerge pull request #1830 from boqwxp/qbfsat
N. Engelhardt [Wed, 15 Apr 2020 15:33:50 +0000 (17:33 +0200)]
Merge pull request #1830 from boqwxp/qbfsat

Add `qbfsat` command to integrate exists-forall solving and specialization

4 years agoFix the truth table for $_SR_* cells.
Marcelina Kościelnicka [Sat, 11 Apr 2020 14:03:19 +0000 (16:03 +0200)]
Fix the truth table for $_SR_* cells.

This brings the documented behavior for these cells in line with
$_DFFSR_* and $_DLATCHSR_*, which is that R has priority over S.
The models were already reflecting that behavior.

Also get rid of sim-synth mismatch in the models while we're at it.

4 years agoMerge pull request #1897 from YosysHQ/dave/bram-rejection-fix
David Shah [Wed, 15 Apr 2020 15:10:38 +0000 (16:10 +0100)]
Merge pull request #1897 from YosysHQ/dave/bram-rejection-fix

memory_bram: Fix ignorance of valid, matched rules

4 years agoFix compile for mingw
Miodrag Milanovic [Wed, 15 Apr 2020 14:38:09 +0000 (16:38 +0200)]
Fix compile for mingw

4 years agoGet rid of dffsr2dff.
Marcelina Kościelnicka [Sat, 11 Apr 2020 16:36:51 +0000 (18:36 +0200)]
Get rid of dffsr2dff.

This pass is a proper subset of opt_rmdff, which is called by opt, which
is called by every synth flow in the coarse part.  Thus, it never
actually does anything and can be safely removed.

4 years agoopt_clean: Add missing assignments to opt.did_something.
Marcelina Kościelnicka [Sat, 11 Apr 2020 14:59:10 +0000 (16:59 +0200)]
opt_clean: Add missing assignments to opt.did_something.

4 years agoMerge pull request #1918 from whitequark/simplify-improve_enum
whitequark [Wed, 15 Apr 2020 14:16:50 +0000 (14:16 +0000)]
Merge pull request #1918 from whitequark/simplify-improve_enum

ast/simplify: improve enum handling

4 years agosynth_intel_alm: VQM support
Dan Ravensloft [Wed, 15 Apr 2020 13:28:35 +0000 (14:28 +0100)]
synth_intel_alm: VQM support

4 years agoast/simplify: improve enum handling.
whitequark [Tue, 14 Apr 2020 03:25:22 +0000 (03:25 +0000)]
ast/simplify: improve enum handling.

Before this commit, enum values were serialized as attributes of form
  \enum_<width>_<value>
where <value> was a decimal signed integer.

This has multiple drawbacks:
  * Enums with large values would be hard to process for downstream
    tooling that cannot parse arbitrary precision decimals. (In fact
    Yosys also did not correctly process enums with large values,
    and would overflow `int`.)
  * Enum value attributes were not confined to their own namespace,
    making it harder for downstream tooling to enumerate all such
    attributes, as opposed to looking up any specific value.
  * Enum values could not include x or z, which are explicitly
    permitted in the SystemVerilog standard.

After this commit, enum values are serialized as attributes of form
  \enum_value_<value>
where <value> is a bit sequence of the appropriate width.

4 years agosetundef: Improve error messages.
Marcelina Kościelnicka [Wed, 15 Apr 2020 14:12:34 +0000 (16:12 +0200)]
setundef: Improve error messages.

Fixes #1092.

4 years agojson: Update format documentation.
Marcelina Kościelnicka [Tue, 14 Apr 2020 20:57:37 +0000 (22:57 +0200)]
json: Update format documentation.

Fixes #1693.

4 years agoMerge pull request #1930 from YosysHQ/claire/fix1876
Claire Wolf [Wed, 15 Apr 2020 14:01:19 +0000 (16:01 +0200)]
Merge pull request #1930 from YosysHQ/claire/fix1876

Fix handling of ternary with constant condition

4 years agosynth_intel_alm: alternative synthesis for Intel FPGAs
Dan Ravensloft [Tue, 19 Nov 2019 10:19:00 +0000 (10:19 +0000)]
synth_intel_alm: alternative synthesis for Intel FPGAs

By operating at a layer of abstraction over the rather clumsy Intel primitives,
we can avoid special hacks like `dffinit -highlow` in favour of simple techmapping.

This also makes the primitives much easier to manipulate, and more descriptive
(no more cyclonev_lcell_comb to mean anything from a LUT2 to a LUT6).

4 years agoabc9_ops: Add a check ensuring that connected port actually exists.
Marcelina Kościelnicka [Tue, 14 Apr 2020 13:44:17 +0000 (15:44 +0200)]
abc9_ops: Add a check ensuring that connected port actually exists.

4 years agoMerge pull request #1932 from YosysHQ/dave/cxxrtl-unclocked-read
whitequark [Wed, 15 Apr 2020 05:34:29 +0000 (05:34 +0000)]
Merge pull request #1932 from YosysHQ/dave/cxxrtl-unclocked-read

cxxrtl: Fix handling of unclocked memory read ports

4 years agoUse static constexpr instead of static const where possible.
Henner Zeller [Tue, 14 Apr 2020 21:19:38 +0000 (14:19 -0700)]
Use static constexpr instead of static const where possible.

In particular inside class declarations, a static const
assignment is technically not a definition, while constexpr is.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
4 years agotests: zinit for new types
Eddie Hung [Tue, 14 Apr 2020 20:08:37 +0000 (13:08 -0700)]
tests: zinit for new types

4 years agozinit: handle $__DFFS?E?_[NP][NP][01] too
Eddie Hung [Tue, 14 Apr 2020 20:08:23 +0000 (13:08 -0700)]
zinit: handle $__DFFS?E?_[NP][NP][01] too

4 years agoopt_expr: Add more $alu optimizations.
Marcelina Kościelnicka [Mon, 13 Apr 2020 17:29:39 +0000 (19:29 +0200)]
opt_expr: Add more $alu optimizations.

Detect the places in the $alu where the carry bit is constant (due to
const A[i] == B[i] ^ BI) and split it into smaller $alu at these points.

Also, make the existing const-carry detection for low bits more generic
(now handles cases where both BI and CI are constant, but not equal to
one another).

Fixes #1912.

4 years agocxxrtl: Fix handling of unclocked memory read ports
David Shah [Tue, 14 Apr 2020 19:39:13 +0000 (20:39 +0100)]
cxxrtl: Fix handling of unclocked memory read ports

Signed-off-by: David Shah <dave@ds0.me>
4 years agotests: add testcases from #1876
Eddie Hung [Tue, 14 Apr 2020 19:39:10 +0000 (12:39 -0700)]
tests: add testcases from #1876

4 years agoFix 5bba9c3, closes #1876
Claire Wolf [Tue, 14 Apr 2020 19:05:07 +0000 (21:05 +0200)]
Fix 5bba9c3, closes #1876

Signed-off-by: Claire Wolf <claire@symbioticeda.com>
4 years agodffinit: Avoid setting init parameter to zero-length value.
Marcelina Kościelnicka [Tue, 14 Apr 2020 14:33:09 +0000 (16:33 +0200)]
dffinit: Avoid setting init parameter to zero-length value.

Fixes #1704.

4 years agodesign: do not delete when iterating over Design::modules() directly
Eddie Hung [Tue, 14 Apr 2020 17:43:05 +0000 (10:43 -0700)]
design: do not delete when iterating over Design::modules() directly

4 years agokernel: Design::remove(RTLIL::Module *) to check refcount_modules_
Eddie Hung [Tue, 14 Apr 2020 16:31:06 +0000 (09:31 -0700)]
kernel: Design::remove(RTLIL::Module *) to check refcount_modules_

4 years agoabc9_exe: verify -> &verify -s
Eddie Hung [Tue, 14 Apr 2020 14:54:11 +0000 (07:54 -0700)]
abc9_exe: verify -> &verify -s

4 years agotechmap: fix error message
Eddie Hung [Thu, 9 Apr 2020 21:31:59 +0000 (14:31 -0700)]
techmap: fix error message

4 years agoMerge pull request #1922 from whitequark/write_cxxrtl-disconnected-outputs
whitequark [Tue, 14 Apr 2020 14:37:48 +0000 (14:37 +0000)]
Merge pull request #1922 from whitequark/write_cxxrtl-disconnected-outputs

write_cxxrtl: ignore disconnected module ports

4 years agoMerge pull request #1921 from whitequark/write_cxxrtl-separate-compilation
whitequark [Tue, 14 Apr 2020 13:53:52 +0000 (13:53 +0000)]
Merge pull request #1921 from whitequark/write_cxxrtl-separate-compilation

write_cxxrtl: enable separate compilation

4 years agoMerge pull request #1917 from YosysHQ/eddie/abc9_delay_check
Eddie Hung [Tue, 14 Apr 2020 13:01:55 +0000 (06:01 -0700)]
Merge pull request #1917 from YosysHQ/eddie/abc9_delay_check

xaiger: add check for $__ABC9_DELAY model

4 years agoMerge pull request #1879 from jjj11x/jjj11x/package_decl
whitequark [Tue, 14 Apr 2020 12:40:00 +0000 (12:40 +0000)]
Merge pull request #1879 from jjj11x/jjj11x/package_decl

support using previously declared types/localparams/parameters in package

4 years agoMerge pull request #1880 from jjj11x/duplicate_enum
whitequark [Tue, 14 Apr 2020 12:39:28 +0000 (12:39 +0000)]
Merge pull request #1880 from jjj11x/duplicate_enum

duplicated enum item names should result in an error

4 years agowrite_cxxrtl: ignore disconnected module ports.
whitequark [Tue, 14 Apr 2020 12:34:35 +0000 (12:34 +0000)]
write_cxxrtl: ignore disconnected module ports.

E.g. port `q` in `submod x(.p(p), .q());`.

Fixes #1920.

4 years agowrite_verilog: fix precondition check.
whitequark [Tue, 14 Apr 2020 12:12:50 +0000 (12:12 +0000)]
write_verilog: fix precondition check.

4 years agowrite_cxxrtl: enable separate compilation.
whitequark [Tue, 14 Apr 2020 12:07:58 +0000 (12:07 +0000)]
write_cxxrtl: enable separate compilation.

This commit makes it possible to use several cxxrtl-generated files
in one application, as well as compiling cxxrtl-generated code as
a separate compilation unit.

4 years agokernel: Module::makeblackbox() to clear connections too
Eddie Hung [Tue, 14 Apr 2020 03:37:22 +0000 (20:37 -0700)]
kernel: Module::makeblackbox() to clear connections too

4 years agoxaiger: add check for $__ABC9_DELAY model
Eddie Hung [Thu, 26 Mar 2020 16:22:27 +0000 (09:22 -0700)]
xaiger: add check for $__ABC9_DELAY model

4 years agoMerge pull request #1568 from YosysHQ/eddie/fix_zinit
Eddie Hung [Tue, 14 Apr 2020 01:33:42 +0000 (18:33 -0700)]
Merge pull request #1568 from YosysHQ/eddie/fix_zinit

zinit: fixes for $_DFF_[NP][NP][01]_and $adff cells with init = 1'b1

4 years agoAdd `dict` support for rvalue references and C++11 move semantics.
Alberto Gonzalez [Mon, 13 Apr 2020 19:59:29 +0000 (19:59 +0000)]
Add `dict` support for rvalue references and C++11 move semantics.

4 years agozinit: resolve one more comment by @mwkmwkmwk
Eddie Hung [Mon, 13 Apr 2020 22:25:37 +0000 (15:25 -0700)]
zinit: resolve one more comment by @mwkmwkmwk

4 years agozinit: fix review comments from @mwkmwkmwk
Eddie Hung [Mon, 13 Apr 2020 22:16:51 +0000 (15:16 -0700)]
zinit: fix review comments from @mwkmwkmwk

4 years agotests: zinit on $adff
Eddie Hung [Mon, 13 Apr 2020 21:29:44 +0000 (14:29 -0700)]
tests: zinit on $adff

4 years agozinit: operate on $adff, erase (* init *) entries on consumption
Eddie Hung [Mon, 13 Apr 2020 21:28:53 +0000 (14:28 -0700)]
zinit: operate on $adff, erase (* init *) entries on consumption

4 years agoFix S/R comment; thanks @mwkmwkmwk
Eddie Hung [Wed, 11 Dec 2019 22:31:23 +0000 (14:31 -0800)]
Fix S/R comment; thanks @mwkmwkmwk

4 years agozinit to transform set/reset value of $_DFF_[NP][NP][01]_
Eddie Hung [Wed, 11 Dec 2019 20:17:01 +0000 (12:17 -0800)]
zinit to transform set/reset value of $_DFF_[NP][NP][01]_

4 years agoAdd testcase for $_DFF_[NP][NP][01]_
Eddie Hung [Wed, 11 Dec 2019 20:10:30 +0000 (12:10 -0800)]
Add testcase for $_DFF_[NP][NP][01]_

4 years agoSupress error for unhandled \init if whole module selected
Eddie Hung [Wed, 11 Dec 2019 19:49:13 +0000 (11:49 -0800)]
Supress error for unhandled \init if whole module selected

4 years agoopt_expr: Optimize multiplications with low 0 bits in operands.
Marcelina Kościelnicka [Sun, 12 Apr 2020 20:37:44 +0000 (22:37 +0200)]
opt_expr: Optimize multiplications with low 0 bits in operands.

Fixes #1500.

4 years agoMerge pull request #1910 from boqwxp/cleanup_ilang_parser
whitequark [Mon, 13 Apr 2020 08:40:45 +0000 (08:40 +0000)]
Merge pull request #1910 from boqwxp/cleanup_ilang_parser

Clean up pseudo-private member usage in `frontends/ilang/ilang_parser.y`.

4 years agoClean up pseudo-private member usage in `frontends/ilang/ilang_parser.y`.
Alberto Gonzalez [Mon, 13 Apr 2020 04:22:00 +0000 (04:22 +0000)]
Clean up pseudo-private member usage in `frontends/ilang/ilang_parser.y`.

4 years agoAdd .gitignore to tests/select/
Xiretza [Sat, 11 Apr 2020 09:49:01 +0000 (11:49 +0200)]
Add .gitignore to tests/select/

4 years agoMerge pull request #1907 from YosysHQ/dave/fix-1906
David Shah [Sun, 12 Apr 2020 20:08:02 +0000 (21:08 +0100)]
Merge pull request #1907 from YosysHQ/dave/fix-1906

verilog: Fix write to deleted object

4 years agoverilog: Fix write to deleted object
David Shah [Sun, 12 Apr 2020 17:49:09 +0000 (18:49 +0100)]
verilog: Fix write to deleted object

Signed-off-by: David Shah <dave@ds0.me>
4 years agoSuppress output of Makefile.conf when printing source versions
Xiretza [Sat, 11 Apr 2020 09:42:30 +0000 (11:42 +0200)]
Suppress output of Makefile.conf when printing source versions

The make targets echo-yosys-ver, echo-git-ver and echo-abc-rev can be
used to programmatically extract contents of make variables for external
scripts. Unfortunately, when a Makefile.conf exists, its contents would
also be echoed, making the output almost unusable. This patch
selectively disables this functionality for these special targets.

4 years agoUse `pool` instead of `std::set`.
Alberto Gonzalez [Sat, 11 Apr 2020 09:41:09 +0000 (09:41 +0000)]
Use `pool` instead of `std::set`.

4 years agoUse `dict` instead of `std::map`.
Alberto Gonzalez [Sat, 11 Apr 2020 06:53:59 +0000 (06:53 +0000)]
Use `dict` instead of `std::map`.

4 years agomemory_bram: Fix ignorance of valid, matched rules
David Shah [Fri, 10 Apr 2020 20:48:04 +0000 (21:48 +0100)]
memory_bram: Fix ignorance of valid, matched rules

Signed-off-by: David Shah <dave@ds0.me>
4 years agoMerge pull request #1603 from whitequark/ice40-ram_style
whitequark [Fri, 10 Apr 2020 14:51:01 +0000 (14:51 +0000)]
Merge pull request #1603 from whitequark/ice40-ram_style

ice40/ecp5: add support for both 1364.1 and Synplify/LSE RAM/ROM attributes

4 years agoMerge pull request #1893 from mmicko/program_prefix
Miodrag Milanović [Fri, 10 Apr 2020 14:33:01 +0000 (16:33 +0200)]
Merge pull request #1893 from mmicko/program_prefix

Support custom PROGRAM_PREFIX

4 years agoKeep libyosys name same as befire, but put it in directory
Miodrag Milanovic [Fri, 10 Apr 2020 13:02:48 +0000 (15:02 +0200)]
Keep libyosys name same as befire, but put it in directory

4 years agoSupport custom PROGRAM_PREFIX
Miodrag Milanovic [Fri, 10 Apr 2020 08:38:40 +0000 (10:38 +0200)]
Support custom PROGRAM_PREFIX

4 years agoMerge pull request #1562 from whitequark/write_cxxrtl
whitequark [Fri, 10 Apr 2020 01:24:31 +0000 (01:24 +0000)]
Merge pull request #1562 from whitequark/write_cxxrtl

write_cxxrtl: new backend

4 years agoMerge pull request #1858 from YosysHQ/eddie/fix1856
Eddie Hung [Thu, 9 Apr 2020 21:23:47 +0000 (14:23 -0700)]
Merge pull request #1858 from YosysHQ/eddie/fix1856

kernel: include "kernel/constids.inc"

4 years agoFix indentation
Sahand Kashani [Thu, 9 Apr 2020 19:16:02 +0000 (21:16 +0200)]
Fix indentation

4 years agotests: add a quick plugin test
Eddie Hung [Thu, 9 Apr 2020 16:45:20 +0000 (09:45 -0700)]
tests: add a quick plugin test

4 years agokernel: include "kernel/constids.inc" instead of "constids.inc"
Eddie Hung [Thu, 9 Apr 2020 16:14:03 +0000 (09:14 -0700)]
kernel: include "kernel/constids.inc" instead of "constids.inc"

4 years ago[NFCI] Deduplicate builtin FF cell types list
Marcelina Kościelnicka [Wed, 8 Apr 2020 15:36:12 +0000 (17:36 +0200)]
[NFCI] Deduplicate builtin FF cell types list

A few passes included the same list of FF cell types.  Make it a global
const instead.

The zinit pass also seems to include a list like that, but given that
it seems to be completely broken at the time (see #1568 discussion),
I'm going to pretend I didn't see that.

4 years agoMerge pull request #1890 from boqwxp/cleanup_memory_collect
N. Engelhardt [Thu, 9 Apr 2020 12:01:29 +0000 (14:01 +0200)]
Merge pull request #1890 from boqwxp/cleanup_memory_collect

Clean up `passes/memory/memory_collect.cc`.

4 years agoMerge pull request #1889 from boqwxp/cleanup_memory_unpack
N. Engelhardt [Thu, 9 Apr 2020 12:00:44 +0000 (14:00 +0200)]
Merge pull request #1889 from boqwxp/cleanup_memory_unpack

Clean up `passes/memory/memory_unpack.cc`.

4 years agoMerge pull request #1887 from boqwxp/cleanup_hilomap
N. Engelhardt [Thu, 9 Apr 2020 10:09:44 +0000 (12:09 +0200)]
Merge pull request #1887 from boqwxp/cleanup_hilomap

Clean up `passes/techmap/hilomap.cc`.

4 years agoClean up `passes/sat/qbfsat.cc`.
Alberto Gonzalez [Thu, 9 Apr 2020 07:40:03 +0000 (07:40 +0000)]
Clean up `passes/sat/qbfsat.cc`.

Makes various cosmetic fixes, removes superfluous `hasPort()` check, and uses `emplace_back()` instead of `push_back()`.

4 years agoClean up `passes/memory/memory_collect.cc`.
Alberto Gonzalez [Thu, 9 Apr 2020 05:43:05 +0000 (05:43 +0000)]
Clean up `passes/memory/memory_collect.cc`.

4 years agoClean up `passes/memory/memory_unpack.cc`.
Alberto Gonzalez [Thu, 9 Apr 2020 05:38:36 +0000 (05:38 +0000)]
Clean up `passes/memory/memory_unpack.cc`.

4 years agoClean up `passes/techmap/hilomap.cc`.
Alberto Gonzalez [Thu, 9 Apr 2020 05:24:37 +0000 (05:24 +0000)]
Clean up `passes/techmap/hilomap.cc`.

4 years agowrite_cxxrtl: add basic documentation.
whitequark [Sun, 5 Apr 2020 10:03:23 +0000 (10:03 +0000)]
write_cxxrtl: add basic documentation.

4 years agowrite_cxxrtl: add support for $dlatch and $dlatchsr cells.
whitequark [Sun, 5 Apr 2020 09:27:55 +0000 (09:27 +0000)]
write_cxxrtl: add support for $dlatch and $dlatchsr cells.

Also, fix codegen for $dffe and $adff.

4 years agowrite_cxxrtl: add support for $sr cell.
whitequark [Sun, 5 Apr 2020 09:13:13 +0000 (09:13 +0000)]
write_cxxrtl: add support for $sr cell.

Also, fix the semantics of SET/CLR inputs of the $dffsr cell, and
fix the scheduling of async FF cells to consider ARST/SET/CLR->Q
as a forward combinatorial arc.

4 years agowrite_cxxrtl: add support for $slice and $concat cells.
whitequark [Sun, 5 Apr 2020 07:46:42 +0000 (07:46 +0000)]
write_cxxrtl: add support for $slice and $concat cells.

4 years agowrite_cxxrtl: improve writable memory handling.
whitequark [Sun, 5 Apr 2020 02:06:26 +0000 (02:06 +0000)]
write_cxxrtl: improve writable memory handling.

This commit reduces space and time overhead for writable memories
to O(write port count) in both cases; implements handling for write
port priorities; and simplifies runtime representation of memories.

4 years agowrite_cxxrtl: add support for hierarchical designs.
whitequark [Fri, 3 Apr 2020 16:07:43 +0000 (16:07 +0000)]
write_cxxrtl: add support for hierarchical designs.

Hierarchical design simulations are generally much slower, but this
comes with a major increase in flexibility:
 1. Since the `flatten` pass currently does not support flattening
    of designs with processes, this is the only way to simulate such
    designs with cxxrtl.
 2. Support for hierarchy paves way for simulation black boxes,
    which are necessary for e.g. replacing PHYs with C++ code that
    integrates with the host system.