Permalink
Commits on Mar 14, 2008
  1. Update to 20080314 snapshot

    steveicarus committed Mar 14, 2008
Commits on Mar 13, 2008
  1. NetESignal::dup_expr() was not passing the word_ information.

    caryr committed with steveicarus Mar 12, 2008
    The dup_expr() function for NetESignal was not copying the word_
    expression. This would cause an individual array access to turn
    into an entire array access. The file and line information was
    also not being set correctly.
    
    An assert() in tgt-vvp/eval_expr.c was also replaced with an
    exit() since the appropriate information was already being
    printed.
Commits on Mar 12, 2008
  1. Add \' as a string constant to block macro expansion.

    caryr committed with steveicarus Mar 12, 2008
    This patch allows you to type "The \`define is `value" and not have
    Icarus try to expand `define as a macro.
  2. Add bit/part select release for constants and add an error check.

    caryr committed with steveicarus Mar 11, 2008
    This patch adds functionality to do a bit or part select release
    when a constant value is forced to the net/register. It also adds an
    error message when the user tries to force a signal to a bit/part
    select. This is not currently handled by the run time, so is now
    caught in the compiler (tgt-vvp). Where when this functionality is
    needed, it will be easy to know what to do instead of trying to track
    down some odd runtime functionality.
    
    What this all means is that you can force a signal to an entire
    signal or you can force a constant to any part of a signal (bit,
    part or entire) and release any of the above. Technically the
    release of a constant value does not have to match the force.
    The runtime verifies that if you are releasing a signal driver
    it is being done as a full release. I don't see an easy way to
    check this in the compiler.
    
    To fix the signal deficiencies we need to rework the force_link
    code to allow multiple drivers and partial unlinking. Much of
    this is in the runtime, but the %force/link operator may also
    need to be changed like I did to the %release opcode.
  3. Improve error message in tgt-vvp/eval_expr.c:draw_eval_expr_wid().

    caryr committed with steveicarus Mar 10, 2008
    The IVL_EX_NONE type was not displaying any message and default did not
    use the new ivl_expr_{file,lineno} functions to get the source location.
    This patch remedies these problems.
Commits on Mar 11, 2008
  1. Minor cleanup of vpi_put_value to wire

    steveicarus committed Mar 11, 2008
    Comments to clarify the vpiForceFlag and vpiReleaseFlag behaviors.
  2. Support vpiForceFlag and vpiReleaseFlag for nets.

    steveicarus committed Mar 11, 2008
    vpi_put_value can mimic force and release with vpiForceFlag and
    vpiReleaseFlag flags to the vpi_put_value call. With this patch,
    the infrastructure is added to allow the flags argument to be passed
    to the dispatched put_value function, and for signals handle those
    flags as force/release of a net.
Commits on Mar 9, 2008
  1. Major rework of the ternary operator elaboration code.

    caryr committed with steveicarus Mar 8, 2008
    This patch reworks much of the ternary code to short circuit when
    possible and supports real values better. It adds a blend operator
    for real values that returns 0.0 when the values differ and the value
    when they match. This deviates slightly from the standard which
    specifies that the value for reals is always 0.0 when the conditional
    is 'bx. There are also a couple bug fixes.
    
    These fixes have not been ported to continuous assignments yet.
    Ternary operators used at compile time and in procedural assignments
    should be complete (short circuit and support real values).
Commits on Mar 7, 2008
  1. Fix a small bug in the extra digits warning.

    caryr committed with steveicarus Mar 6, 2008
    There were a couple places where a normal decimal number was
    accidentally setting the base for an unsized number. This is
    only a warning problem.
  2. Connect module instance arrays MSB to MSB.

    steveicarus committed Mar 7, 2008
    When a bit port of a module instance is connected to a vector
    argument, the MSB module instance should be connected to the MSB
    of the vector argument. This matters only in the rare case that
    the %m is used. It also makes wave dumps come out right.
Commits on Mar 5, 2008
  1. ivlpp: Fixed handling of absolute paths

    Michael Witten committed with steveicarus Mar 5, 2008
    The updates to the do_include code destroyed the
    handling of absolute paths; all of the code that
    handles buffer-switching was erroneously placed
    in just the relative-path branch. Thanks go to
    Cary R. for pointing out the problem.
    
    Now the common code has been extracted yet again,
    and the notorious goto statement has been used
    in favor redundancy.
    
    The test vvp_reg.pl produces the same output as
    before, so hopefully nothing new is broken.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>
Commits on Mar 4, 2008
  1. Keep processes in proper lexical scope

    steveicarus committed Mar 4, 2008
    Normally processes are found in the lexical scope of a module, but
    there are special cases where processes (other then task/function
    definitions) are in other lexical scopes. The most likely case is
    initilizations that are in the lexical scope where the assigned
    variable is declared.
    
    In the process, the behaviors list is kept in the base PScope class
    instead of the Module or any other derived lexical scope class.
Commits on Mar 3, 2008
  1. Add vvp_fun_part_var::recv_vec4_pv().

    caryr committed with steveicarus Feb 28, 2008
    Add missing vvp_fun_part_var::recv_vec4_pv() function. This is mostly
    a duplicate of the _pv() routine from vvp_fun_part.
  2. Fix lexical scopes within case-generate alternatives.

    steveicarus committed Mar 3, 2008
    Case-generate alternatives create sub-scopes that need to be scanned
    by the scope scanner in order to get function definitions etc. that
    are defined lexically within generated scopes.
Commits on Feb 28, 2008
  1. elaborate_sig for generated case items

    steveicarus committed Feb 28, 2008
    Handle elaborate_sig for scopes that are within a case-generated
    scheme.
  2. Convert real array index to integer.

    caryr committed with steveicarus Feb 27, 2008
    This patch converts a constant real index to an integer value when
    defining an array. This can happen when using 2**8 which returns a
    real value since the operands are signed.
  3. Propagate file and line information in more places.

    caryr committed with steveicarus Feb 27, 2008
    There where a few places that were not propagating the file and
    line information.
  4. Remove index register restrictions on ix/arith instructions.

    steveicarus committed Feb 28, 2008
    The %ix/<arith> instructions are currently not in use, but even so
    it is just plain wrong to restrict their register argument to 0-3.
  5. Fix %ix/load to work with all index registers.

    caryr committed with steveicarus Feb 27, 2008
    draw_number_bool64() in tgt-vvp/eval_bool.c was using %ix/load to
    load immediate values into registers greater than three. The problem
    was that of_IX_LOAD() in vvp/vthread.cc was masking off the upper
    bits. This was putting the results in the wrong register. This patch
    removes the bit masking from of_IX_LOAD() and updates the %ix/load
    documentation.
Commits on Feb 26, 2008
  1. Fix some problems in driver-vpi/main.c

    caryr committed with steveicarus Feb 23, 2008
    Fixed a few problems in driver-vpi/main.c that were preventing
    the Verilog-A math library from compiling.
Commits on Feb 25, 2008
  1. Add power operator synthesize().

    caryr committed with steveicarus Feb 22, 2008
    This patch adds synthesize() for the power operator.
  2. ivlpp: Cleanup: Formatting/Detabification

    Michael Witten committed with steveicarus Feb 21, 2008
    The file lexor.lex was beginning to suffer a catastrophic
    increase in entropy due mainly to the mingling of spaces
    and tabs--an age-old problem that often finds itself as
    the subject of many a religious war.
    
    The key rule: Make it consistent in as many editors as
    possible; this was achieved by converting all hard tabs
    into soft tabs (composed of spaces) of width 4.
    
    I couldn't help but make modifications to the code as I
    tabifified, but most of the changes are strictly style.
    
    While maintainers generally treat large scale whitespace and
    formatting changes with much caution, I believe that the code
    is now much more maintainable; moreover, the test suite
    produces the same results as before.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>
  3. ivlpp: Error checking for macro names

    Michael Witten committed with steveicarus Feb 15, 2008
    Macro names cannot be compiler directive names.
    Such trespasses are now recognized and reported:
    
        (1) Offending `define lines are skipped.
    
        (2) Offending macros meant to be expanded
            are replaced with nothing.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>
  4. Add user function synth and clean up expression code.

    caryr committed with steveicarus Feb 22, 2008
    This patch adds synthesize() for user functions. It also cleans up a
    number of inconsistencies and missing checks in the expression code.
  5. Merge branch 'pscope'

    steveicarus committed Feb 25, 2008
  6. Rework handling of lexical scope

    steveicarus committed Feb 25, 2008
    Move the storage of wires (signals) out of the Module class into
    the PScope base class, and instead of putting the PWires all into
    the Module object, distribute them into the various lexical scopes
    (derived from PScope) so that the wire names do not need to carry
    scope information.
    
    This required some rewiring of elaboration of signals, and rewriting
    of lexical scope handling.
