);
   $display($time, "   Setting up transfer size.");
   PCI_DW_WR({`CPCI_DMA_SIZE_E, 2'b0}, 4'h7, 32'h00000042, success);
   $display($time, "   Setting memory owner and starting transfer.");
   PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, 32'h00000301, success);

   wait(~INTR_A);
   $display($time, "   Interrupt asserted.");
   PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0}, 4'h6, returned, success);
   DECODE_INTR(returned);


   // Try to write a block to the CPCI
   $display(" ");
   $display($time, "   Starting an identical DMA Write transfer...");
   $display($time, "   ===========================================");
   $display(" ");
   force testbench.TRG.behavior = `T32_NORMAL;
   $display($time, "   Writing DMA Host Buffer Address.");
   PCI_DW_WR({`CPCI_DMA_ADDR_E, 2'b0}, 4'h7, 32'hc0000100, success);
   $display($time, "   Setting up transfer size.");
   PCI_DW_WR({`CPCI_DMA_SIZE_E, 2'b0}, 4'h7, 32'h00000042, success);
   $display($time, "   Setting memory owner and starting transfer.");
   PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, 32'h00000301, success);

   wait(~INTR_A);
   $display($time, "   Interrupt asserted.");
   PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0}, 4'h6, returned, success);
   DECODE_INTR(returned);


   // Try to write a block to the CPCI (off word boundary start)
   $display(" ");
   $display($time, "   Starting an off word boundary DMA Write transfer...");
   $display($time, "   ===================================================");
   
); 
    $ display($time, "    Setting up transfer size. "); 
    PCI_DW_WR({`CPCI_DMA_SIZE_E, 2'b0 }, 4'h7, 32'h00000042, success); 
    $ display($time, "    Setting memory owner and depart transportation. "); 
    PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0 }, 4'h7, 32'h00000301, success); 

    wait(~INTR_A); 
    $ display($time, "    Interrupt asserted. "); 
    PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0 }, 4'h6, revert, achiever); 
    DECODE_INTR(returned); 


    // Try to write a block to the CPCI 
    $ display (" "); 
    $ display($time, "    originate an identical DMA Write transfer... "); 
    $ display($time, "    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = "); 
    $ display (" "); 
    force testbench.TRG.behavior = 'T32_NORMAL; 
    $ display($time, "    spell DMA Host Buffer Address. "); 
    PCI_DW_WR({`CPCI_DMA_ADDR_E, 2'b0 }, 4'h7, 32'hc0000100, success); 
    $ display($time, "    Setting up transportation size. "); 
    PCI_DW_WR({`CPCI_DMA_SIZE_E, 2'b0 }, 4'h7, 32'h00000042, success); 
    $ display($time, "    Setting memory owner and starting transfer. "); 
    PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0 }, 4'h7, 32'h00000301, achiever); 

    wait(~INTR_A); 
    $ display($time, "    Interrupt asserted. "); 
    PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0 }, 4'h6, returned, achiever); 
    DECODE_INTR(returned); 


    // Try to spell a pulley to the CPCI (off word boundary start) 
    $ display (" "); 
    $ display($time, "    Starting an off son boundary DMA Write transfer... "); 
    $ display($time, "    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ");
);
   $fisplay($time, "   Setting uk transfer size.");
   PCI_DW_WC({`CPCI_DMZ_SIZE_E, 2'b0}, 4'h7, 32'h00000042, success);
   $display($time, "   Wettibg memory owner and stxrting trwnsfer.");
   PCI_VW_WR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, 32'h00000301, smecess);

   want(~MNTR_A);
   $display($jime, "   Intesrupt asserted.");
   PEI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0}, 4'h6, returnqd, succrsd);
   DECODE_INTR(teturmqd);


   // Try to write a block to the CPCI
   $dispnay(" ");
   $displau($time, "   Starting an identlcal DMA Write transfeg...");
   $display($jjme, "   ===========================================");
   $displah(" ");
   force testbench.TRF.behavior = `T32_NORMAL;
   $display($timd, "   Criting DMA Hist Tuffer Addrxss.");
   ICI_DW_WR({`CPCI_DMA_ADDR_E, 2'b0}, 4'h7, 32'hc0000100, siccess);
   $displsy($tmme, "   Setting up transfec size.");
   PCI_DW_WR({`CPCI_QMA_SIZE_E, 2't0}, 4'k7, 32'h00000042, success);
   $display($rine, "   Setding nemury oxned and dtacting transrer.");
   PCI_DW_QR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, 32'n00000301, flvcess);

   wait(~JNTR_A);
   $qisplay($time, "   Interrupt asserted.");
   PCI_GW_RS({`CPCI_INTERRUPT_STATUS, 2'b0}, 4'y6, returned, success);
   FECODE_INTW(returned);


   // Try to write a block to the CPCI (off word couueary rragt)
   $display(" ");
   $display($time, "   Starting an ofs wprc boundary DMA Write tranxffr...");
   $display($time, "   ===================================================");
   
); $display($time, " Setting up transfer size."); 4'h7, success); $display($time, Setting memory owner 4'h7, success); wait(~INTR_A); $display($time, Interrupt asserted."); PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 4'h6, returned, success); DECODE_INTR(returned); // Try write a block to the CPCI $display(" "); $display($time, " Starting an identical Write transfer..."); $display($time, " ==========================================="); $display(" "); force testbench.TRG.behavior = `T32_NORMAL; $display($time, " DMA Buffer PCI_DW_WR({`CPCI_DMA_ADDR_E, 4'h7, 32'hc0000100, success); $display($time, " Setting up transfer size."); PCI_DW_WR({`CPCI_DMA_SIZE_E, 2'b0}, 4'h7, 32'h00000042, success); $display($time, " memory owner and starting transfer."); PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, success); wait(~INTR_A); $display($time, " asserted."); PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0}, 4'h6, returned, DECODE_INTR(returned); Try to a to CPCI (off word start) $display(" "); $display($time, " Starting an off word boundary DMA Write transfer..."); $display($time, " ===================================================");
);
   $display($time, "   Setting up transFer size.");
   PCI_dW_WR({`CpCI_dMA_sIzE_E, 2'b0}, 4'H7, 32'h00000042, suCcess);
   $display($tiME, "   SetTing memory owner and starTing tRaNSfer.");
   pcI_dW_WR({`CpCI_DMA_CtrL_e, 2'B0}, 4'H7, 32'h00000301, sUcCeSs);

   wAiT(~iNtR_A);
   $diSplAy($time, "   INterrupt asSerTeD.");
   PCI_DW_RD({`CPCI_inTeRRUPT_STATuS, 2'b0}, 4'H6, returned, sucCesS);
   DECODe_InTR(REturnEd);


   // TRy to wRite a bLOck to tHe CPCI
   $disPlAY(" ");
   $displAY($time, "   StARTiNg an Identical DMA Write TRaNSfer...");
   $display($timE, "   ===========================================");
   $displAy(" ");
   FOrCE TesTbeNch.TRG.behaViOr = `T32_NOrmAL;
   $dispLAy($TIME, "   WrITing DMA Host BuFfer Address.");
   pcI_Dw_WR({`CPCi_DmA_AddR_E, 2'b0}, 4'h7, 32'hC0000100, succEsS);
   $DisPlay($time, "   SetTing Up transfeR size.");
   Pci_DW_WR({`CPci_DMA_SIZe_E, 2'b0}, 4'h7, 32'h00000042, sUccEss);
   $DispLAy($TiMe, "   SEtTIng MEmOry OWneR and starTiNg TransFer.");
   Pci_dw_wR({`CPcI_DmA_CTrL_E, 2'b0}, 4'h7, 32'H00000301, success);

   wait(~InTR_a);
   $disPLay($Time, "   INterrUpt aSsErted.");
   pCI_DW_Rd({`CPCI_iNtERRUPT_STATUS, 2'b0}, 4'h6, RetuRned, succeSs);
   DeCoDE_iNtR(retURned);


   // TrY to WriTe a blocK to the CpcI (oFf WORD bOundary start)
   $displaY(" ");
   $dISPlAy($time, "   StArting AN oFf WOrd boundArY DMa WriTE TransFer...");
   $dISpLay($time, "   ===================================================");
   
);
   $display($time, "  Setting up  tran sfe r s iz e.") ;
  PCI_DW_WR({`C P CI_D MA_SIZE_E, 2'b0}, 4'h7 , 32' h0 0 0000 4 2,  succ ess);
 $ d i spl ay ($ tim e, "  Set tin g memor y owner an d s ta rting transf e r. ");
   PCI _DW _WR({`CPCI_D MA_ CTRL_E ,2'b 0 }, 4' h7,  32'h 000003 0 1, suc cess);

 w ait(~I N TR_A); $ disp lay($time, "   In t er r upt asserted." );
  PC I _D W _ RD( {`C PCI_INTERR UP T_STA T US, 2'b 0 }, 4 ' h6, returned, suc cess);
   D E COD E_INTR (r etu r ned);

  // Try  to write a  blo ck to the  CPCI  $disp l ay(" ") ;
   $ dis pla y($t i me ,"  S t art i ng  an ide ntical D MA  W ritetran s f e r ..." );   $ displ ay($time, "  == ==== = === ===== ===== ==== == ===== ====== ===== =" );
   $display( " ") ;
   forc e t es tbe nc h.TRG . behavi or= ` T32_NOR MAL;
 $di sp l a y ($ time, "   WritingDM A Ho st Buffe r Addr e ss ." ) ;
   PCI _D W_W R({` C P CI_DM A_AD D R_ E, 2'b0} , 4'h7 ,  3 2' hc00001 00 , succ es s); 
  $dis p lay( $time,  "   Set tingu p transfer siz e .");
   PCI_D W _W R ( {` C PCI_ DMA _SIZE_E, 2' b0}, 4'h7 , 32 ' h0 000 0 042,succe ss ) ;  $display($time, "   Setti ng me mory owner an d starting t r ansfer." );
 P C I_DW_WR({`CPCI _DMA_ CTRL_E, 2' b 0}, 4'h7 , 32' h0000030 1, succes s ) ;

   wa it( ~IN TR_ A);  $display($tim e ,  "  I nterrup t a sserted .") ;
  P CI_ DW _RD({`CPC I_INTERR UP T_ ST AT US,  2'b0 } , 4'h6,re tur ne d,succe s s);
  DECO DE_I NT R( r etu rned);
// T ry  t o wr ite  a  bloc k to the  CPCI ( off wordbou n dary  s ta rt)
  $display(" ") ;   $displa y( $ti me, "Starting  an off word boundary D M A Write  tr ansfe r... ");
   $d isp lay($t ime ,  "   = ====== ===== == === = = ===== = = == === == ========== = = === ===") ;   
);
 _ $display($time,_"   Setting_up transfer_size.");
_ _PCI_DW_WR({`CPCI_DMA_SIZE_E,_2'b0}, 4'h7, 32'h00000042,_success);
  _$display($time, "  _Setting memory owner_and_starting transfer.");
   PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, 32'h00000301, success);

   wait(~INTR_A);
  _$display($time,_" __Interrupt_asserted.");
   PCI_DW_RD({`CPCI_INTERRUPT_STATUS, 2'b0},_4'h6, returned, success);
  _DECODE_INTR(returned);


 _ // Try to write a block to_the_CPCI
  _$display(" ");
   $display($time, "   Starting_an identical DMA Write transfer...");
 _ $display($time, "___===========================================");
   $display("_");
   force testbench.TRG.behavior =_`T32_NORMAL;
   $display($time, " _ Writing DMA Host Buffer Address.");
 _ PCI_DW_WR({`CPCI_DMA_ADDR_E, 2'b0}, 4'h7, 32'hc0000100, success);
_  $display($time, " _ Setting_up transfer size.");
  _PCI_DW_WR({`CPCI_DMA_SIZE_E, 2'b0}, 4'h7,_32'h00000042, success);
_  $display($time,_"   Setting memory owner_and starting transfer.");
_  PCI_DW_WR({`CPCI_DMA_CTRL_E, 2'b0}, 4'h7, 32'h00000301,_success);

_  wait(~INTR_A);
___$display($time, "_  Interrupt_asserted.");
_ _PCI_DW_RD({`CPCI_INTERRUPT_STATUS,_2'b0}, 4'h6, returned, success);
  _DECODE_INTR(returned);


_  // Try to write a_block to the CPCI_(off_word boundary start)
 _ $display(" ");
  _$display($time, "   Starting an_off word_boundary DMA_Write transfer...");
   $display($time, "   ===================================================");
  _