Commit Graph

7964 Commits

Author SHA1 Message Date
Stephen Williams 33158355ba Add appropriate hysteresis to tranif input pins.
The tranif input pins are normally nothing special, but sometimes
they are fed back from the switch body. In this case, the control
needs to see the current *output* from the fed back port, in order
to get the results that people expect.
2009-10-13 19:01:02 -07:00
Stephen Williams 6b17dcc587 Get drive of pull-ups right.
The drive for a pullup comes from ivl_nexus_pt_drive1. Get this
wrong and a pullup turns into a HiZ.
2009-10-12 22:01:56 -07:00
Stephen Williams 65f8f3caa8 Merge branch 'master' of ssh://steve-icarus@icarus.com/~steve-icarus/git/verilog 2009-10-11 16:51:45 -07:00
Stephen Williams 815e22908b Make control inputs to islands use .import records.
Control inputs (i.e. the control input to tranif switches)
are not driven in any way by the island, so use .import records
instead of .port records to bring them into the island. Properly
handle the now potentially different bindings within the island
and outside the island. This means the draw_net_input_x function
is a little more sophisticated, and the node data more complex.
2009-10-11 16:51:06 -07:00
Cary R ff39575dc0 We must have autoconf version 2.60 or later.
When AC_PROG_CC_C99 was added recently we created an implicit
requirement for autoconf version 2.60. This patch makes that
implicit requirement and explicit requirement.
2009-10-08 17:00:00 -07:00
Cary R 3303cc144f Fix obscure valgrind memory leak. 2009-10-08 16:55:36 -07:00
Cary R 39f243b18e Add a configure check to see if uint64_t and unsigned long are identical.
This is needed to get vvp to compile under MacOS 10.6 and possibly other
64 bit systems that define uint64_t as unsigned long long vs unsigned
long (both are 64 bits).
2009-10-08 11:50:05 -07:00
Stephen Williams 2229ad896b tranif control ports handle nil inputs
In certain special cases, it is possible for the tranif control input
to be nil. (probably only during startup.) Treat that case as HiZ.
2009-10-07 12:58:19 -07:00
Cary R 537ba93fe4 Format the --enable-suffix help correctly. 2009-10-06 20:43:29 -07:00
Stephen Williams abc4eb9d52 Do not cprop through ternaries if the selector is an l-value.
It turns out that it is possible for an otherwise constant net
mux to be non-constant if there is a force that can drive the
net. This can be detected as an l-value reference to an otherwise
constant selector.
2009-10-05 19:46:47 -07:00
Cary R 9ea6604439 Fix bug in vector8 operator=
operator= would try to overwrite it self under some circumstances.
This was found with valgrind and using -O0. It works with -O2.
2009-10-03 08:59:35 -07:00
Cary R 27f96bd6f3 Fix the last of the net rework memory leaks.
This patch fixes the last of the memory leaks introduced by the
net rework.
2009-10-03 08:54:44 -07:00
Cary R ed7e9f8be5 Check if the compiler supports C99 and better check for some math functions.
Add a configuration check that says we would like to use C99 if the
compiler supports it. Also change the lround(), nan(), fmin() and
fmax() checks to look in the default libraries as well as the math
library.

Update the iverilog-vpi sh script to correctly quote CC since it
may now have two words (gcc -std=gnu99).

