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

Subversion Repositories or1k_old

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

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/RAM32X1D.v,v 1.1.1.1 2001-11-04 18:59:50 lampret Exp $
2
 
3
/*
4
 
5
FUNCTION        : 32x1 Dual Port Static RAM with synchronous write capability
6
 
7
*/
8
 
9
`timescale  100 ps / 10 ps
10
 
11
`celldefine
12
 
13
module RAM32X1D (DPO, SPO, A0, A1, A2, A3, A4, D, DPRA0, DPRA1, DPRA2, DPRA3, DPRA4, WCLK, WE);
14
 
15
    parameter cds_action = "ignore";
16
 
17
    parameter INIT = 32'h00000000;
18
 
19
    output DPO, SPO;
20
 
21
    input  A0, A1, A2, A3, A4, D, DPRA0, DPRA1, DPRA2, DPRA3, DPRA4, WCLK, WE;
22
 
23
    reg  mem [31:0];
24
    reg  [5:0] count;
25
    wire [4:0] adr;
26
    wire [4:0] dpr_adr;
27
    wire d_in, wclk_in, we_in;
28
 
29
    buf b_d    (d_in, D);
30
    buf b_wclk (wclk_in, WCLK);
31
    buf b_we   (we_in, WE);
32
 
33
    buf b_a4 (adr[4], A4);
34
    buf b_a3 (adr[3], A3);
35
    buf b_a2 (adr[2], A2);
36
    buf b_a1 (adr[1], A1);
37
    buf b_a0 (adr[0], A0);
38
 
39
    buf b_d4 (dpr_adr[4], DPRA4);
40
    buf b_d3 (dpr_adr[3], DPRA3);
41
    buf b_d2 (dpr_adr[2], DPRA2);
42
    buf b_d1 (dpr_adr[1], DPRA1);
43
    buf b_d0 (dpr_adr[0], DPRA0);
44
 
45
    buf b_spo (SPO, spo_int);
46
    buf b_dpo (DPO, dpo_int);
47
 
48
    buf b_spo_int (spo_int, mem[adr]);
49
    buf b_dpo_int (dpo_int, mem[dpr_adr]);
50
 
51
    initial begin
52
        for (count = 0; count < 32; count = count + 1)
53
            mem[count] <= INIT[count];
54
 
55
    end
56
 
57
    always @(posedge wclk_in) begin
58
        if (we_in == 1'b1)
59
            mem[adr] <= d_in;
60
    end
61
 
62
    specify
63
        if (WE)
64
            (WCLK => SPO) = (1, 1);
65
        if (WE)
66
            (WCLK => DPO) = (1, 1);
67
 
68
        (A4 => SPO) = (1, 1);
69
        (A3 => SPO) = (1, 1);
70
        (A2 => SPO) = (1, 1);
71
        (A1 => SPO) = (1, 1);
72
        (A0 => SPO) = (1, 1);
73
 
74
        (DPRA4 => DPO) = (1, 1);
75
        (DPRA3 => DPO) = (1, 1);
76
        (DPRA2 => DPO) = (1, 1);
77
        (DPRA1 => DPO) = (1, 1);
78
        (DPRA0 => DPO) = (1, 1);
79
    endspecify
80
 
81
endmodule
82
 
83
`endcelldefine

powered by: WebSVN 2.1.0

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