Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #816

Very strange behavior with $warning

Added by Jonathon Donaldson about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
WrongRuntimeResult
% Done:

0%


Description

I have attached a minimal example that reproduces this issue. The issue occurs with both C++ and SystemC, however I have only provided a C++ example. It also occurs on both my windows and linux machines. I am using the very latest Git repo version: 3.863

My design is as follows:

module our;

initial begin
  assert (1==0) else begin
    $warning ("3 reals: (%f), (%f), (%f)\n", 1.0, 2.5, 5.3); // this outputs gibberish
  end
  $finish;
end

endmodule

When executed the result is this:

[4612811918334230528] %Warning: our.sv:7: Assertion failed in TOP.v: 3 reals: (5.300000), (1.000000), (0.000000)

Ummm...what is that? Haha.

Also, my sc_time_stamp() function is set to always return 0.0. So not sure where that huge number is coming from.

Additionally, if I replace $warning with $error it causes a core dump. If I use either $display or $write it executes just fine.

Any ideas? Let me know if you need any other info.

example.zip - example source code (852 Bytes) Jonathon Donaldson, 09/05/2014 01:41 AM

History

#1 Updated by Wilson Snyder about 5 years ago

  • Status changed from New to Resolved
  • Assignee set to Wilson Snyder

Simple enough, fixed in git towards 3.863.

#2 Updated by Jonathon Donaldson about 5 years ago

Holy cow that was fast. $warning works great now. Thanks!!

However, if you replace $warning with $error it still core dumps as mentioned. Guess the $error core dump is unrelated to the $warning issue. If you want I can create a separate bug ticket...?

#3 Updated by Wilson Snyder about 5 years ago

  • Subject changed from Very strange behavior with $warning and $error to Very strange behavior with $warning

I was hoping $error was the same problem. Yes, I'll need an example and a new bug would be appreciated.

#4 Updated by Wilson Snyder about 5 years ago

  • Status changed from Resolved to Closed

In 3.864.

Also available in: Atom