Hello Suraj,

I've updated the vpi.rb, updated runner_boot_loader.rb, and
re-ran my simulation and now I'm getting the following results
with vcs.

@6 clk0 PosEdge seen
@8 clk1 PosEdge seen
@16 clk0 PosEdge seen
@22 clk1 PosEdge seen
@26 clk0 PosEdge seen
@36 clk1 PosEdge seen
@36 clk0 PosEdge seen
@46 clk0 PosEdge seen
@50 clk1 PosEdge seen
@64 clk1 PosEdge seen
$finish at simulation time                19995

Calvin

Suraj Kurapati wrote:

The revised concurrency implementation (which I checked in last night)
works fine with your example:

 $ rake -f test2_runner.rake cver
 (in /home/sun/tmp/calvin)
 cver 
+loadvpi=/home/sun/src/ruby-vpi/obj/cver.so:vlog_startup_routines_bootstrap
test2.v
 GPLCVER_2.11a of 07/05/05 (Linux-elf).
 Copyright (c) 1991-2005 Pragmatic C Software Corp.
   All Rights reserved.  Licensed under the GNU General Public License (GPL).
   See the 'COPYING' file for details.  NO WARRANTY provided.
 Today is Thu Aug  9 09:14:22 2007.
 Compiling source file "test2.v"
 Highest level modules:
 test2

 @5 clk0 seen 1 times
 @7 clk1 seen 1 times
 @15 clk0 seen 2 times
 @21 clk1 seen 2 times
 @25 clk0 seen 3 times
 @35 clk1 seen 3 times
 @35 clk0 seen 4 times
 @45 clk0 seen 5 times
 @49 clk1 seen 4 times
 @63 clk1 seen 5 times
 Halted at location **test2.v(8) time 50000 from call to $finish.
   There were 3 error(s), 50001 warning(s), and 0 inform(s).


Here is the relevant source code for this example:

File "test2.v":

 module test2;
   reg clk0; initial clk0 = 1'b0;
   reg clk1; initial clk1 = 1'b0;

   initial forever #5 clk0 =~ clk0;
   initial forever #7 clk1 =~ clk1;

   initial #50000 $finish;
 endmodule


File "test2_spec.rb":

 process do
   5.times do |i|
     wait until Test2.clk0.posedge?
     puts "@#{simulation_time} clk0 seen #{i+1} times"
   end
 end

 process do
   5.times do |i|
     wait until Test2.clk1.posedge?
     puts "@#{simulation_time} clk1 seen #{i+1} times"
   end
 end


See if you can reproduce the same output.

Reply via email to