Commit Graph

370 Commits

Author SHA1 Message Date
Alberto Gonzalez a0416fe167
Rename `-duplicate` to `-push-copy`.
Co-Authored-By: whitequark <whitequark@whitequark.org>
2020-04-04 21:26:11 +00:00
Alberto Gonzalez 409e2ac09d
Add `-duplicate` option to the `design` command. 2020-04-03 16:46:35 +00:00
Eddie Hung 0d878ca256
Merge pull request #1832 from boqwxp/cleanup_passes_cmds_design
Clean up pseudo-private member usage in `passes/cmds/design.cc`.
2020-03-30 11:56:17 -07:00
Alberto Gonzalez 7fc0938bb6
Replace `RTLIL::id2cstr()` with `log_id()`.
Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
2020-03-30 16:50:36 +00:00
N. Engelhardt 2c847e7efe
Merge pull request #1778 from rswarbrick/sv-defines
Add support for SystemVerilog-style `define to Verilog frontend
2020-03-30 13:51:12 +02:00
Miodrag Milanovic 1dbc701728 Explicit include of csignal 2020-03-28 09:49:08 +01:00
Miodrag Milanovic 5cdcd6ec79 windows - there are no stopping signals 2020-03-28 09:09:11 +01:00
Alberto Gonzalez 4681f02a6e
Clean up pseudo-private member usage in `passes/cmds/design.cc`. 2020-03-28 05:10:18 +00:00
Rupert Swarbrick 044ca9dde4 Add support for SystemVerilog-style `define to Verilog frontend
This patch should support things like

  `define foo(a, b = 3, c)   a+b+c

  `foo(1, ,2)

