pi_tab.v
3.95 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: pi_tab.v
// description: dumps out pi i/o .tab file
//
// designer: Tony DeLaurier
// date: 12/05/94
//
////////////////////////////////////////////////////////////////////////
module pi_tab();
integer tab_file_ptr;
// open tab file and dump header
initial
begin
tab_file_ptr = $fopen("pi000.tab");
// dump out header
$fwriteh(tab_file_ptr, "#\n");
$fwriteh(tab_file_ptr, "# pi tab file\n");
$fwriteh(tab_file_ptr, "#\n");
$fwriteh(tab_file_ptr, "clock @C 1(8) 0(8)\n");
$fwriteh(tab_file_ptr, "reset_l @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_read_enable @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_write_enable @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_select[1:0] @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_command[2:0] @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "dma_start @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "dma_last @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "dbus_enable @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "dma_grant @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "read_grant @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_data_in[15:0] @I @E 2 @C clock\n");
$fwriteh(tab_file_ptr, "dma_request @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "read_request @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "pi_interrupt @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_aleh @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_alel @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_read_l @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_write_l @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_enable_l @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "ad16_data_out[15:0] @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_data[31:0] @B cbus_data_oe 1 @E 5 @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_data_oe @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "cbus_dummy @I @E 0 @C clock\n");
$fwriteh(tab_file_ptr, "dbus_data[63:0] @B dbus_data_oe 1 @E 5 @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "dbus_data_oe @O @S 15 @C clock\n");
$fwriteh(tab_file_ptr, "dbus_dummy @I @E 0 @C clock\n");
$fwriteh(tab_file_ptr, "\n");
end // initial
// dump pi at pos edge of clock
always @(posedge reality.rcp_0.pi_0.clock)
begin
$fwriteh(tab_file_ptr,
reality.rcp_0.pi_0.reset_l,," ",
reality.rcp_0.pi_0.cbus_read_enable,,
reality.rcp_0.pi_0.cbus_write_enable,,
"0x", reality.rcp_0.pi_0.cbus_select,,
"0x", reality.rcp_0.pi_0.cbus_command,,
reality.rcp_0.pi_0.dma_start,,
reality.rcp_0.pi_0.dma_last,,
reality.rcp_0.pi_0.dbus_enable,,
reality.rcp_0.pi_0.dma_grant,,
reality.rcp_0.pi_0.read_grant,,
"0x", reality.rcp_0.pi_0.ad16_data_in,," ",
reality.rcp_0.pi_0.dma_request,,
reality.rcp_0.pi_0.read_request,,
reality.rcp_0.pi_0.pi_interrupt,,
reality.rcp_0.pi_0.ad16_aleh,,
reality.rcp_0.pi_0.ad16_alel,,
reality.rcp_0.pi_0.ad16_read_l,,
reality.rcp_0.pi_0.ad16_write_l,,
reality.rcp_0.pi_0.ad16_enable_l,,
"0x", reality.rcp_0.pi_0.ad16_data_out,," ",
"0x", reality.rcp_0.pi_0.cbus_data,,
reality.rcp_0.pi_0.cbus_write_enable,,
reality.rcp_0.pi_0.cbus_write_enable,,
"0x", reality.rcp_0.pi_0.dbus_data,,
reality.rcp_0.pi_0.dbus_enable,,
reality.rcp_0.pi_0.dbus_enable,,
"\n");
end // always
endmodule // pi_tab