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

Subversion Repositories or1k

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

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

powered by: WebSVN 2.1.0

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