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

Subversion Repositories or1k

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

powered by: WebSVN 2.1.0

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