Presentation is loading. Please wait.

Presentation is loading. Please wait.

Easy way to debug with VCS

Similar presentations


Presentation on theme: "Easy way to debug with VCS"— Presentation transcript:

1 Easy way to debug with VCS
Jorge Ramírez Synopsys Corp Application Engineer

2 Test program DUT Test program Simulation output DUT
module test; // Interface element to communicate with the DUT logic a, b; wire c1, c2; // DUT Instantiation DUT U1 (.in1(a), .in2(b), .out1(c1), .out2(c2)); // Test program initial begin a <= 0; b <= 0; #1 a <= 0; b <= 1; #1 $finish; End // Print on screen the execution initial Begin $display ("Simulation results:"); $display ( "A | B | C1| C2|"); $display ( "=========================="); $monitor ("%d | %d | %d | %d | ", a, b, c1, c2 ); end endmodule module DUT (in1, in2, out1, out2); input in1, in2; output out1, out2; assign out1 = in1 & in2; assign out2 = in1 | in2; endmodule DUT DUT Test program Simulation output Harness test program

3 VCS compilation Compile all files with the following command (using vcs): vcs –sverilog test.sv dut.v Run the simulation by executing the binary created by VCS ./simv

4 Check the results >./simv Chronologic VCS simulator copyright Contains Synopsys proprietary information. Compiler version A ; Runtime version A ; Jan 2 14: Simulation results: A | B | C1| C2| ========================== 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | $finish called from file "test.sv", line 27. $finish at simulation time 3 V C S S i m u l a t i o n R e p o r t Time: 3 CPU Time: seconds; Data structure size: 0.0Mb Fri Jan 2 14:21:

5 System task functions $display $monitor Display one message
$display (“port A= %b”, port_a) $monitor Display a message each time a varaible or an expression in the argument list chage $monitor(“port A= %b”, port_a)

6 Escape sequence Argument Description %h or %H
Display in hexadecimal format %d or %D Display in decimal format %o or %O Display in octal format %b or %B Display in binary format %c or %C Display in ASCII character format %l or %L Display library binding information %v or %V Display net signal strength %m or %M Display hierarchical name %s or %S Display as a string %t or %T Display in current time format %u or %U Unformatted 2 value data %z or %Z Unformatted 4 value data Argument Description \n The newline character \t The tab character \\ The \ character \" The " character


Download ppt "Easy way to debug with VCS"

Similar presentations


Ads by Google