Commit Graph

5432 Commits

Author SHA1 Message Date
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
Stephen Williams 9c516a9d53 Changes to real nets generate callbacks.
Generate the missed callbacks when real values change. In the
process, unify the use of the filterter_mask_ method for scalar
types.
2009-09-07 21:22:00 -07:00
Stephen Williams 0d70adfc47 The .alias node degenerates to .net nodes.
Now that .net nodes are references to filters into vvp_net_t objects
and are no longer functors on their own, the .alias node becomes
exactly the same as a .net itself.
2009-09-07 20:44:47 -07:00
Stephen Williams cbf3793ee6 Net support for arrays handles 2-pass resolution. 2009-09-07 18:59:21 -07:00
Stephen Williams 9b19e3bcf2 Implement support for net arrays. 2009-09-06 21:35:08 -07:00
Stephen Williams 0018cb38b0 Merge branch 'master' into vvp-net-out-rework
Conflicts:
	vvp/schedule.cc
	vvp/schedule.h
2009-09-05 10:19:20 -07:00
Stephen Williams 5be1b25726 Release filter accounts for net vs variable.
When releasing a net, the release needs to propagate the driven
value. When releasing a variable, the driven value must be set
to the previously forced value.
2009-09-04 21:37:31 -07:00
Stephen Williams 3de02ede8b Remove dead code release methods.
The release methods attached to signal functors are dead code.
2009-09-03 21:24:52 -07:00
Stephen Williams 1ea0d40208 Remove "net" flag to release methods.
This flag is redundant. The behavior should be handled in other ways.
2009-09-03 21:15:35 -07:00
Nick Gasson face1a1d15 Allow labelled begin blocks to contain processes in VHDL target
This is a simple fix for a crash that occured when a process
was inside a labelled begin inside a generate statement.
2009-09-03 17:13:41 -07:00
Nick Gasson 388c9c6747 Handle generate scopes with signals in VHDL target
This uniques the name of each copy of a signal and adds
it to the containing VHDL entity.
2009-09-03 17:13:33 -07:00
Nick Gasson bc7ec04cab Translate simple generate loops to VHDL
This handles generate loops and genvars with no local variables
2009-09-03 17:13:27 -07:00
Cary R 5f08f40cad Remove old configure files in vvp directory. 2009-09-03 17:10:36 -07:00
Cary R 9a4cd1af32 Add support for non-blocking assignment to real arrays.
This patch adds support for the various types of non-blocking
assignments to real arrays.
2009-09-03 17:07:17 -07:00