( ESNUG 296 Item 7 ) ---------------------------------------------- [7/23/98]

From: Henry George Berkley <asic@netcom.com>
Subject: Chrono VCS Bug When Comparing Time & Integer Variables

Hi John,

When comparing time variables to negative integers, VCS gives erroneous
results.  One of the busses on my ASIC has a negative hold requirement.
When writing a bus monitor to check this spec, I discovered the bug.

From bug1.v:

    module bug1();
    time Tvar;
    initial begin
       Tvar = 100;
       if ( Tvar < -20 )
       $display("We have a bug.");
    end //initial
    endmodule

From bug1.log:

   Command: vcs -R bug1.v -l bug1.log
   Chronologic Simulation VCS Release 4.1.1        Tue Jul 14 17:40:49 1998
   Copyright Chronologic Simulation/Viewlogic '91-'96.  All Rights Reserved.
   This Licensed Software contains Confidential and proprietary information
   which is the property of Chronologic Simulation
   Compiling bug1.v
   Top Level Modules:
   bug1
   1 unique modules to generate
   1 of 1 modules done
   Invoking loader...
   Chronologic VCS simulator copyright 1991-1997
   Contains Viewlogic proprietary information.
   Compiler version 4.1.1; Runtime version 4.1.1;  Jul 14 17:40 1998
 
   We have a bug.
              V C S   S i m u l a t i o n   R e p o r t 
   Time: 0
   CPU Time:   0.067 seconds; Data structure size: 0.0Mb
   Tue Jul 14 17:40:59 1998

My client is running VCS 4.1.1 on a Sparc running SunOS 4.1.4

The workaround is to use real numbers.

  - Henry George Berkley
    Electronic Consulting                     Santa Cruz, CA



 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)