Commit Graph

10116 Commits

Author SHA1 Message Date
Cary R 11f4e71dd0 Fix the vlog95 -> and <-> expression code for wide results 2020-12-01 00:04:00 -08:00
Cary R c37f1c9309 An input port driven by a variable is not collapsible 2020-11-30 22:48:39 -08:00
Stephen Williams b7dec18088
Merge pull request #403 from umarcor/ci/test-script
ci: add 'test.sh'
2020-11-30 15:05:06 -08:00
Stephen Williams 8bb856f29d
Merge pull request #397 from garmin-mjames/skip_callbacks
Skip all removed VPI callbacks
2020-11-30 15:04:04 -08:00
Marlon James 65b4c17451 Skip all removed VPI callbacks 2020-11-30 09:22:18 -08:00
umarcor f4aff860e7 ci/win: remove 'mingw64' from 'test.sh' 2020-11-30 09:41:18 +01:00
umarcor 0d20bf2123 ci/lin: install to system, not HOME 2020-11-30 08:59:42 +01:00
umarcor de4e19ceea ci/lin: split Build and Test steps 2020-11-30 08:12:32 +01:00
umarcor b8ea1e5cfe ci: add 'test.sh' 2020-11-30 08:12:32 +01:00
Stephen Williams bda74bcd56
Merge pull request #402 from umarcor/ci/win
ci/win: install MSYS2 packages through setup-msys2 (cached)
2020-11-29 21:54:15 -08:00
umarcor b2cca8fbec ci/win: install MSYS2 packages through setup-msys2 (cached) 2020-11-30 06:00:53 +01:00
umarcor d18e280b1b ci/lin: update job names 2020-11-30 06:00:53 +01:00
Stephen Williams 9b7afd2146
Merge pull request #401 from steveicarus/steveicarus/lnet-struct-members
Support nested struct in continuous assign l-values
2020-11-29 19:22:27 -08:00
Stephen Williams a79b55ae28 Support nested struct in continuous assign l-values
When doing continuous assignment of packed structs, support the case
where the value being assigned is a member of a member, etc. Procedural
assignments already support this.

See issue#307
2020-11-29 18:18:55 -08:00
Cary R a7ce4ec110 Report a package connot be dumped with most dumpers 2020-11-29 12:43:01 -08:00
Stephen Williams 1b4244474c
Merge pull request #400 from umarcor/ci/gha
ci: migrate from Travis CI to GitHub Actions
2020-11-29 10:12:24 -08:00
umarcor 038f52b924 ci/win: do not reinstall msys2 through choco 2020-11-29 13:08:18 +01:00
umarcor 22bfa7b584 ci: migrate from Travis CI to GitHub Actions 2020-11-29 13:08:18 +01:00
Stephen Williams 99bb0d15b2 Report error if command file is not properly terminated.
Command file lines must all be terminated by EOL. If the last line
is not properly terminated, report an error.
2020-11-26 16:11:59 -08:00
Tim 2dcbfca5d9 Clarify "Standard inconsistency" warning
Fixes #343
2020-11-26 14:07:37 -08:00
Stephen Williams dee68faf80
Merge pull request #396 from steveicarus/array-copy
Fix dynamic array assignment to make a copy of the rvalue.
2020-11-26 13:17:30 -08:00
Stephen Williams 3c2fb6a601 Fix dynamic array assignment to make a copy of the rvalue.
IEEE Std 1800-2017 Section 7.6 Array assignments

