div_capture.v
1.31 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
reg [31:0] fpC_div;
initial
begin
if ($test$plusargs("qsim_capture_div"))
begin
fpC_div = $fopen("capture_div.tab");
$fwrite(fpC_div,
"CLK @C 1(8) 0(8)\n",
"Reset_l @I @E 2 \n",
"OpCode[5:0] @I @E 2 \n",
"OpCodeValid @I @E 2 \n",
"VTL[15:0] @I @E 2 \n",
"VTH[15:0] @I @E 2 \n",
"El2 @I @E 2 \n",
"DivOut[15:0] @O @S 10 \n",
"RADDR[9:0] @O @S 14 \n",
"ROMData[15:0] @O @S 13 \n"
);
$fdisplay(fpC_div);
@(posedge `CLK);
forever
begin
@(posedge `CLK);
#4;
$fwrite(fpC_div,"%b ", `vu_path.div1.Reset_l,
"0x%h ", `vu_path.div1.OpCode,
"%b ", `vu_path.div1.OpCodeValid,
"0x%h ", `vu_path.div1.VTL,
"0x%h ", `vu_path.div1.VTH,
"%b ", `vu_path.div1.El2,
"0x%h ", `vu_path.div1.DivOut,
"0x%h ", `vu_path.div1.RADDR,
"0x%h ", `vu_path.div1.ROMData
);
$fdisplay(fpC_div);
end
end
end