Commit Graph

258 Commits

Author SHA1 Message Date
Cary R 1a0c06566d Update vvp code generation to properly emit file/line for void functions 2020-08-09 20:11:46 -07:00
Cary R a2ba8a16b1 Add support for inserting into a queue 2020-07-29 23:00:19 -07:00
Cary R 14ade1a9f4 Pass the max size when storing to a queue 2020-07-27 21:24:22 -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 e1870acfac Return the correct value when a queue or darray references an undefined element 2020-07-22 21:47:37 -07:00
Cary R 6ff07c1074 Enable support for providing a queue maximum index 2020-07-17 01:32:53 -07:00
Cary R 89d3342804 Increase the thread flag count from 256 to 512 2020-05-31 12:39:54 -07:00
Nick Brereton 414fafda2b Check that value is handled for case priority and unique qualifiers. 2019-10-05 21:42:17 -04:00
Stephen Williams befc91340c Parse and elaborate unique and priority case statements
The unique, unique0, and priority keywords can decorate case statements
to tell the run time (or synthesis) to do extra tests (or make extra
assumptions). These tests are not implemented in the vvp run time, but
now the decorations make it to the code generators.
2019-10-05 16:23:04 -07:00
Cary R ba82ef463e Fix some always_* issues 2019-09-29 16:59:59 -07:00
Cary R db1ea05452 Fix #0 to trigger in the inactive region and add a trigger for always_comb/latch 2017-12-03 20:17:42 -08:00
Cary R 585a0232cb Add preliminary support for always_comb, always_ff and always_latch 2017-11-20 07:50:05 -08:00
Martin Whitaker 61c82d2cb0 Handle mixed continuous and non-blocking assignments to same vector.
SystemVerilog allows a mixture of procedural and continuous assignments
to be applied to different parts of the same vector. The previous attempt
to make this work for non-blocking assignments was flawed (see preceding
fix for vvp_fun_part_pv::recv_vec4_pv). Instead, handle this case by
converting the non-blocking assignment into a delayed force statement,
which matches the way mixed continuous and blocking assignments are
handled.
2016-05-10 22:16:40 +01:00
Martin Whitaker 54feb89bf5 For SystemVerilog, run variable initialization before main simulation starts. 2016-03-19 13:46:09 +00:00
Stephen Williams 63ad15ee2e Rework user function calls to use specialized opcodes.
Create The %callf/* opcodes to invoke user defined functions in a
more specialized way. This allows for some sanity checking on the
way, and also is a step towards keeping return values on stacks.
2015-12-27 20:29:10 -08:00
Larry Doolittle 2739f83702 Spelling fixes in C and C++ comments 2015-06-04 15:00:29 -07:00
Martin Whitaker cfbc90812b Enable use of MinGW ANSI stdio routines.
Defining __USE_MINGW_ANSI_STDIO=1 provides C99 compatible printf
and scanf routines, which avoids the need for workarounds for the
various failings of the Microsoft C runtime library.
2015-05-10 11:45:42 +01:00
Martin Whitaker e1ae5020c4 Another sorry message to catch non-constant RHS in procedural CA. 2015-04-25 11:25:33 +01:00
Cary R 50b45dac7b Update queue push front/back code generation 2015-03-06 16:56:22 -08:00
Cary R b2d8d41e3f Fix some cppcheck warnings in tgt-vvp 2014-12-10 16:30:55 -08:00
Cary R 1efa220773 Fix non-blocking assignment to an array error state handling
If either the index or part offset expressions generate an undefined
value then the assignment is skipped. This patch reworks the code that
handles the flags used to detect this. For some simple cases a global
flag is not needed, but for other cases one is needed since there are
two expressions that can generate an error and even when there is only
a variable expression this error state needs to be preserved if there
is a variable delay. An undefined delay value defaults to zero and is
not an error.
2014-12-09 17:29:18 -08:00
Stephen Williams c71ab5869a vvp code generator try to generate condition flags directly.
When generating code for a condition expression, i.e. directly
before a %jmp/X statement, try to generate the result into the
flag bit without passing through the vec4 stack. For example, the
%cmpX/X instructions generate results into the flag bits, so it
makes no sense to push these bits into the vec4 stack then pop
them back into the flag bit. So try to handle this case.
2014-11-19 18:32:19 -08:00
Stephen Williams 48d3972299 Remove a bunch of dead vvp opcodes. 2014-10-24 15:13:28 -07:00
Stephen Williams 62fce50f8c Remove dead code for allocate_vec handling. 2014-10-24 13:07:53 -07:00
Stephen Williams 1c80c6e37a Remove dead stuff_ok_flags from draw_eval_vec4 functions. 2014-10-24 09:32:32 -07:00
Stephen Williams 4588f7c615 vec4 stack versions of queue pop methods. 2014-10-24 09:03:20 -07:00
Stephen Williams a98f21aa65 Merge branch 'master' into vec4-stack
Conflicts:
	elab_lval.cc
	netmisc.cc
	tgt-vvp/eval_object.c
	tgt-vvp/vvp_process.c
	vvp/codes.h
	vvp/compile.cc
	vvp/opcodes.txt
	vvp/vpi_tasks.cc
	vvp/vpi_vthr_vector.cc
	vvp/vthread.cc
2014-10-21 09:12:02 -07:00
Stephen Williams 9b4681918b Array access to queue variables. 2014-08-21 16:44:45 -07:00
Stephen Williams d891285326 vvp code generation for push_back/push_front for queue objects. 2014-08-21 16:44:45 -07:00
Cary R 0a6d75f1db Fix some cppcheck warnings (format string vs argument mismatches) 2014-08-01 18:55:44 -07:00
Cary R 774d173d69 Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
Cary R b687cc5f21 Remove cppcheck warnings in tgt-vvp 2014-04-17 16:26:51 -07:00
Stephen Williams 91b7c6ab55 Merge branch 'master' into vec4-stack
Conflicts:
	vvp/vthread.cc
2014-02-21 18:04:16 -08:00
Martin Whitaker 320f6d008c Output sorry message for missing procedural assign/force functionality.
A procedural continuous assignment is supposed to be updated any time
a variable on the RHS changes. Currently this only happens if the RHS
is a simple signal.
2014-02-21 23:02:05 +00:00
Stephen Williams 554fb7ebdd Various internal vec4 size mismatches fixed. 2014-02-07 17:50:13 -08:00
Stephen Williams c9e8392dc7 Fix dangling vec4 stack when force assignment is suppressed.
Also improve the %debug/thr instruction.
2014-02-07 16:10:28 -08:00
Stephen Williams 60d37e1f53 More vec4 support for various things. 2014-02-07 11:24:41 -08:00
Stephen Williams 9cfb15a302 Implement assign/vec4/off/e 2014-01-23 18:39:29 -08:00
Stephen Williams 20d415463a vec4 non-blocking assign to array swapped delay and part offset! 2014-01-21 20:58:48 -08:00
Stephen Williams 9c1dcad994 vec4 vvp support for non-blocking assign with delay and part offset. 2014-01-21 19:37:05 -08:00
Stephen Williams 0121fbc88c Remove useless assert. 2014-01-21 11:05:32 -08:00
Stephen Williams d8533104b0 Cleanup vec4 handling of suppressed store/assign due to bad offset/index math. 2014-01-14 12:00:39 -08:00
Stephen Williams 063c6d6065 Add the %event instruction, remove %ix/get and %ix/get/s. 2014-01-05 12:39:52 -08:00
Stephen Williams 63fa44fa4a vec4 support for ufuncs and ligical AND. 2014-01-05 17:15:30 +00:00
Stephen Williams 9fc3e84e93 vec4 cassign to part selects. 2014-01-04 22:58:58 +00:00
Stephen Williams e708a5b59d Handle vec4 part selects / vec4 cassign / repeat statements
These features need to be adapted to the vec4 stack.
2014-01-04 22:11:07 +00:00
Stephen Williams 54926840e6 Handle vec4 stack version of concatenation. 2013-12-28 07:50:37 +02:00
Stephen Williams 5ef077fdf6 Start work on converting vec4 expressions to use stack.
Instead of using a bit4 space to hold thread vectors, create a
vec4 stack--much like the real, string, and object stacks--to
hold intermediate values.
2013-12-27 17:04:42 +02:00
Stephen Williams 37ac1ed474 Clean up dead code in ivl_lval_t handling. 2013-11-22 12:02:03 -08:00
Cary R 4047ed7976 Add support for SV wait fork to the run time. 2013-10-22 16:00:29 -07:00