Commit Graph

4810 Commits

Author SHA1 Message Date
Stephen Williams 5dfecb3789 Remove useless Link instance number. 2008-09-10 07:29:23 -07:00
Cary R 088c7f3feb Add calculated delay, real valued, non-blocking assignments.
This patch add the ability to do a non-blocking assignment
for real values using a non-constant (calculated) delay.
2008-09-09 20:09:49 -07:00
Cary R 3982781e97 Add cast to remove warning. 2008-09-09 19:24:14 -07:00
Larry Doolittle f233793061 Spelling fixes
No code changes.
2008-09-09 19:21:42 -07:00
Larry Doolittle 8704e3e34f Compatibility with gcc-4.3
Add "include"s to fix errors flagged by gcc-4.3.2
2008-09-09 19:19:51 -07:00
Stephen Williams 05f129211e Remove the elaborate_net methods.
These methods are no longer in use, their functionality taked over
by a compination of elab_and_eval and NetExpr::synthesize methods.
2008-09-08 21:26:26 -07:00
Stephen Williams eb9d037bf0 Remove elaborate_net from all elaborations.
Use elaborate_expr and synthesize() methods in place of the
elaborate_net methods, so that elaboration is more consistent.
2008-09-08 19:13:49 -07:00
Stephen Williams 90f55a1d00 Merge branch 'elaborate-net-rework' 2008-09-08 18:02:51 -07:00
Stephen Williams 527f5c4849 The -V flag gets version information from all parts.
When the -V flag is passed to the iverilog command, we can easily
print the version information for the driver itself, but it is also
valuable to probe all the components that would have been used for
a real compile. So the driver executes the preprocessor and the ivl
core to have them print version information.

The ivl core program also tries to load the target code generator
and get version information to print. For this to work, create a new
optional entry point "target_query" that takes a query key string as
an argument and returns a const string as the result. Use this with
the key "version" to get version information out of the target.
2008-09-07 21:54:46 -07:00
Stephen Williams 4898cd04c6 Remove redundant back-end selections.
Target selection is done by the DLL target code generator, so there
is no value having a layer of target selection ahead of it. Remove
all that redundant code and simplify the target config files to reflect
this.
2008-09-07 16:43:54 -07:00
Stephen Williams 6411e96193 Generate delay devices for sign-extend devices.
It is possible for signe-extend to have a delay attached to it. (Same
for repeat.) Handle it like other LPM devices, by stuffing a .delay
device into the output path of the device, if appropriate.
2008-09-06 18:05:18 -07:00
Stephen Williams dd47599d55 Merge branch 'master' into elaborate-net-rework 2008-09-06 17:20:14 -07:00
Stephen Williams 8717a85f7f Prepare for snapshot 20080905 2008-09-05 17:44:41 -07:00
Cary R 5bf55485d5 Pass file and line number information for expression constants.
This patch passes the file and line number information for
constants that are used in expressions.
2008-09-05 17:33:45 -07:00
Stephen Williams 38970fea65 Merge branch 'vhdl' 2008-09-05 14:40:48 -07:00
Cary R 90fbac6e33 Add callbacks to vpiMemory objects.
This patch adds the ability to set a global array callback.
These type of callbacks will be called when any element of
the array changes.
2008-09-04 21:37:50 -07:00
Larry Doolittle 66949122cf Non-controversial whitespace cleanup
Nothing to do with tab width!  Eliminates useless
trailing spaces and tabs, and nearly all <space><tab>
pairings.  No change to derived files (e.g., .vvp),
non-master files (e.g., lxt2_write.c) or the new tgt-vhdl
directory.

Low priority, simple entropy reduction.  Please apply
unless it deletes some steganographic content you want
to keep.
2008-09-04 21:31:30 -07:00
Stephen Williams 6f002935d7 Parse attributes on statements within event statements.
Statements can have attributes attached to them. Handle a few cases in
the parser where attributes may be attached to statements, and get them
as far as the pform.
2008-09-04 21:27:21 -07:00
Stephen Williams 5f0b723534 Merge branch 'master' into elaborate-net-rework 2008-09-03 19:59:31 -07:00
Cary R 7beb059d90 Add blocking repeat event control, make repeat sign aware
This patch adds blocking repeat event controls and also makes the
base repeat statement sign aware. If the argument to repeat is
negative (it must be a signed variable) then this is treated just
like an argument of 0 (there is no looping). Doing this allows us
to model the repeat event control as follows.

  lhs = repeat(count) @(event) rhs;

is translated to:

  begin
    temp = rhs;
    repeat (count) @(event);
    lhs = temp;
  end

