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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [mp3/] [lib/] [xilinx/] [unisims/] [RAM16X1S_1.v] - Blame information for rev 1765

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/RAM16X1S_1.v,v 1.1.1.1 2001-11-04 18:59:50 lampret Exp $
2
 
3
/*
4
 
5
FUNCTION        : 16x1 Static RAM with synchronous write capability
6
 
7
*/
8
 
9
`timescale  100 ps / 10 ps
10
 
11
`celldefine
12
 
13
module RAM16X1S_1 (O, A0, A1, A2, A3, D, WCLK, WE);
14
 
15
    parameter cds_action = "ignore";
16
 
17
    parameter INIT = 16'h0000;
18
 
19
    output O;
20
 
21
    input  A0, A1, A2, A3, D, WCLK, WE;
22
 
23
    reg  mem [15:0];
24
    reg  [4:0] count;
25
    wire [3:0] adr;
26
    wire d_in, wclk_in, we_in;
27
 
28
    buf b_d    (d_in, D);
29
    buf b_wclk (wclk_in, WCLK);
30
    buf b_we   (we_in, WE);
31
 
32
    buf b_a3 (adr[3], A3);
33
    buf b_a2 (adr[2], A2);
34
    buf b_a1 (adr[1], A1);
35
    buf b_a0 (adr[0], A0);
36
 
37
    buf b_o (O, o_int);
38
 
39
    buf b_o_int (o_int, mem[adr]);
40
 
41
    initial
42
    begin
43
        for (count = 0; count < 16; count = count + 1)
44
            mem[count] <= INIT[count];
45
    end
46
 
47
    always @(negedge wclk_in)
48
    begin
49
        if (we_in == 1'b1)
50
            mem[adr] <= d_in;
51
    end
52
 
53
    specify
54
        if (WE)
55
            (WCLK => O) = (1, 1);
56
 
57
        (A3 => O) = (1, 1);
58
        (A2 => O) = (1, 1);
59
        (A1 => O) = (1, 1);
60
        (A0 => O) = (1, 1);
61
    endspecify
62
 
63
endmodule
64
 
65
`endcelldefine

powered by: WebSVN 2.1.0

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