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).
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.
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.
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.
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.
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.
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.
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.
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.
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)
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.
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.
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.
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.
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.
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.
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.
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.