dp1dt001s.vmd
2.18 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
/**************************************************************/
/* Verilog module of datapath cell DP1DT001s */
/* Designed by Lin Yang VLSI Technology Oct. 20, 90 */
/* Designed by Linda J. Xu July, 1992 */
/* */
/* The following is the port description */
/* Data ports */
/* A : the input port */
/* Control ports */
/* INST_Z : the zero detect flag */
/* Parameters */
/* WORDSIZE : the word size of the datapath cell */
/* DELAY : the delay time from input to output */
/* BF : the with/without buffer flag */
/* 0 for without buffer; 1 for with buffer */
/**************************************************************/
module dp1dt001s(A, INST_Z);
parameter WORDSIZE = 8, DELAY = 3, BF = 1;
input [WORDSIZE-1:0] A;
output INST_Z;
function dp1dt;
input [WORDSIZE-1:0] X;
reg [6:0] index;
begin
index = WORDSIZE - 1;
case (&X)
'b1: if (BF == 0)
begin
if ((WORDSIZE >= 5)&&(WORDSIZE <= 8)||((WORDSIZE >= 15)
&&(WORDSIZE <= 22))||((WORDSIZE >= 33)&&(WORDSIZE <= 44))
||((WORDSIZE >= 59)&&(WORDSIZE <= 64)))
dp1dt = 1'b0;
else dp1dt = 1'b1;
end
else dp1dt = 'b 1;
'b0: if (BF == 0)
begin
if ((WORDSIZE >= 5)&&(WORDSIZE <= 8)||((WORDSIZE >= 15)
&&(WORDSIZE <= 22))||((WORDSIZE >= 33)&&(WORDSIZE <= 44))
||((WORDSIZE >= 59)&&(WORDSIZE <= 64)))
dp1dt = 1'b1;
else dp1dt = 1'b0;
end
else dp1dt = 'b 0;
default dp1dt = 'b x;
endcase
end
endfunction
assign #DELAY INST_Z = dp1dt(A);
endmodule