which will evaluate to 1+3+2. It also spots mistakes like

  `foo(1)

(the 3rd argument doesn't have a default value, so a call site is
required to set it).

Most of the patch is a simple parser for the format in preproc.cc, but
I've also taken the opportunity to wrap up the "name -> definition"
map in a type, rather than use multiple std::map's.

Since this type needs to be visible to code that touches defines, I've
pulled it (and the frontend_verilog_preproc declaration) out into a
new file at frontends/verilog/preproc.h and included that where
necessary.

Finally, the patch adds a few tests in tests/various to check that we
are parsing everything correctly.
2020-03-27 16:08:26 +00:00
N. Engelhardt 3e46faa58c
Merge pull request #1763 from boqwxp/issue1762
Closes #1762. Adds warnings for `select` arguments not matching any object and for `add` command when no modules selected
2020-03-23 20:14:13 +01:00
Alberto Gonzalez 0da65d498b
Do not warn on empty selection with prefixed `arg_memb`.
Co-Authored-By: N. Engelhardt <nak@symbioticeda.com>
2020-03-23 17:50:11 +00:00
Alberto Gonzalez ca4e5dd56e
Suppress warnings for empty `select` arguments when `-count` or `-assert-*` options are set. 2020-03-23 17:30:53 +00:00
Alberto Gonzalez 5026f36250
Warn on empty selection for `add` command. 2020-03-23 05:58:12 +00:00
N. Engelhardt e03f725ef2
Merge pull request #1774 from boqwxp/exec
Add `exec` command to allow running shell commands from inside Yosys scripts
2020-03-19 13:14:43 +01:00
Alberto Gonzalez 7ea7fb700b
Update copyright and license header.
I hereby assign to Claire Wolf the copyright for all work I did on `passes/cmds/exec.cc`.
In the event that this copyright assignment is not legally valid, I offer this work under the ISC license.
2020-03-18 09:17:31 +00:00
Alberto Gonzalez cbc5664d37
Clean up `exec` code according to review.
Co-Authored-By: Miodrag Milanović <mmicko@gmail.com>
2020-03-18 09:17:12 +00:00
Claire Wolf 7f5c73d58f Add N:* to select language, fix some old code
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
2020-03-17 18:47:01 +01:00
Eddie Hung a2fa1654dc
Merge pull request #1769 from boqwxp/select_cleanup
Clean up code style and pseudo-private member usage in `passes/cmds/select.cc`
2020-03-17 10:43:45 -07:00
Alberto Gonzalez 9d9bbdce5d
Further clean up `passes/cmds/select.cc`.
Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
2020-03-16 20:35:19 +00:00
Alberto Gonzalez 70093698f5
Cleanup code style and pseudo-private member usage in `passes/cmds/select.cc`. 2020-03-16 20:35:11 +00:00
Alberto Gonzalez 8ba49a8462
Allow specifying multiple regexes to match in `exec` command output, and also to specify regexes that must _not_ match. 2020-03-16 07:52:57 +00:00
Alberto Gonzalez e6c09f1e0e
Add `exec` command to run shell commands. 2020-03-16 07:52:57 +00:00
Miodrag Milanovic 8f221118d2 Add YS_ prefix to macros, add explanation and apply to older version as well 2020-03-13 17:19:54 +01:00
Miodrag Milanovic 7c54e61979 Use boost xpressive for gcc 4.8 2020-03-13 14:58:35 +01:00
N. Engelhardt 6986371bac
Merge pull request #1751 from boqwxp/add_assert
Extend `add` command to allow adding $assert cells.
2020-03-12 11:18:35 +01:00
Alberto Gonzalez 005dd601ab
Extend `add` command to allow adding cells for verification like $assert, $assume, etc. 2020-03-10 21:49:22 +00:00
Alberto Gonzalez 47537f2e42
Clean up passes/cmds/add.cc code style. 2020-03-10 10:37:10 +00:00
Miodrag Milanović 036c46de1e
Merge pull request #1705 from YosysHQ/logger_pass
Logger pass
2020-02-26 13:32:49 +01:00
Miodrag Milanovic 48eed2860c Fix line endings 2020-02-23 10:05:21 +01:00
Miodrag Milanovic 010d651450 Update explanation for expect-no-warnings 2020-02-22 10:53:23 +01:00
Miodrag Milanovic 596bb2d443 Check other regex parameters 2020-02-22 10:31:56 +01:00
Miodrag Milanovic 419e67c170 check for regex errors 2020-02-20 11:41:37 +01:00
Miodrag Milanovic 5641b0248f Option to expect no warnings 2020-02-17 15:36:06 +01:00
Tim 'mithro' Ansell b9dfdbbfee show: Add -nobg argument.
Makes yosys wait for the viewer command to finish before continuing.
2020-02-15 14:03:16 +01:00
Miodrag Milanovic 31b7a9c312 Add expect option to logger command 2020-02-14 12:21:16 +01:00
Miodrag Milanovic 0ba2a2b1fa Add new logger pass 2020-02-13 13:35:29 +01:00
Pepijn de Vos 409e532433 redirect fuser stderr to /dev/null 2020-01-28 10:02:41 +01:00
Eddie Hung de969adcd8 autoname: do not autoname ports 2020-01-14 10:13:29 -08:00
Eddie Hung a63e2508fc Add RTLIL::constpad, init by yosys_setup(); use for abc9 2020-01-08 10:52:08 -08:00
Eddie Hung 102f139728 scc to use design->selected_modules() which avoids black/white-boxes 2020-01-07 15:46:36 -08:00
N. Engelhardt 3671ecc7d0 use extra_args 2019-12-18 12:30:30 +01:00
N. Engelhardt abcd82daca add assert option to scratchpad command 2019-12-16 14:00:21 +01:00
N. Engelhardt ce3615b367 add periods and newlines to help message 2019-12-13 10:28:34 +01:00
N. Engelhardt 1187e91c2f add test and make help message more verbose 2019-12-12 20:51:59 +01:00
N. Engelhardt 4c7cda1c8b add a command to read/modify scratchpad contents 2019-12-12 16:25:03 +01:00
Clifford Wolf 07c854b7af Add "autoname" pass and use it in "synth_ice40"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-11-13 13:41:16 +01:00
Clifford Wolf 3e27b2846b Add "check -allow-tbuf"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-10-03 11:49:56 +02:00
Clifford Wolf 45e4c040d7 Add "check -mapped"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-10-02 13:35:03 +02:00
Clifford Wolf b432c9b44b Improve "portlist" command
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-09-25 09:20:38 +02:00
Clifford Wolf 6c427d36dd Add "portlist" command
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-09-24 18:08:59 +02:00