Assignment of a dynamic array creates a duplicate of the source,
so that assignments to the copy don't impact the original. Handle
all sorts of dynamic array base types.
2020-11-26 12:52:06 -08:00
Martin Whitaker 159af4d4ba In Windows, export VPI functions from vvp.exe (GitHub issue #395)
This is to support cocotb, who don't use our vpi_user.h and libvpi.a,
instead building their own import library to directly link to vvp.
2020-11-24 20:01:12 +00:00
Martin Whitaker b0b44fdd8a Support passing class objects as task/function arguments (GitHub issure #391) 2020-11-24 17:16:46 +00:00
Martin Whitaker 55e06db693 Support calls to inherited methods without "this." prefix (GitHub issue #388). 2020-11-23 22:03:59 +00:00
Stephen Williams 7277f4e807
Merge pull request #394 from steveicarus/super-new-handling
Fixes for issues #387 and #390
2020-11-22 16:48:45 -08:00
Stephen Williams 919fd22a79 Handle the special case that constructor only chains.
Fix the case that a constructure is only a chaining constructor,
with no other content.
2020-11-22 16:13:01 -08:00
Stephen Williams 156644d91e Detect and complain about some constructor chain errors
This.new is not allowed.

super.new beyond the first statement is not allowed.

And while I'm at it, clean up the use of "@" and "#" in
the code as tokens for this and super.
2020-11-22 15:31:40 -08:00
Cary R 292d174cad Add support for an empty ';' in the description text 2020-11-20 21:42:39 -08:00
Cary R b14a623eef Update module items to include just a ';' 2020-11-20 20:48:55 -08:00
Martin Whitaker 1b3f0dd689 Add enumeration assignment compatibility check for continuous assignments. 2020-11-20 17:34:55 +00:00
Martin Whitaker 0fada92389 Fix expression type for packed struct member access (GitHub issue #386)
A NetESelect is used for accessing packed struct members and also for
accessing dynamic array elements. In these cases the expr_type() and
enumeration() methods should reflect the member/element type.
2020-11-20 16:50:11 +00:00
Cary R ad862020bb Move GNU lesser to tgt-vvp since that is the only place where LGPL code is located 2020-11-14 19:03:27 -08:00
Cary R d209e7533a Update some queue code since deques support random access 2020-11-14 17:09:51 -08:00
Martin Whitaker d6e01d0c55 Fix assertion failure when no value supplied with -P option (GitHub issue #377) 2020-10-24 22:48:00 +01:00
Martin Whitaker 359b2b65c2 Support escaped identifiers as macro names. 2020-10-09 11:38:16 +01:00
Martin Whitaker 6566072741 Fix GitHub issue #374 - ordering of `` and embedded macro expansion.
The IEEE standard does not clearly state whether the `` directive is applied
before or after embedded macros are expanded. Other simulators vary in their
behaviour. For maximum compatibility, this fix adopts the behaviour found in
Verilator, where `prefix``suffix expands to <prefix>suffix if prefix is a
defined macro, otherwise it expands to <prefixsuffix> (where <...> is the
expanded macro text). Other simulators show this behaviour in at least some
circumstances.
2020-10-09 08:09:04 +01:00
Martin Whitaker 8f8737198c Bump version to 12.0 in vvp/examples/*.vvp. 2020-10-03 10:57:25 +01:00
Martin Whitaker 4e79c1c861 Bump major version to 12. 2020-10-03 10:13:45 +01:00
Martin Whitaker 6880b39770 Refactor task declaration parsing and fix warning for empty port list.
1364-2005 and later allow a task declaration with an empty port list.
2020-10-03 09:30:51 +01:00
Martin Whitaker c4883da334 Fix width of localparam created from genvar when using -gstrict-expr-width. 2020-10-01 11:33:24 +01:00
Stephen Williams fec003bd36 vvp: Remove a dead rule for the .port_info statement.
We left an old rule that matched a port_info statement without a
trailing semicolon. Remove that rule ahead of the release.
2020-09-22 14:18:24 -07:00
Stephen Williams a831108c96
Merge pull request #371 from larsclausen/enum_implicit_reg
parse.y: Mark enum output ports always as IMPLICT_REG
2020-09-21 08:10:18 -07:00
Lars-Peter Clausen 1064543d27 parse.y: Mark enum output ports always as IMPLICT_REG
Unless explicitly declared a wire an enum output port is of variable type
and should be marked as IMPLICT_REG.

Currently this is only done when the base type of the enum is `logic`. But
it should be done for all enums regardless of their base type.

Without this change for example the following snippet

```
  typedef enum {
      A,
      B
  } E;

  module M (
      input E ei,
      output E eo
  );

      always_comb eo = ei;

  endmodule
```

fails with the following error message

  test_enum.sv:11: error: eo is not a valid l-value in M.
  test_enum.sv:8:       : eo is declared here as wire.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2020-09-20 19:14:28 +02:00
Stephen Williams b8c5fd6314
Merge pull request #370 from larsclausen/remove-empty-file
tgt-vvp: Remove (almost) empty file vector.c
2020-09-19 08:19:38 -07:00
Lars-Peter Clausen 1ec5a441f3 tgt-vvp: Remove (almost) empty file vector.c
Since commit 62fce50f8c ("Remove dead code for allocate_vec handling.")
vector.c only contains the license header and some include directives
but no actual code.

Remove the file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2020-09-19 12:39:04 +02:00
Martin Whitaker 10685ed89d Remove redundant test for whether a vvp thread is joinable.
Since commit 15cda5fe, forked threads are never embedded in the parent
thread, so we no longer need the special case code that ensured that
task/function calls were reaped before a join.

This also fixes GitHub issue #368.
2020-09-11 21:18:54 +01:00
Martin Whitaker d8556e4c86 Fix handling of the SV `` delimiter when combined with macro usage.
Given a macro definition like this:

  `define name  `macro``text

the preprocessor should expand `macro, not `macrotext, when it expands
`name. This also ensures that

  `define name(p,s)     p``_``s
  `define PREFIX        my_prefix
  `define SUFFIX        my_suffix

  `name(`PREFIX, `SUFFIX)

expands to

  my_prefix_my_suffix

as the user would expect.
2020-08-24 20:29:15 +01:00
Martin Whitaker dc2aa6efa0 Fix handling of SV `" and `\`" escape sequences in macros (GitHub issue #366).
`" overrides the normal behaviour of disabling macro expansion within
a string.
2020-08-24 14:48:40 +01:00
Martin Whitaker bd0a1c75ed Add support for string values in event expressions (GitHub issue #365). 2020-08-23 11:06:15 +01:00