Commits on Nov 17, 2008
  1. Correct and enhance some debug_elaborate messages

    Make port number self-consistent, starting at 1.
    Add messages marking the start and stop of recursive elaboration.
    ldoolitt committed with Nov 16, 2008
  2. Quiet compiler warnings

    Eliminate three "warning: suggest parentheses around assignment used as truth value"
    Obviously not needed, but it's easier to add the superfluous parentheses
    than remember that these warnings are benign.
    ldoolitt committed with Nov 16, 2008
Commits on Nov 16, 2008
  1. Fix special case that one of the arguments of a compare is a real exp…

    If one of the arguments of a comparison expression has a real value, then
    the expression with is 1 no matter the width of the other argument. This
    means that the arguments may have different widths in this special case.
    Patch is from pr2251119, suggested by Martin Whitaker.
    committed Nov 16, 2008
  2. Improved automatic variable error reporting.

    This patch moves the checks for automatic variables being passed to
    the $monitor or $strobe system tasks from the calltf routine to a
    new compiletf routine. It also adds the file name and line number
    of an offending call to the error message.
    Martin Whitaker committed with Nov 15, 2008
  3. Fix select from non-variable-reference error (pr2281519)

    VHDL can't select bits from arbitrary expression so sometimes
    translating IVL_EX_SELECT would fail. This is easily fixed by
    replacing the select with a shift in this instance (and the
    nickg committed with Nov 14, 2008
Commits on Nov 15, 2008
  1. Fix for pr2276163.

    The VVP %join function was incorrectly treating the return from a
    non-automatic function as a return from an automatic function in
    the case that the non-automatic function result was being used as
    a parameter to an automatic function. This patch fixes this error.
    Martin Whitaker committed with Nov 15, 2008
  2. Add support for the 1364-2001 generate of a named block.

    This is obsolete in 1364-2005, but is supported 1364-2001.
    Icarus already supported generate with unnamed block.
    caryr committed with Nov 15, 2008
  3. Avoid crash with typo in varaible name

    A simple typo in the rhs of an expression would crash the compiler.
    module crash3;
    reg clk;
    integer cnt1=0;
    always @(posedge clk) begin
            cnt1 <= (cnt==81) ? 0 : (cnt1+1);
    ldoolitt committed with Nov 14, 2008
  4. Add support for arrayed instances with inout ports.

    A NetTran (TRAN_VP) can be used to connect arrayed instance inout
    ports. This allows bi-directionality and conflict resolution.
    caryr committed with Nov 14, 2008
  5. Shifting a signed constant should just return the L-value.

    We already covered the case of shifting zero, but the case of
    shifting a signed constant was missed.
    caryr committed with Nov 14, 2008
Commits on Nov 13, 2008
  1. Rework $plusarg routines.

    This patch addresses a number of issues:
    Rewrote the $test$plusargs and $value$plusargs routines to have
    better error/warning messages, to support runtime strings, to
    correctly load bit based values (truncating, padding, negative
    value), added support for the real formats using strtod() and
    added "x/X" as an alias for "h/H" to match the other part of
    Rewrite the vpip_{bin,oct,hex}_str_to_vec4 routines to ignore
    embedded "_" characters. Add support for a negative value and
    set the entire value to 'bx if an invalid digit is found. A
    warning is printed for this case.
    Rewrite vpip_dec_str_to_vec4 to ignore embedded "_" characters,
    to support a single "x" or "z" constant and to return 'bx if an
    invalid digit is found. A warning is printed for this case.
    It simplifies the system task/functions error/warning messages.
    It removes the signed flag for the bin and dec string conversions.
    This was not being used (was always false) and the new negative
    value support makes this obsolete.
    Add support for a real variable to handle Bin, Oct, Dec and Hex
    strings. They are converted into a vvp_vector4_t which is then
    converted to a real value.
    Add support for setting a bit based value using a real value.
    Removed an unneeded rfp signal in vpip_make_reg()
    caryr committed with Nov 13, 2008
  2. Fix for pr2271367.

    This patch fixes a bug introduced by one of the checks for illegal
    use of automatically allocated variables.
    Martin Whitaker committed with Nov 12, 2008
  3. Add complete list of VHDL reserved words

    make_safe_name now makes sure a VHDL signal is never given a
    name that conflicts with any reserved words. If it does, we
    just prepend VL_.
    (This code was already present, but the full list of reserved
    words wasn't.)
    nickg committed with Nov 12, 2008
  4. Merge branch 'vhdl'

    committed Nov 13, 2008
  5. Fix for leak in thread vector allocation.

    In the vvp code generator, when zero/sign extending a sub-expression,
    the sub-expression is first evaluated and stored in one location in
    the thread vector store, then is copied and extended into a second
    location. The storage used for the initial sub-expression evaluation
    is never deallocated.
    Martin Whitaker committed with Nov 12, 2008
  6. Fix bug generating code for shift of constant zero.

    The code generator detects this case, but instead of returning the
    constant zero, it breaks out and writes partial code for the shift.
    committed Nov 13, 2008
  7. Make the associative sum constant elimination more resilient to size …

    The NetEBAdd::eval_tree method is able to use the associative property
    of addition to reduce some constants, but it is picky about widths.
    Make it a little bit more resilient to expression widths.
    committed Nov 13, 2008
Commits on Nov 12, 2008
  1. Fix overly restrictive check for slices

    Fixes some instances of "can only select from a variable reference"
    nickg committed Nov 12, 2008
  2. Scan concat arguments with test_width.

    Even though we cannot immediately give a width for a concatenation
    that has a repeat expression (the expression must be evaluated first)
    we still must scan the test_width of the arguments so that they can
    resolve their types.
    committed Nov 12, 2008
  3. Checks for illegal use of automatically allocated variables.

    This patch adds a number of compile and run-time checks for illegal
    uses of variables declared in automatic tasks and functions. It
    also adds a check for event expressions in automatic tasks that use
    features not yet supported in VVP.
    Martin Whitaker committed with Nov 9, 2008
Commits on Nov 8, 2008
  1. Fix numerous problems with the divide and modulus operators.

    This patch fixes a number of problems related to the divide and
    modulus operators.
    The net version (CA) of modulus did not support a signed version.
    Division or modulus of a value wider than the machine word did
    not correctly check for division by zero and return 'bx.
    Fixed a problem in procedural modulus. The sign of the result is
    only dependent on the L-value.
    Division or modulus of a signed value that was the same width as
    the machine word was creating an incorrect sign mask.
    Division of a signed value that would fit into a single machine
    word was not checking for division by zero.
    Division or modulus of a wide value was always being done as
    Added a negative operator for vvp_vector2_t. This made
    implementing the signed wide division and modulus easier.
    caryr committed with Nov 8, 2008
Commits on Nov 5, 2008
  1. ivlpp - clear lexor dynamic state information for flex >= 2.5.9

    For flex version 2.5.9 and later there is a function
    "yylex_destroy()" that clears any space dynamically
    allocated by the scanner.
    caryr committed with Nov 4, 2008
Commits on Nov 4, 2008
  1. Fix a memory leak and release all dynamically allocated memory (ivlpp)

    This patch fixes a minor memory leak in ivlpp and releases all
    dynamically allocated memory before the program exits. Other than
    the dynamically allocated push state buffer in flex, ivlpp has no
    valgrind memory errors or warnings.
    caryr committed with Nov 4, 2008
  2. Fix memory leak and free temp. file names to make valgrind happy.

    There was a memory leak in the preprocess_only code (cmd was not
    being freed when the command completed successfully.  Valgrind
    was also marking the temporary file names as still reachable, so
    they are not memory leaks, but freeing them makes valgrind happier.
    caryr committed with Nov 3, 2008
  3. Merge branch 'verilog-ams'

    committed Nov 4, 2008
  4. Print `include comment after included text.

    The inline comment text that appears after an `include directive
    should appear after the included text not before.
    caryr committed with Nov 3, 2008
Commits on Nov 3, 2008
  1. Remove svector class from Module.h

    The goal is to completely remove the svector class because the standard
    vector class works perfectly well. This removes the uses in the Module.h
    header file.
    committed Nov 3, 2008
Commits on Nov 2, 2008
  1. Bring signal discipline all the way to the ivl_target API.

    Signals may have VMA disciplines attached. Make the attached discipline
    visible through the ivl_target.h API. Also, re-arrange the internal
    handling of the discipline structure so that we can expose disciplines
    through the ivl_target C API without creating new structures. The
    t-dll-api implementations of the discipline access functions can look
    at the elaborated discipline structure directly. This is possible since
    the discipline parse and elaboration are very simple.
    committed Nov 2, 2008
  2. Add support for real/realtime arrays.

    Support arrays of realtime variable arrays and net arrays. This
    involved a simple fix to the ivl core parser, proper support in
    the code generator, and rework the runtime support in vvp.
    committed Nov 2, 2008