Jump to content

How do I make multiple burst on systemverilog?


u24c02

Recommended Posts

Dear All,

Currently, I'm trying to make multiple burst on systemverilog especially the code with cadence's VIPCAT tool. 

The below code which is I've got at all

`timescale 1ps/1ps

import DenaliSvMem::*;
import DenaliSvCdn_ahb::*;

class myAhbInstance extends denaliCdn_ahbInstance;
    denaliMemInstance regInst ; // Handle to the register-space        

    function new(string instName);
        super.new(instName);
        regInst = new( { instName, "(registers)" } ); 
    endfunction

endclass

// Test module
module pstest;

   // Import the DDVAPI ACE SV interface and the generic Mem inetrface
   import DenaliSvCdn_ahb::*;
   import DenaliSvMem::*;

   ahb_top ahb_top();

   test2 M0(
              .HCLK(ahb_top.hclk),
              .HRESET(ahb_top.hresetn),
              .HADDR(ahb_top.haddr0),
              .HTRANS(ahb_top.htrans0),
              .HWRITE(ahb_top.hwrite0),
              .HSIZE(ahb_top.hsize0),
              .HBURST(ahb_top.hburst0),
              .HPROT(ahb_top.hprot0),
              .HWDATA(ahb_top.hwdata0),
              .HRDATA(ahb_top.hrdata),
              .HREADY(ahb_top.hready),
              .HRESP(ahb_top.hresp),
              .HLOCK(ahb_top.hlock0),
              .HBUSREQ(ahb_top.hbusreq0),
              .HGRANT(ahb_top.hgrant0)
          );

   myAhbInstance activeMaster1;

   denaliCdn_ahbTransaction burst1;



   task sendTransfers;

      burst1= new;   
      burst1.pInst = activeMaster1;
      burst1.FirstAddress = 32'h0
      burst1.Direction = DENALI_CDN_AHB_DIRECTION_WRITE;
      burst1.Kind = DENALI_CDN_AHB_BURSTKIND_INCR4;
      burst1.Size = DENALI_CDN_AHB_TRANSFERSIZE_HALFWORD;
      burst1.Data = new [8];

        foreach (burst1.Data[ii])
        burst1.Data[ii] = ii;

      void'(activeMaster1.transAdd(burst1,0));

   endtask // sendTransfer

   initial
     begin

        activeMaster1 = new ("pstest.M0");  //the default master

        activeMaster1.regWrite(DENALI_CDN_AHB_REG_Verbosity, DENALI_CDN_AHB_MESSAGEVERBOSITY_MEDIUM);

        $display("Going to create new wires "); 
        activeMaster1.regWrite(DENALI_CDN_AHB_REG_ContinueOnError, 1);

        sendTransfers;
        //sendTransfers;
        //sendTransfers;
        //sendTransfers;

        #10000000; 

        $finish; 
     end

 

But I came across above code just make a one burst transaction.  I want to make multiple burst transaction. Especially,

Start address which is from 0x00000000 to 0x10000000 with random data.

I can make that way by just use multiple 'sendTransfers' . but I think this is not a good way. I think there is more efficient way.

How do I make multiple burst transaction.?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...