mockrcp.tdf
1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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;