This patch also pushes the non-blocking event control
information to the elaboration phase where it will report they
are not currently supported.
2008-09-03 19:35:54 -07:00
Stephen Williams 60169f6353 Get generate block scope from generate case.
The generate block is a placeholder for the generate items, and it
is the items themselves that can specify the name of the generate
block that is created.
2008-09-03 17:59:39 -07:00
Stephen Williams e4411777ed Remove unused net_force.cc source file. 2008-09-02 18:38:04 -07:00
Stephen Williams 456fffa7ed Remove last vestiges of XNF.
XNF hasn't been supported in a while. Xilinx doesn't put any effort
into it either, for that matter.
2008-09-02 18:23:48 -07:00
Nick Gasson 4cb2090978 Fix vhdl_expr::cast when expression has no assigned type
This avoids a couple of segfaults
2008-09-02 20:22:50 +01:00
Nick Gasson ff766899b0 Add IVL_LPM_CMP_GT 2008-09-02 19:07:38 +01:00
Nick Gasson 122890fef4 Make sure LPM expression is cast to the output type
This fixes some signed/unsigned bugs identified by the signedX tests.
2008-09-02 19:02:54 +01:00
Cary R 1944f372c5 Fix a couple uninitialized value problems found with tgt-vhdl.
This patch fixes two uninitialized variable problems found
with valgrind when testing the VHDL code generator.
2008-09-01 21:23:58 -07:00
Cary R 8fbfdffe91 Allow .array/port input access generate statement.
For nested array accesses the .array/port statement must
evaluate its input argument before it starts printing the
actual .array/port statement.
2008-09-01 14:04:51 -07:00
Larry Doolittle 23127852c7 Compatibility with gcc-4.3
Add "include" to fix error with abort() in dup_expr.cc
Add "include" to AStatement.h so usage of struct PExpr works
Get rid of eval_tree.cc:577: warning: suggest parentheses around comparison in operand of ^
2008-09-01 13:55:57 -07:00
Stephen Williams c150223a3a Fix problem with vvp_vector2_t right shift
that trips only when starting with perfectly
aligned inputs.
2008-09-01 13:55:42 -07:00
Stephen Williams c0a4b7c670 Fix a bug in vector evaluation of abs().
The calculation of the abs of a signed value
was inverting the value if it was signed,
and not if it was negative.
2008-08-30 17:35:57 -07:00
Stephen Williams 319b886118 Build files compatible with snapshot 20080830 2008-08-30 17:09:51 -07:00
Stephen Williams fc476aa281 Fix right shift of vvp_vector2_t.
The right shift of vvp_vector2_t needs to
account for and mask off shifted bits. Otherwise
there will be unexpected results after
a vvp_vector2_t::trim method.
2008-08-30 15:30:22 -07:00
Stephen Williams 49c4f2d106 Fix crash on uninitialized data. 2008-08-30 15:28:31 -07:00
Stephen Williams bc3411e28e Merge branch 'master' into elaborate-net-rework 2008-08-29 22:13:07 -07:00
Cary R 97e662d667 Remove unneeded real compare code.
The code removed is unneeded since real values are already
handled by the real specific comparison that is called at
the beginning of each function.
2008-08-29 21:16:59 -07:00
Stephen Williams f900b6d541 Add the Verilog-2005 and Verilog-AMS constant system functions.
This patch adds the constant system functions for Verilog-2005
and Verilog-AMS. These are evaluated at compile time. $abs(),
$min() and $max() support their polymorphic behavior in the
compiler where it really matters. They are always evaluated
as reals in the run time and the result/argument(s) will be
converted as needed.

The Verilog-2005 functions are available if using the 2005
generation (default) and if either the icarus-misc (also on
by default) or verilog-ams flags are set.

The Verilog-AMS functions are available if either the
icarus-misc or verilog-ams flags are set.
2008-08-29 21:11:44 -07:00
Cary R 0804eccfec Evaluate constant real EQ and NE constructs.
This patch adds code to evaluate constant == and != with real values.
2008-08-29 20:41:10 -07:00
Cary R 2e97b28185 More NaN constant fixes.
This patch cleans up %loadi/wr regarding NaN values. It also
fixes the code generator to correctly output a NaN value as
a Cr<> constant.
2008-08-29 19:32:00 -07:00
Cary R 2d3cd7cb9a Handle NaN constant in the code generator and fix loadi/wr NaN bug.
This patch fixes a bug in %loadi/wr regarding NaN values. It also
fixes the code generator to correctly output a NaN value.
2008-08-29 19:31:50 -07:00
Stephen Williams c9efe87146 Merge branch 'master' into elaborate-net-rework 2008-08-29 19:10:48 -07:00
Stephen Williams 1ca8241b88 Merge branch 'master' into verilog-ams 2008-08-29 19:03:34 -07:00
Stephen Williams 8d21c0390e Remove dead EEQ code.
The EEQ function is handled by vvp_cmp_eeq, an arithmetic expression
processor and the logic version of EEQ is never used.
2008-08-29 18:45:19 -07:00
Stephen Williams 3b778b1a06 Minor improvements to expression debug prints. 2008-08-29 18:44:45 -07:00
Stephen Williams e322cce650 Clean up $clog2() measurement of unsized numbers.
If the argument to $clog2() is unsized constant, then trim it to the
smallest representation that doesn't lose the sign, then do the $clog2
on that.

Also, use integer_width instead of 32 for the minimum $clog2() result
for a negative value.
2008-08-29 18:42:22 -07:00
Nick Gasson ed929a37bb Merge branch 'master' of git://icarus.com/~steve-icarus/verilog into vhdl 2008-08-29 18:38:49 +01:00
Stephen Williams 4c7144afc0 Remove dead EEQ code.
The EEQ function is handled by vvp_cmp_eeq, an arithmetic expression
processor and the logic version of EEQ is never used.
2008-08-28 22:08:46 -07:00
Stephen Williams 5d5228b6b8 Minor improvements to expression debug prints. 2008-08-28 21:16:44 -07:00
Stephen Williams e6c2637367 Clean up $clog2() measurement of unsized numbers.
If the argument to $clog2() is unsized constant, then trim it to the
smallest representation that doesn't lose the sign, then do the $clog2
on that.

Also, use integer_width instead of 32 for the minimum $clog2() result
for a negative value.
2008-08-28 21:15:43 -07:00
Stephen Williams 468f45b4db Merge branch 'master' into elaborate-net-rework 2008-08-28 18:17:24 -07:00