Commit Graph

5495 Commits

Author SHA1 Message Date
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
Cary R 43f41572cb Fix 64 bit problem in vvp/vpi_signal.c
This is based on a suggested fix from Martin. It fixes the crash
for two tests in the test suite. As a bonus it is more efficient.
2009-09-13 08:18:11 -07:00
Cary R 6d5d06cae4 Squash some gcc 4.3.3 warnings.
This patch clears all the gcc 4.3.3 warning that can be fixed.
The remaining warning is dictated by older versions of the
1364 standard.
2009-09-13 08:15:59 -07:00
Cary R 5a11a8a9c2 Revert one change from previous patch.
I was mistaken in changing the cast in the comparison.
2009-09-13 08:04:04 -07:00
Cary R 1b300cb2f6 Fix another 64 bit problem in a part select.
This patch fixes a problem in the .part/v select when the index is
undefined. The default value needs to be INT_MIN, so when the long
is cast to an int the value is in range.
2009-09-13 08:03:58 -07:00
Cary R 27f032760e Fix .part/v to only use a 32 bit value.
To get better functionality in V0.9 and development until we
add a select that is sign aware to .part/v this patch uses
a 32 bit integer (int) for the select value. This allows a
normal Verilog integer to produce the correct results. A
warning for smaller signed index vectors is planned, but it
needs more input.
2009-09-13 08:03:48 -07:00
Stephen Williams 72ab7b6515 Handle initialization propagation of wires.
The first input through a net needs to be propagated, since this
is used as an initialization for the net. This patch also cleans
up wires to not need the width_ member, instead inferring the
width from the saved bit value.
2009-09-12 18:46:48 -07:00
Stephen Williams 03f2432f6e Fixup real value output from user defined functions
User defined functions need to check the output from the function,
which is an unfiltered signal.
2009-09-12 12:25:18 -07:00
Stephen Williams a1295db6bf release_pv methods need t account for net_flag.
Whether and what to propagate after a release of a part needs to
match the behavior of the full-vector release. Nets need to restore
their driver, and regs need to hold their forced value.
2009-09-12 09:22:20 -07:00
Stephen Williams caab6b3834 Implement force methods for vec8 nets. 2009-09-11 21:33:24 -07:00
Stephen Williams 1a21b5843f Value change on part select needs to track the filter, not the functor. 2009-09-11 19:49:23 -07:00
Stephen Williams f0f35376cd Implement recv_vec4_pv for event functors. 2009-09-11 19:42:30 -07:00
Stephen Williams 88668e3df5 Run vpi callbacks for force/release. 2009-09-10 20:46:33 -07:00
Stephen Williams 4522e88c27 Get the initial value of a vec4 net correct. 2009-09-10 18:51:19 -07:00
Stephen Williams 14d8c6214f More fixes for real nets and arrays.
Continue to unify real net handling with vector handling.
2009-09-09 21:42:40 -07:00
Stephen Williams a58c02899b Handle filtered part selects.
filters need to be able to cope with parts of vectors moving through
the net. It makes the most sense to handle every filter as a part-
selected filter.
2009-09-08 21:42:50 -07:00
Cary R 4b50473939 Fix &A<> to support an undefined word index.
This patch adds support to &A<> for an undefined word index.
It mostly matches what was done for &PV<>.
2009-09-08 16:04:06 -07:00
Cary R 1b0dd8c8e5 Add support for 'bx from a signal to &PV<>
&PV<> was just using vpi_get_value() when a signal was driving
the select. This incorrectly returned 0 for 'bx or 'bz. This
patch adds a check for an undefined value and returns INT_MIN
for this case.
2009-09-08 16:01:14 -07:00
Cary R dff6a1ebff Add file/line information to named events and better expr. error.
This patch adds file and line number information to named events.
It also modifies the draw_eval_expr_wid() routine to fail with
an appropriate message for named events. This checking needs to
be pushed into the elaboration stage, but this will give a better
message than we had before.
2009-09-08 15:58:24 -07:00
Martin Whitaker fc49420cb5 Add user control over implicit sensitivity list warnings.
This patch adds two new warning classes that can be enabled or
disabled via the -W command line option. The first controls
whether a warning is generated if a part select within an
always @* statement causes the entire vector to be added to
the implicit sensitivity list. The second controls whether a
warning is generated if a word select within an always @*
statement causes the entire array to be added to the implicit
sensitivity list. The first class is not automatically enabled
by -Wall, the second class is.
2009-09-08 15:44:45 -07:00