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

Subversion Repositories open_free_list

[/] [open_free_list/] [trunk/] [sim/] [altsyncram3.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 amif2000
/*******************************************************************************
2
 
3
    MODULE NAME: altsyncram3
4
 
5
    DESCRIPTION
6
        This module is a parametrized dual port ram with a registered output port
7
        It is optional to define it's input address and output address and it's
8
        depth.
9
 
10
    REVISION HISTORY
11
        05FEB03 First Created -ac-
12
*******************************************************************************/
13
module altsyncram3
14
  (
15
   data,
16
   byteena,
17
   rd_aclr,
18
   rdaddress,
19
   rdclock,
20
   rdclocken,
21
   rden,
22
   wraddress,
23
   wrclock,
24
   wrclocken,
25
   wren,
26
   q);
27
 
28
   parameter        A_WIDTH    = 288;
29
   parameter        A_WIDTHAD  = 9;
30
   parameter        B_WIDTH    = A_WIDTH;
31
   parameter        B_WIDTHAD  = A_WIDTHAD;
32
   parameter        A_NUMWORDS = 1<<A_WIDTHAD;
33
   parameter        B_NUMWORDS = 1<<B_WIDTHAD;
34
   parameter        RAM_TYPE   = "AUTO";
35
   parameter        BYTE_ENA   = 1;
36
   parameter        USE_RDEN   = 1;
37
 
38
   parameter        TYPE       = RAM_TYPE == "M4K"   | RAM_TYPE == "M9K"?    "M9K":
39
                                 RAM_TYPE == "M512"  | RAM_TYPE == "MLAB"?   "MLAB":
40
                                 RAM_TYPE == "M-RAM" | RAM_TYPE == "M144K"?  "M144K":
41
                                                                             "AUTO";
42
 
43
   parameter        REG_B      = "CLOCK1";
44
 
45
   input  [A_WIDTH-1:0]           data;
46
   input  [BYTE_ENA-1 :0]         byteena;
47
   input                          rd_aclr;
48
   input  [B_WIDTHAD-1:0]         rdaddress;
49
   input                          rdclock;
50
   input                          rdclocken;
51
   input                          rden;
52
   input  [A_WIDTHAD-1:0]         wraddress;
53
   input                          wrclock;
54
   input                          wrclocken;
55
   input                          wren;
56
   output [B_WIDTH-1:0]           q;
57
 
58
   wire   [B_WIDTH-1:0]     sub_wire0;
59
   wire   [B_WIDTH-1:0]     q = sub_wire0[B_WIDTH-1:0];
60
   wire   [BYTE_ENA-1 :0]   byteena_wire = BYTE_ENA==1 ? 1'b1 : byteena;
61
   wire                     rden_wire = USE_RDEN ? rden : 1'b1;
62
 
63
   altsyncram   altsyncram_component (
64
      .clocken0(wrclocken),
65
      .clocken1(rdclocken),
66
      .wren_a(wren),
67
      .clock0(wrclock),
68
      .aclr1 (rd_aclr),
69
      .clock1(rdclock),
70
      .address_a(wraddress),
71
      .address_b(rdaddress),
72
      .rden_b(rden_wire),
73
      .data_a(data),
74
      .q_b(sub_wire0),
75
      .aclr0 (1'b0),
76
      .addressstall_a (1'b0),
77
      .addressstall_b (1'b0),
78
      .byteena_a (byteena_wire),
79
      .byteena_b (1'b1),
80
      .clocken2 (1'b1),
81
      .clocken3 (1'b1),
82
      .data_b ({B_WIDTH{1'b1}}),
83
      .eccstatus (),
84
      .q_a (),
85
      .rden_a (1'b1),
86
      .wren_b (1'b0));
87
   defparam
88
                altsyncram_component.address_aclr_b = "CLEAR1",
89
                altsyncram_component.address_reg_b = "CLOCK1",
90
                altsyncram_component.clock_enable_input_a = "NORMAL",
91
                altsyncram_component.clock_enable_input_b = "NORMAL",
92
                altsyncram_component.clock_enable_output_b = "NORMAL",
93
                altsyncram_component.intended_device_family = "Stratix III",
94
                altsyncram_component.lpm_type = "altsyncram",
95
                altsyncram_component.numwords_a = A_NUMWORDS,
96
                altsyncram_component.numwords_b = B_NUMWORDS,
97
                altsyncram_component.operation_mode = "DUAL_PORT",
98
                altsyncram_component.outdata_aclr_b = "CLEAR1",
99
                altsyncram_component.outdata_reg_b = REG_B,
100
                altsyncram_component.power_up_uninitialized = "FALSE",
101
                altsyncram_component.ram_block_type = TYPE,
102
                altsyncram_component.rdcontrol_reg_b = "CLOCK1",
103
                altsyncram_component.widthad_a = A_WIDTHAD,
104
                altsyncram_component.widthad_b = B_WIDTHAD,
105
                altsyncram_component.width_a = A_WIDTH,
106
                altsyncram_component.width_b = B_WIDTH,
107
                altsyncram_component.width_byteena_a = BYTE_ENA;
108
endmodule // altsyncram3

powered by: WebSVN 2.1.0

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