Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to proving the clocking block in systemverilog with ncverilog and simvision?

Status
Not open for further replies.

u24c02

Advanced Member level 1
Joined
May 8, 2012
Messages
404
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,101
Hi.
I want to prove clocking statement in systemverilog by using simvision. I can't prove the inside clocking block(module tb).


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
module top();
    logic clk;
    initial begin
    clk =0;
    forever #5 clk= ~clk;
    end
    itf u_itf(.clk(clk));
    dut u_dut(u_itf);
    tb_u_tb(u_itf);
 
initial begin
$shm_open("./shm");
$shm_probe(top,"AS");
end
 
endmodule
 
    module tb (itf tb);
    initial begin
    tb.read <= 0;
    repeat(3) #10 tb.read <= ~tb.read;
    $finish;
    end
 
    always @(posedge tb.clk) begin
    tb.cb.read <=tb.cb;
    if (tb.cb.enable)
    tb.data  <= tb.data+1;
    end
 
    initial begin 
    tb.data =0;
    end
 
    endmodule
 
    module dut(itf dut_itf);
    always  @(posedge dut_itf.clk) begin
    if (dut_itf.read)
    dut_itf.enable <= 1;
    end
 
    initial begin 
    dut_itf.enable <= 0;
    end
    endmodule
 
    interface itf(input clk);
    logic read,enable;
    logic [7:0]  addr, data;
    modport dut(input read, addr, output data, enable);
    modport tb(clocking cb);
    
    clocking cb@(posedge clk);
    default input #3ns //output #5ns; //Here is my test point.
    output data, addr, read;
    input enable;
    endclocking
 
    endinterface

 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top