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
Cary R
d209e7533a
Update some queue code since deques support random access
2020-11-14 17:09:51 -08:00
Martin Whitaker
8f8737198c
Bump version to 12.0 in vvp/examples/*.vvp.
2020-10-03 10:57:25 +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
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
bd0a1c75ed
Add support for string values in event expressions (GitHub issue #365 ).
2020-08-23 11:06:15 +01:00
Martin Whitaker
a69de8b94a
Rework last value storage in vvp_fun_anyedge functors.
...
This prepares the way to support strings and object handle values.
2020-08-23 11:04:44 +01:00
Cary R
0a69303164
Refactor array store for string/real and skip saving when given an undefined index
2020-08-16 19:49:34 -07:00
Cary R
505ee1a96c
Refactor store for real/string
2020-08-16 19:23:41 -07:00
Cary R
aa013a0ef0
Refactor store prop
2020-08-16 19:08:34 -07:00
Cary R
4bf502741d
Refactor store DAR
2020-08-16 18:37:28 -07:00
Cary R
8e3afebb7b
Refactor set DAR object
2020-08-16 18:00:41 -07:00
Cary R
43441066eb
More refactoring in vthread
2020-08-13 23:28:18 -07:00
Cary R
f3e4287d0a
Refactor prop routines to use common template
2020-08-13 22:30:21 -07:00
Cary R
52c3b901e0
When available print file/line information with thread error messages
2020-08-13 22:05:31 -07:00
Cary R
294005c5b2
Refactor load DAR routines
2020-08-13 21:48:52 -07:00
Cary R
3993241d04
Refactor more of the queue code
2020-08-11 19:46:36 -07:00
Cary R
f6d8cfc80c
Add file/line to Sorry queue message
2020-08-11 19:46:22 -07:00
Cary R
112ebb48d8
Add file/line information to procedural warnings and darray fixes
...
When -pfileline=1 is used the queue procedural warnings have file
and line information added to the messages. Also switch the trace
debugging to be off by default.
Also, Add some preliminary missing darray functionality.
2020-08-10 22:01:55 -07:00
Cary R
bff115b9f7
Add initial support for assigning between queues and darrays
2020-08-07 00:23:43 -07:00
Cary R
a0ef23605a
Update some functions to use inline
2020-08-04 22:11:36 -07:00
Cary R
538a03ba8e
Add templates for queue push
2020-08-04 22:07:02 -07:00
Cary R
f638e9dd5d
Add templates for queue pop
2020-08-04 21:48:47 -07:00
Cary R
84eb70660d
Switch qinsert to use a template
2020-08-04 21:14:17 -07:00
Cary R
d1d6c0f5d2
Start refactoring the queue routines
2020-08-03 23:45:56 -07:00
Cary R
199ed39abe
Report when the array pattern is larger than the maximum queue size
2020-08-02 23:40:35 -07:00
Martin Whitaker
8e4cc8e887
Use GNU make pattern rules to handle multiple file output from bison.
...
With a pattern rule, the recipe will only be executed once, even when
the rule has multiple targets. Using this to handle the output from
bison is included as an example in the GNU make manual.
This fixes the makefiles so that bison-generated header files will be
regenerated if they are deleted.
2020-07-30 16:27:01 +01:00
martinwhitaker
a4c9919e3a
Merge pull request #349 from hzeller/fix-bison-include
...
Bison includes its generated header in *.cc. Generate with correct name.
2020-07-30 15:53:21 +01:00
Cary R
a2ba8a16b1
Add support for inserting into a queue
2020-07-29 23:00:19 -07:00
Henner Zeller
5b699c1be7
Bison includes its generated header in *.cc. Generate with correct name.
...
The current bison (3.7) generates a *.cc file that includes the header
it generated. For parse.cc this would be parse.hh. Right now, we rename
this header to have a common name used in other files, but this results
in a compile error for the parse.cc file:
parse.cc:462:10: fatal error: parse.hh: No such file or directory
462 | #include "parse.hh"
| ^~~~~~~~~~
Fix this by telling bison to output the header file to the correct
filename in the first place so that we don't have to rename it.
(using the --defines instead of -d option).
This looks like a bison specific option not available in Posix yacc;
but looks like we're requiring bison anyway.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2020-07-29 15:29:08 -07:00
Martin Whitaker
e69549034d
Fix potential buffer overflows (GitHub issue #346 ).
2020-07-28 13:17:57 +01:00
Cary R
fdd902e446
Remove some clang warnings
2020-07-27 21:56:29 -07:00
Cary R
14ade1a9f4
Pass the max size when storing to a queue
2020-07-27 21:24:22 -07:00
Cary R
c969c324ed
Add initial support for using a queue element as an L-value
2020-07-26 14:02:29 -07:00
Cary R
d1b75d9407
Update some queue warning messages and optimize element erase
2020-07-25 15:32:28 -07:00
Cary R
1a4345cce9
Add the ability to delete an element of a queue
2020-07-25 00:49:42 -07:00
Cary R
e94291c88f
Handle negative and undefined queue addresses correctly
2020-07-23 22:49:33 -07:00
Cary R
f0f045f1f9
Add warning messages when popping from an empty queue
2020-07-23 22:04:27 -07:00
Cary R
1b52a4a578
Don't fail when pushing/poping from an empty queue
2020-07-23 19:12:35 -07:00
Cary R
e1870acfac
Return the correct value when a queue or darray references an undefined element
2020-07-22 21:47:37 -07:00
Cary R
5ebd08c7f8
The queue needs to be implemented using a deque
2020-07-21 20:02:11 -07:00
Cary R
2999f351d2
Update queue error/warning messages
2020-07-20 20:34:17 -07:00
Cary R
1b7cd5c237
Add initial support for real queues
2020-07-19 21:34:56 -07:00
Cary R
bf6c4329b9
Add push front for string queues and improve some warning messages
2020-07-19 19:18:59 -07:00
Cary R
6ff07c1074
Enable support for providing a queue maximum index
2020-07-17 01:32:53 -07:00
Cary R
dd80607ceb
Add CA version of the <-> operator
2020-07-09 01:45:43 -07:00
Martin Whitaker
085f466377
Fix GitHub issue #337 - incorrect uninitialised function return value.
2020-06-25 00:31:43 +01:00
martinwhitaker
0b87ecb173
Merge pull request #325 from tpambor/fix-missing-include
...
Add missing include for malloc
2020-06-02 20:56:37 +01:00
Cary R
0fca1bdab0
Add vpiIndex for array words
2020-05-31 14:27:19 -07:00
Cary R
fb237fb006
Update the user visible copyright to be 2020
2020-05-31 13:41:38 -07:00