OpenCores
URL https://opencores.org/ocsvn/ahb2wishbone/ahb2wishbone/trunk

Subversion Repositories ahb2wishbone

[/] [ahb2wishbone/] [trunk/] [svtb/] [avm_svtb/] [ahb_wb_coverage.svh] - Blame information for rev 10

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 toomuch
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
//*****************************************************************************************************************
3
// Copyright (c) 2007 TooMuch Semiconductor Solutions Pvt Ltd.
4
//
5
//File name             :       ahb_wb_coverage.svh
6
//Designer              :       Sanjay kumar
7
//Date                  :       3rd Aug'2007
8
//Description           :       ahb_wb_coverage:Class to receive monitor packets from publisher(monitor) and check
9
//                              for Functional coverage.
10
//Revision              :       1.0
11
//*****************************************************************************************************************
12
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
13
 
14
import avm_pkg::*;
15
import global::*;
16
 
17
class ahb_wb_coverage extends avm_threaded_component;
18
 
19
analysis_fifo#(monitor_pkt) ap_fifo; // analysis port fifo
20
analysis_if#(monitor_pkt) ap_if; // analysis port  interface
21
 
22
// local variables
23
logic [AWIDTH-1:0]adr1;
24
logic [AWIDTH-1:0]adr2;
25
logic [DWIDTH-1:0]dat1;
26
logic [DWIDTH-1:0]dat2;
27
bit sel,wr;
28
bit [1:0]mode;
29
 
30
// monitor packet
31
monitor_pkt m_pkt;
32
 
33
// coverage group
34
covergroup cov_wr;
35
         write_read: coverpoint wr; // cover read/write
36
         wr_with_wait_mst: cross  wr,mode;// cover read/write on wait state by master
37
         wr_with_wait_slv: cross  wr,sel;// cover read/write on wait state by slave
38
 
39
endgroup
40
 
41
        function new(string name ,avm_named_component parent);
42
                super.new(name,parent);
43
                ap_fifo  =new("ap_fifo",this);
44
                ap_if =null;
45
                cov_wr=new;
46
        endfunction
47
 
48
// connecting analysis fifo  to the analysis interface
49
function void export_connections();
50
        ap_if = ap_fifo.analysis_export;
51
endfunction
52
 
53
 
54
 
55
 
56
task run;
57
        forever
58
        begin
59
                ap_fifo.get(m_pkt); // receiving monitor_pkt from monitor
60
                // sampling the values of pkt to local variables
61
                sel=m_pkt.sel;
62
                wr=m_pkt.wr;
63
                mode=m_pkt.mode;
64
                // sample the coverpoints
65
                cov_wr.sample();
66
 
67
        end
68
endtask
69
 
70
endclass
71
 
72
 
73
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.