Commit Graph

228 Commits

Author SHA1 Message Date
Lars-Peter Clausen 1603df47d0 vvp: Remove `{send,recv,filter}_long()`
The last user was removed in 682ab886d8 ("Implement release and deassign
more directly.").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-06-20 22:59:03 +02:00
Lars-Peter Clausen 2032e14f5a vvp: Remove `wid` parameter from `recv_vec{4,8}_pv()`
The `recv_vec{4,8}_pv()` functions are used to implement a partial write to
a vector. As parameters they take both the value and the width of the
value.

All callers of of these functions pass `val.size()` or a variation thereof
as the width of the value. And all implementations that do anything with
the data have an assert that `val.size() == wid`.

Remove the `wid` parameter from these functions and just use `val.size()`
directly where needed. This allows to simplify the interface and also
to remove the asserts.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-05-28 15:34:02 +02:00
Martin Whitaker 9cc09b8513 Remove "using namespace std" from vvp header files and fix the fallout. 2021-11-04 17:02:07 +00:00
Cary R 66c5d8cc20 Cleanup cppcheck warnings in vvp 2021-01-01 00:20:26 -08:00
Martin Whitaker 351a4e5f5e Improve vvp handling of excessively large shift distances. 2019-11-16 12:11:49 +00:00
Martin Whitaker 36eef5154f Implement supply->strong strength reduction for non-resistive switches.
As specified in 1364-2005 section 7.11.
2018-02-23 22:07:59 +00:00
Martin Whitaker ad83a135e5 Fix assertion failure in vvp wide functor.
If the functor output is read before any values have propagated to
the functor inputs, the internal storage won't have been initialised.
2017-11-08 20:35:18 +00:00
Maciej Suminski f32b64f497 Fixed warnings about shifting a negative value 2016-09-19 12:54:15 -07:00
Cary R a2fbdeff78 Add some pass by reference to vvp 2016-08-14 22:26:16 -07:00
Martin Whitaker 6e5ed73b09 Extended fix for GitHub issue #99.
Most vvp functors need to support recv_vec4_pv. Any that are strength-aware
also need to support recv_vec8_pv. Note the simplifying assumption that is
documented in the base class recv_vec4_pv_ implementation.
2016-04-18 23:47:43 +01:00
Cary R a65c007fdb Fix some cppcheck warnings 2015-10-02 09:43:54 -07:00
Martin Whitaker 97c6339241 Ensure VPI release on net connected to island returns correct value. 2015-07-01 09:00:43 +01:00
Stephen Williams 105521b547 Merge branch 'master' into vec4-stack 2014-12-06 08:24:46 -08:00
Cary R d62a307c34 Fix 32-bit issue in vector4_to_value() 2014-12-05 18:00:08 -08:00
Stephen Williams b1d2393789 Optimize the %sub instruction by integrating it with vvp_vector4_t class 2014-12-04 17:01:16 -08:00
Stephen Williams 0f740289e9 Optimize %mul instructions by integrating with vvp_vector4_t class. 2014-12-04 16:00:57 -08:00
Stephen Williams 46ce236cfb Optimize the %add and %addi instructions
Tightly integrate with the vvp_vector4_t class to get much
better add performance.
2014-12-04 12:38:08 -08:00
Stephen Williams a57e0a1e3f vvp implementation of copy from vec4 to vec2 can use subarray method. 2014-12-02 14:52:37 -08:00
Stephen Williams f3392561ed Optimize the vvp pad implementation. 2014-11-22 09:59:02 -08:00
Stephen Williams bea03db25d Minor vec4 stack manipulation optimizations. 2014-11-21 14:41:31 -08:00
Stephen Williams 0601b4e43b Optimizations for %pushi/vec4 and %load/vec4
- Have %pushi/vec4 handle some special cases optimally.
- Eliminate some duplicated method calls in %load/vec4.
- Optimize the vvp_vector4_t::copy_from_ method by inlining
some parts.
2014-11-14 14:41:04 -08:00
Stephen Williams 8aca66b109 Performance tweaks
Better performance for %cmp/s and the vvp_fun_part_sa node.
2014-11-14 11:48:36 -08:00
Cary R 0611135758 Some more cppcheck cleanup/updates 2014-06-29 20:39:40 -07:00
Martin Whitaker b7b77b2e75 Correct fix for GitHub issue 19. 2014-05-20 00:08:03 +01:00
Martin Whitaker c32610d135 Further fix for GitHub issue 19 : incorrect handling of large shift values.
Apply the same fix to vvp as was applied to the compiler. See commit
065c48527c for details.
2014-05-04 20:39:05 +01:00
Cary R 13c1925045 Fix space issue 2014-02-28 17:19:35 -08:00
Martin Whitaker 5853f7d867 Fix for GitHub issue 9 part 1 : Efficiency of vvp_vector2_t::pow() function.
The vvp_vector2_t::pow() function is recursive, and performs a multiplication
operation on each step. The multiplication operator was expanding the result
vector to accomodate the maximum possible result value for the given operand
vectors, thus causing the execution time of the power operation to be
exponentially proportional to the exponent value. Both in this case and
in general, it is unnecessary for the multiplication result vector to be
expanded, as the compiler has already determined the required vector width
during elaboration, and sizes the operand vectors to match.
2014-02-15 21:40:55 +00:00
Cary R 196df151aa Correctly cleanup class and string object when using valgrind 2013-12-04 16:28:28 -08:00
Stephen Williams 13bb927d8a Handle strings as arguments to automatic functions. 2013-09-20 20:44:56 -07:00
Cary R e4cc12f3b9 Remove old comment and enclose sizeof value in parenthesis (vvp_vector8_t) 2013-07-12 10:57:39 -07:00
Stephen Williams b9011d89ae Allow objects to work in automatic functions. 2013-03-24 15:12:35 -07:00
Stephen Williams 1527b87595 Remove useless vvp_realarray_t
The vvp_darray_real class cal be used for static arrays as well
and this is a more general solution anyhow. Kill the now useless
vvp_realarray_t class.
2013-01-02 19:02:02 -08:00
Cary R f5717a6e87 Update the valgrind cleanup code to handle most tri constructs 2013-01-02 09:54:44 -08:00
Stephen Williams 1326f9aef1 Handle darray objects of all integral atom types.
Clean up the vector4_to_value to use templates and explicit
instantiations. This makes the interface much cleaner for a
wider variety of integral types.
2012-10-14 17:16:47 -07:00
Cary R f957deeca7 Get the vvp code to compile with the valgrind hooks again.
This patch updates the vvp code so it will compile with the valgrind hooks
again. There are still new constructs that need to be cleaned up correctly
and some old constructs were changed enough that the old code no longer
works, but the rest of this can be done as an incremental improvement.
2012-10-08 18:53:55 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Stephen Williams 813f548a4b Merge branch 'x-mil3'
Conflicts:
	vpi/Makefile.in
	vpi/sys_table.c
2012-07-30 17:02:57 -07:00
Martin Whitaker 6836068a16 Initial support for $countdrivers.
This patch implements the $countdrivers system function. It does not
yet support wires connected to islands (and outputs a suitable "sorry"
message when this is detected).
2012-07-27 18:09:32 -07:00
Stephen Williams 14f229de30 Parse support for dynamic arrays.
This includes limited support for dynamic arrays down to the code
generator, and some stubs in the vvp code generator and vvp run time.
2012-07-22 10:52:06 -07:00
Stephen Williams d48362b861 First pass at getting strings to work.
In vvp, create the .var/str variable for representing strings, and
handle strings in the $display system task.

Add to vvp threads the concept of a stack of strings. This is going to
be how complex objects are to me handled in the future: forth-like
operation stacks. Also add the first two instructions to minimally get
strings to work.

In the parser, handle the variable declaration and make it available
to the ivl_target.h code generator. The vvp code generator can use this
information to generate the code for new vvp support.
2012-07-22 10:52:06 -07:00
Cary R 391073a750 Update __vpiNamedEvent to remove struct and remove extra class statements
The clang compiler does not like using struct to reference a class object.
This patch removes all the struct keywords for __vpiNamedEvent objects
since they are now a class and can be called without a struct/class
qualifier.

This patch also removes all the extra class qualifiers from the rest of
the source code.
2012-02-12 13:22:32 -08:00
Stephen Williams b3ef8171e2 Short circuit propagation of part selects when possible
Full vector assigns are able to short circuit the propagation of
the value if it finds that there are no value changes. This patch
supports that behavior in writes to parts as well. Put this change
to use in logic devices as well.
2012-01-14 11:01:54 -08:00
Cary R 8977248ee2 For valgrind testing remove the UDP functionality object.
When checking with valgrind we need to remove the UDP functionality
object to avoid a reported memory issue.
2011-10-19 14:56:30 -07:00
Cary R eab5bacf9f Remove clang/clang++ warnings.
This patch makes the code consistently use struct/class in the C++ files,
it removes a couple shadow warnings and where a class pointer is passed to
the C routines, it defines the pointer as a class for C++ and as struct for
C and it removes a namespace std duplication.
2011-09-25 10:14:04 -07:00
Cary R c2225f679b Remove some cppcheck warnings.
This patch removes some cppcheck warnings.
2011-05-07 11:40:16 -07:00
Larry Doolittle 8a568055f6 Spelling fixes
All are in comments and .txt files except for one in the Architecture::Statement dump message.
2011-03-29 08:56:10 -07:00
Cary R d0b063b4a4 Fix enum compile warnings and update ivl.def (windows compile).
This patch fixes a few compilation warnings introduced by the
enumeration code. It also updates the ivl.def file so that the
proper routines get exported under windows.
2010-11-30 16:10:34 -08:00
Stephen Williams 16e1570737 Merge branch 'master' into work2
Conflicts:
	elab_scope.cc
	net_nex_input.cc
	t-dll-api.cc
	vvp/parse.y
2010-11-28 08:38:40 -08:00
Stephen Williams 8a91931d49 Properly handle base-type logic enumerations.
The next()/prev() methods need to know of the base type
so that the comparisons can go right.
2010-11-21 17:24:46 -08:00
Stephen Williams 0c72dfe60f Initial implementation of $ivl_method$next/prev
Create the v2009.vpi module to include SystemVerilog core
functions, and start out with some of the enum methods.

Add to vvp support for creating enum types, including some
vpi access methods.
2010-11-17 20:00:23 -08:00