OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [mp3_stable/] [mp3/] [lib/] [xilinx/] [unisims/] [LUT4_D.v] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 266 lampret
// $Header: /home/marcus/revision_ctrl_test/oc_cvs/cvs/or1k/mp3/lib/xilinx/unisims/LUT4_D.v,v 1.1.1.1 2001-11-04 18:59:48 lampret Exp $
2
/*
3
 
4
FUNCTION        : 4-inputs LUT
5
 
6
*/
7
 
8
`timescale  100 ps / 10 ps
9
 
10
`celldefine
11
 
12
module LUT4_D (LO, O, I0, I1, I2, I3);
13
 
14
    parameter INIT = 16'h0000;
15
 
16
    input I0, I1, I2, I3;
17
 
18
    output LO, O;
19
 
20
    wire out0, out1, out2, out3, out;
21
 
22
    lut4_d_mux4 (out3, INIT[15], INIT[14], INIT[13], INIT[12], I1, I0);
23
    lut4_d_mux4 (out2, INIT[11], INIT[10], INIT[9], INIT[8], I1, I0);
24
    lut4_d_mux4 (out1, INIT[7], INIT[6], INIT[5], INIT[4], I1, I0);
25
    lut4_d_mux4 (out0, INIT[3], INIT[2], INIT[1], INIT[0], I1, I0);
26
    lut4_d_mux4 (out, out3, out2, out1, out0, I3, I2);
27
 
28
    buf b4 (LO, out);
29
    buf b5 (O, out);
30
 
31
    specify
32
        (I0 *> LO) = (1, 1);
33
        (I1 *> LO) = (1, 1);
34
        (I2 *> LO) = (1, 1);
35
        (I3 *> LO) = (1, 1);
36
 
37
        (I0 *> O) = (1, 1);
38
        (I1 *> O) = (1, 1);
39
        (I2 *> O) = (1, 1);
40
        (I3 *> O) = (1, 1);
41
    endspecify
42
 
43
endmodule
44
 
45
`endcelldefine
46
 
47
primitive lut4_d_mux4 (O, d3, d2, d1, d0, s1, s0);
48
 
49
  output O;
50
  input d3, d2, d1, d0;
51
  input s1, s0;
52
 
53
  table
54
 
55
    // d3  d2  d1  d0  s1  s0 : O;
56
 
57
       ?   ?   ?   1   0   0  : 1;
58
       ?   ?   ?   0   0   0  : 0;
59
       ?   ?   1   ?   0   1  : 1;
60
       ?   ?   0   ?   0   1  : 0;
61
       ?   1   ?   ?   1   0  : 1;
62
       ?   0   ?   ?   1   0  : 0;
63
       1   ?   ?   ?   1   1  : 1;
64
 
65
 
66
       ?   ?   0   0   0   x  : 0;
67
       ?   ?   1   1   0   x  : 1;
68
 
69
       1   1   ?   ?   1   x  : 1;
70
 
71
       ?   0   ?   0   x   0  : 0;
72
       ?   1   ?   1   x   0  : 1;
73
 
74
       1   ?   1   ?   x   1  : 1;
75
 
76
 
77
       1   1   1   1   x   x  : 1;
78
 
79
  endtable
80
 
81
endprimitive

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.