Add a missing int for main in draw_tt.c.
2009-10-01 11:51:52 -07:00
Stephen Williams d64b1f0275 Unify some duplicated heap management.
Create the permaheap class to hold common code from the vvp_net_fun_t
and vvp_net_fil_t classes.
2009-09-30 22:10:35 -07:00
Stephen Williams 5a96b397e4 Elide local nets that have no drivers.
Local nets that have no (zero) drivers are dead weight. Since
they have no drivers, they are not being used anywhere. Since
they are local, they are not force-able.
2009-09-30 19:51:05 -07:00
Stephen Williams e076087320 Draw PULLUP constants with their own BUFZ.
This doesn't have any significant runtime consequence other then
to create a functor that is otherwise stable. But this does connect
to .net nodes more naturally, and gets me a step closer to banning
Cx<> labels as arguments to .net records.
2009-09-30 19:48:36 -07:00
Stephen Williams 92fe0e0fc7 vvp_net_fil_t objects are permallocated. 2009-09-29 21:17:08 -07:00
Stephen Williams 025f93e321 Attach generated nets to the right scopes.
Nets that are created after being put off for later processing to
allow the vvp_net to be created, need to be more carefully placed
in the correct scope.
2009-09-27 18:29:07 -07:00
Cary R 3259354d29 The concat object can get out of sequence so don't optimize a repeat.
Under some situation the optimized repeat expression can get out
of sync while it is being processed this causes the code to
reference freed memory. This happens when the repeat expression
is converted to an unsigned integer, but the repeat expression
is used in a different path. It was easier to just remove the
optimization then track down the convoluted call sequence that
was causing this and then figure out what needed to be fixed.
The repeat expression must be constant, so is likely not too
complicated so this optimization is very minor and should not
be missed.
2009-09-26 18:34:25 -07:00
Stephen Williams 996424a7be Merge branch 'master' of ssh://steve-icarus@icarus.com/~steve-icarus/git/verilog 2009-09-26 10:02:31 -07:00
Stephen Williams a3be083893 Give constants a driver
This driver gives nets something to hang on to, and leads to
more sensible topology when multiple nets are driven by the
same constant.
2009-09-26 09:59:06 -07:00
Cary R 1c8a1bbf7f Clean up a couple of memory leaks in the new net rework code.
This patch fixes a couple of minor memory leaks in the new
net rework code.
2009-09-25 13:50:30 -07:00
Cary R a84faabdb0 A real wire needs an explicit initial value.
To keep valgrind happy we need to give real wires an explicit
initial value of 0.0.
2009-09-25 13:50:20 -07:00
Stephen Williams 91a16764e7 Merge branch 'master' of ssh://steve-icarus@icarus.com/~steve-icarus/git/verilog 2009-09-24 19:09:27 -07:00
Stephen Williams 18d7a7f859 Release of nets needs to force propagation
When releasing a net, the release method must force that the
filter propagate the released value to the output. Use the
needs_init_ flag to do that force.
2009-09-24 18:57:15 -07:00
Cary R d7ef9718e7 Fix valgrind error in new net rework code.
This patch fixes a valgrind error and fixes some of the test suite
issues in the new net rework code.
2009-09-24 17:51:22 -07:00
Stephen Williams 8a3df7c4ff Fix build errors when configured --with-valgrind
The vpi_callback base class is parent of the filter object of nets,
and not the functor. The good news is the clear_all_callbacks method
can now be got at without casts.
2009-09-24 15:11:56 -07:00
Cary R b8b70f5ac7 Add ivl_signal_scope to ivl.def to get mingw and cygwin to compile. 2009-09-24 14:21:45 -07:00
Cary R 8d2913ac97 Remove unsigned/signed compile warning. 2009-09-24 12:05:28 -07:00
Stephen Williams b0d5a3b8a2 Merge branch 'vvp-net-out-rework' 2009-09-23 17:16:37 -07:00
Stephen Williams 753a55573f Prepare for snapshot 2009-09-23 16:51:00 -07:00
Stephen Williams d3d84dde6a Better portability for rpm install section. 2009-09-23 15:55:15 -07:00
Stephen Williams 0b2ce7a5ec Merge branch 'master' into vvp-net-out-rework 2009-09-22 21:47:10 -07:00
Stephen Williams b277a672f1 Fix the calculation of top pad in overlapped part select
If the part select is too wide in both the top and bottom ends,
this patch fixes the calculation of the top pad. The compiler
was generating too much pad if the select also extended below
the expression.
(cherry picked from commit 2c0b105de7)
2009-09-22 21:43:52 -07:00
Stephen Williams 2c0b105de7 Fix the calculation of top pad in overlapped part select
If the part select is too wide in both the top and bottom ends,
this patch fixes the calculation of the top pad. The compiler
was generating too much pad if the select also extended below
the expression.
2009-09-22 21:42:59 -07:00
Stephen Williams 6cc16711db Merge branch 'master' into vvp-net-out-rework 2009-09-22 17:48:33 -07:00
Cary R 98c39cfa24 Add support for .part/v.s
This patch adds support for .part/v.s. A variable part select with
a signed select expression in a continuous assign.
2009-09-22 17:31:37 -07:00
Cary R e1af002a32 Warn that a signed part select may not work for signals < 32 bits.
If a signed signal is driving a part select in a CA and the width
is less than 32 bits. the value will be zero extended and will
not work for negative values. This patch adds a warning that this
could happen. This will be fixed in development.
2009-09-22 17:26:35 -07:00
Cary R 09fa57742a Optimize a full L-value indexed part select, etc.
This patch adds an optimization when a constant indexed part
select covers the entire L-value. It also fixes a few issues
in the code generator related to part selects.
2009-09-22 17:23:26 -07:00
Cary R e54fd4df51 Add support for signed thread base index for &A<>
This patch adds support for getting a signed index for &A<> from
thread space. This mimics what was done for &PV<>.
2009-09-22 17:20:31 -07:00
Cary R c82baa2793 Only process the first 32 bits of the part select base.
When reading from thread space only read the first 32 bits
(sizeof int) for the part select base. This matches the other
parts of the PV_get_base() code.
2009-09-22 17:18:04 -07:00
Cary R 1851cba955 Warn that &A<> may have problems with a signed select from thread space.
Like the &PV<> code we should warn the user that a signed select
from thread space may not work correctly for &A<>. This will be fixed
in development.
2009-09-22 17:15:30 -07:00
Cary R 617897f3bf Add support to &PV<> for signed base values from thread space.
When calculating a value from thread space we need to tell &PV<>
if the base value is signed or not. This patch adds support for
that functionality.
2009-09-22 17:11:55 -07:00
Stephen Williams e983e75780 Elide nets that can't work.
In auto scopes, nets cannot work and probably are are artifact of
elaboration. So elide local nets in auto scopes.

Also, get net inputs from the inputs of nets. This is a step
towards eliminating the label on nets altogether.
2009-09-21 22:15:10 -07:00
Stephen Williams b75f02c889 Handle automatic real variables like automatic logic vectors. 2009-09-15 21:28:21 -07:00
Cary R 0b6bd343e8 Don't check the scope for array words.
We do not want to check an array word scope to see if the scope
was already included since a scope does not include array words.
They must be explicitly specified.
2009-09-15 20:26:57 -07:00
Stephen Williams 21b1f620ba Automatic variables cannot use wire filters.
Make vec4 variables use stub filter functions so that the filter
does not interfere with automatic values.
2009-09-15 17:10:59 -07:00
Stephen Williams 0a72df2025 Remove vvp_signal_value from the vvp_fun_signal hierarchy.
We no longer need to access values from the signal functor. Use
the filter (the wire part) everywhere to access signal values.
2009-09-13 18:30:13 -07:00
Stephen Williams 3d5d312786 Merge branch 'master' into vvp-net-out-rework
Conflicts:
	vvp/vpi_signal.cc
2009-09-13 12:31:17 -07:00
Cary R 4d57ede0e5 Warn that events can not be user task or function arguments.
This patch makes events passed as arguments to user tasks or functions
a compile time error with an appropriate error message.
2009-09-13 08:21:41 -07:00