Commits on Feb 21, 2008
  1. Add support for unary +/- in real parameter evaluation.

    caryr committed with steveicarus Feb 20, 2008
    This patch adds support for unary + and - of real value constants
    to the eval_tree() functionality.
  2. Print an error message if $fscanf() is called with a NULL fd.

    caryr committed with steveicarus Feb 18, 2008
    If $fscanf() is called with a NULL file descriptor an appropriate
    error message is printed and the program exits.
Commits on Feb 19, 2008
  1. Fix a realloc size error and initialize enable_ in the dff.

    caryr committed with steveicarus Feb 18, 2008
    The buffer reallocation in scan_format_string() was one character
    too small. The enable_ pin to the dff primitive was not given an
    initial value.
  2. ivlpp: Slight rearrangement of do_include()

    Michael Witten committed with steveicarus Feb 16, 2008
    The ordering of the logic was a little strange before.
    Also, there were unnecessary operations, like the assert
    and the include_dir[0]=0 business.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>
  3. ivlpp: Fixed include_path inconsistency

    Michael Witten committed with steveicarus Feb 16, 2008
    Discussions online and "standards" documents are never
    conclusive, but the code that was present suggests that
    iverilog adopts the sane practice of resolving relative
    paths against the directory of the file that is currently
    being processed.
    
    Unfortunately, when a relative path is made absolute, the
    code forgot to update the necessary include_stack_t object.
    
    This has now been fixed.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>
  4. ivlpp: Removed yywrap() to handle EOF more sanely

    Michael Witten committed with steveicarus Feb 15, 2008
    When the lexical analyzer encounters and EOF, the
    analyzer invokes yywrap() to determine what to do
    next. The function determines one of two paths of
    execution:
    
    	(1)	If yywrap() returns 0, then the analyzer
    		assumes that yywrap() has setup a new input
    		source, and so scanning continues.
    
    	(2)	If yywrap() returns non-zero, then the analyzer
    		assumes that yywrap() has not setup a new input
    		source, and so the analyzer proceeds to run the
    		matching EOF action (the default of which invokes
    		yyterminate()).
    
    	NOTE:	The analyzer does not touch the start condition.
    
    The old implementation was using yywrap() to destroy the current
    input source and setup the next one. However, this causes problems
    when the analyzer is in the middle of parsing some directive:
    
    	(1)	Because yywrap() is called before any EOF action,
    		the include_stack_t structure is destroyed before
    		being used in the EOF action; the result is a segfault.
    
    	(2)	Because yywrap() does not change the start condition,
    		any EOF action would occur completely out of context;
    		however, because of (1), this problem never cropped
    		up.
    
    The new implementation simply:
    
    	(1)	Employs "%option noyywrap", which effectively causes
    		the analyzer to act as though yywrap() produces a non-zero.
    
    	(2)	Renames yywrap "load_next_input".
    
    	(3)	Calls load_next_input() explicitly in exhaustive EOF actions,
    		so that control is more fine grained.
    
    The added benefit is that the code that finishes parsing EOF terminated
    directives now works properly; `include and `define directives previously
    segfaulted in such situations.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>
  5. ivlpp: Formatting/Simplification

    Michael Witten committed with steveicarus Feb 15, 2008
    Code is now shared among rules.
    
    Signed-off-by: Michael Witten <mfwitten@mit.edu>