mockrcp.tdf 1.79 KB
TITLE "$Header: /root/leakn64/depot/rf/sw/n64os20l/hw/proto/pgm/mockrcp.tdf,v 1.1.1.1 2002/05/17 06:07:56 blythe Exp $";
%*************************************************************************%
%*                                                                       *%
%*               Copyright (C) 1994, 1995 Silicon Graphics, Inc.         *%
%*                                                                       *%
%*  These coded instructions, statements, and computer programs  contain *%
%*  unpublished  proprietary  information of Silicon Graphics, Inc., and *%
%*  are protected by Federal copyright  law.  They  may not be disclosed *%
%*  to  third  parties  or copied or duplicated in any form, in whole or *%
%*  in part, without the prior written consent of Silicon Graphics, Inc. *%
%*                                                                       *%
%*************************************************************************%

subdesign mockrcp
(
 %pif interface%
 PChClk, PChRsp, CldRstB       : INPUT;
 PChCmd                        : OUTPUT;
)

variable
   clock                                 : NODE;
   start, wait, adr[11..0], count[7..0]  : DFF;
   adrcnt[10..2]                         : DFFE;

begin
 clock  = global(PChClk);
 PChCmd = adr[11];

 start.clk = clock;
 start     = (count[] == 243);

 wait.clk  = clock;
 wait.clrn = CldRstB;
 wait      = start # (wait & PChRsp);

 adr[].clk = clock;
 adr[].prn = CldRstB;
 if (start) then
    %loading address%
    adr[] = (B"011", adrcnt[10..2]);
 else
    adr[] = (adr[10..0], B"1");
 end if;

 adrcnt[].clk  = clock;
 adrcnt[].clrn = CldRstB;
 adrcnt[].ena  = start;
 adrcnt[]      = adrcnt[] + 3;

 count[].clk  = clock;
 count[].clrn = CldRstB;
 if (start # wait) then
    count[] = 0;
 else
    count[] = count[] + 1;
 end if;
end;