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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [mp3/] [lib/] [xilinx/] [unisims/] [SRL16E_1.v] - Blame information for rev 1779

Go to most recent revision | 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/SRL16E_1.v,v 1.1.1.1 2001-11-04 19:00:00 lampret Exp $
2
 
3
/*
4
 
5
FUNCTION        : 16 bit Shift Register LUT with Negative_edge Clock
6
                 and Clock Enable
7
 
8
*/
9
 
10
`timescale  100 ps / 10 ps
11
 
12
`celldefine
13
 
14
module SRL16E_1 (Q, A0, A1, A2, A3, CE, CLK, D);
15
 
16
    parameter cds_action = "ignore";
17
 
18
    parameter INIT = 16'h0000;
19
 
20
    output Q;
21
 
22
    input  A0, A1, A2, A3, CE, CLK, D;
23
 
24
    reg  [5:0]  count;
25
    reg  [15:0] data;
26
    wire [3:0]  addr;
27
    wire        clk_;
28
    wire        q_int;
29
 
30
    buf b_a3 (addr[3], A3);
31
    buf b_a2 (addr[2], A2);
32
    buf b_a1 (addr[1], A1);
33
    buf b_a0 (addr[0], A0);
34
 
35
    buf b_q_int (q_int, data[addr]);
36
    buf b_q (Q, q_int);
37
 
38
    not i_c (clk_, CLK);
39
 
40
    initial
41
    begin
42
        while (CLK === 1'bx)
43
            #2;
44
        for (count = 0; count < 16; count = count + 1)
45
            data[count] <= INIT[count];
46
    end
47
 
48
    always @(posedge clk_)
49
    begin
50
        if (CE == 1'b1) begin
51
            {data[15:0]} <= {data[14:0], D};
52
        end
53
    end
54
 
55
    specify
56
        if (CE)
57
            (CLK => Q) = (1, 1);
58
    endspecify
59
 
60
endmodule
61
 
62
`endcelldefine

powered by: WebSVN 2.1.0

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