Reply To: How to use the same AxiManager in two different processes to access AXI4 slave

Why OSVVM™? Forums OSVVM How to use the same AxiManager in two different processes to access AXI4 slave Reply To: How to use the same AxiManager in two different processes to access AXI4 slave

#2669
Alex
Member

Thanks Jim. Meanwhile I am exploring functional coverage. But cannot get a simple coverage running. Please point out what is wrong here:
rx_cnt_s counts upto 20 which has been verified.
RxCov is a signal.

    rx_process : process is 
      variable cnt : integer := 0;

      variable rd_data     : std_logic_vector(31 downto 0) := (others => '0');

    begin
              rx_cnt_s <= 0;
              RxCov <= NewID("RxCov") ;                         -- Get a Coverage ID

              wait for 0 ns ;

              osvvm.CoveragePkg.AddBins(RxCov, "count", GenBin(1,20,1) ) ;     

              loop

                WaitForClock(InterruptRec, 1) ;
                report "Interrupt Handler Started" ;

                Read(InterruptRec, X"A80", rd_data);
               
                if (rd_data(10) = '1') then 

                  Read(InterruptRec, x"920", rd_data);
                  if (rd_data(30 downto 26) = rd_data(20 downto 16)) then 
                     report "RX FIFO EMPTY";
                  else
                                         
                     osvvm.TbUtilPkg.WaitForClock(clk, 2);
                     cnt := rx_cnt_s;
                     cnt := cnt + 1;
                     rx_cnt_s <= cnt;

                     
                      osvvm.CoveragePkg.ICover(RxCov, rx_cnt_s) ;      -- Collect functional coverage

                  end if;
                end if;
                report "Interrupt Handler Done" ;
                InterruptReturn(InterruptRec) ;
                wait for 1 ns ;                

              end loop;
              osvvm.CoveragePkg.WriteBin(RxCov); --print results
              wait;

    end process;

The Yaml file reports zero coverage:

Version: "1.0"
Coverage: 0.00
Settings: 
  WritePassFail: 0
Models: 
  - Name: "RxCov"
    TestCases: 
      - "count"
    Coverage: 0.00
    Settings: 
      CovWeight: 1
      Goal: 100.0
      WeightMode: "AT_LEAST"
      Seeds: [1129194420, 352562534]
      CountMode: "COUNT_FIRST"
      IllegalMode: "ILLEGAL_ON"
      Threshold: 45.0
      ThresholdEnable: "FALSE"
      IsRequirement: "FALSE"
      TotalCovCount: 0
      TotalCovGoal: 1
    BinInfo: 
      Dimensions: 1
      FieldNames: 
        - "Bin1"
      NumBins: 1
    Bins: 
      - Name: "count"
        Type: "COUNT"
        Range: 
          - {Min: 1, Max: 20}
        Count: 0
        AtLeast: 1
        PercentCov: 0.0000