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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [Altera/] [ip.hwp.cpu/] [nios_ii_sram/] [1.0/] [hdl/] [onchip_memory_0.v] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 147 lanttu
//Legal Notice: (C)2012 Altera Corporation. All rights reserved.  Your
2
//use of Altera Corporation's design tools, logic functions and other
3
//software and tools, and its AMPP partner logic functions, and any
4
//output files any of the foregoing (including device programming or
5
//simulation files), and any associated documentation or information are
6
//expressly subject to the terms and conditions of the Altera Program
7
//License Subscription Agreement or other applicable license agreement,
8
//including, without limitation, that your use is for the sole purpose
9
//of programming logic devices manufactured by Altera and sold by Altera
10
//or its authorized distributors.  Please refer to the applicable
11
//agreement for further details.
12
 
13
// synthesis translate_off
14
`timescale 1ns / 1ps
15
// synthesis translate_on
16
 
17
// turn off superfluous verilog processor warnings 
18
// altera message_level Level1 
19
// altera message_off 10034 10035 10036 10037 10230 10240 10030 
20
 
21
module onchip_memory_0 (
22
                         // inputs:
23
                          address,
24
                          address2,
25
                          byteenable,
26
                          byteenable2,
27
                          chipselect,
28
                          chipselect2,
29
                          clk,
30
                          clk2,
31
                          clken,
32
                          clken2,
33
                          reset,
34
                          reset2,
35
                          write,
36
                          write2,
37
                          writedata,
38
                          writedata2,
39
 
40
                         // outputs:
41
                          readdata,
42
                          readdata2
43
                       )
44
;
45
 
46
  parameter INIT_FILE = "../onchip_memory_0.hex";
47
 
48
 
49
  output  [ 31: 0] readdata;
50
  output  [ 31: 0] readdata2;
51
  input   [  8: 0] address;
52
  input   [  8: 0] address2;
53
  input   [  3: 0] byteenable;
54
  input   [  3: 0] byteenable2;
55
  input            chipselect;
56
  input            chipselect2;
57
  input            clk;
58
  input            clk2;
59
  input            clken;
60
  input            clken2;
61
  input            reset;
62
  input            reset2;
63
  input            write;
64
  input            write2;
65
  input   [ 31: 0] writedata;
66
  input   [ 31: 0] writedata2;
67
 
68
  wire    [ 31: 0] readdata;
69
  wire    [ 31: 0] readdata2;
70
  wire             wren;
71
  wire             wren2;
72
  assign wren = chipselect & write;
73
  assign wren2 = chipselect2 & write2;
74
  //s1, which is an e_avalon_slave
75
  //s2, which is an e_avalon_slave
76
 
77
//synthesis translate_off
78
//////////////// SIMULATION-ONLY CONTENTS
79
  altsyncram the_altsyncram
80
    (
81
      .address_a (address),
82
      .address_b (address2),
83
      .byteena_a (byteenable),
84
      .byteena_b (byteenable2),
85
      .clock0 (clk),
86
      .clock1 (clk2),
87
      .clocken0 (clken),
88
      .clocken1 (clken2),
89
      .data_a (writedata),
90
      .data_b (writedata2),
91
      .q_a (readdata),
92
      .q_b (readdata2),
93
      .wren_a (wren),
94
      .wren_b (wren2)
95
    );
96
 
97
  defparam the_altsyncram.address_reg_b = "CLOCK1",
98
           the_altsyncram.byte_size = 8,
99
           the_altsyncram.byteena_reg_b = "CLOCK1",
100
           the_altsyncram.indata_reg_b = "CLOCK1",
101
           the_altsyncram.init_file = "UNUSED",
102
           the_altsyncram.lpm_type = "altsyncram",
103
           the_altsyncram.maximum_depth = 512,
104
           the_altsyncram.numwords_a = 512,
105
           the_altsyncram.numwords_b = 512,
106
           the_altsyncram.operation_mode = "BIDIR_DUAL_PORT",
107
           the_altsyncram.outdata_reg_a = "UNREGISTERED",
108
           the_altsyncram.outdata_reg_b = "UNREGISTERED",
109
           the_altsyncram.ram_block_type = "AUTO",
110
           the_altsyncram.read_during_write_mode_mixed_ports = "DONT_CARE",
111
           the_altsyncram.width_a = 32,
112
           the_altsyncram.width_b = 32,
113
           the_altsyncram.width_byteena_a = 4,
114
           the_altsyncram.width_byteena_b = 4,
115
           the_altsyncram.widthad_a = 9,
116
           the_altsyncram.widthad_b = 9,
117
           the_altsyncram.wrcontrol_wraddress_reg_b = "CLOCK1";
118
 
119
 
120
//////////////// END SIMULATION-ONLY CONTENTS
121
 
122
//synthesis translate_on
123
//synthesis read_comments_as_HDL on
124
//  altsyncram the_altsyncram
125
//    (
126
//      .address_a (address),
127
//      .address_b (address2),
128
//      .byteena_a (byteenable),
129
//      .byteena_b (byteenable2),
130
//      .clock0 (clk),
131
//      .clock1 (clk2),
132
//      .clocken0 (clken),
133
//      .clocken1 (clken2),
134
//      .data_a (writedata),
135
//      .data_b (writedata2),
136
//      .q_a (readdata),
137
//      .q_b (readdata2),
138
//      .wren_a (wren),
139
//      .wren_b (wren2)
140
//    );
141
//
142
//  defparam the_altsyncram.address_reg_b = "CLOCK1",
143
//           the_altsyncram.byte_size = 8,
144
//           the_altsyncram.byteena_reg_b = "CLOCK1",
145
//           the_altsyncram.indata_reg_b = "CLOCK1",
146
//           the_altsyncram.init_file = "UNUSED",
147
//           the_altsyncram.lpm_type = "altsyncram",
148
//           the_altsyncram.maximum_depth = 512,
149
//           the_altsyncram.numwords_a = 512,
150
//           the_altsyncram.numwords_b = 512,
151
//           the_altsyncram.operation_mode = "BIDIR_DUAL_PORT",
152
//           the_altsyncram.outdata_reg_a = "UNREGISTERED",
153
//           the_altsyncram.outdata_reg_b = "UNREGISTERED",
154
//           the_altsyncram.ram_block_type = "AUTO",
155
//           the_altsyncram.read_during_write_mode_mixed_ports = "DONT_CARE",
156
//           the_altsyncram.width_a = 32,
157
//           the_altsyncram.width_b = 32,
158
//           the_altsyncram.width_byteena_a = 4,
159
//           the_altsyncram.width_byteena_b = 4,
160
//           the_altsyncram.widthad_a = 9,
161
//           the_altsyncram.widthad_b = 9,
162
//           the_altsyncram.wrcontrol_wraddress_reg_b = "CLOCK1";
163
//
164
//synthesis read_comments_as_HDL off
165
 
166
endmodule
167
 

powered by: WebSVN 2.1.0

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