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

Subversion Repositories aor3000

[/] [aor3000/] [trunk/] [rtl/] [model/] [model_simple_dual_ram.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
/*
2
 * This file is subject to the terms and conditions of the BSD License. See
3
 * the file "LICENSE" in the main directory of this archive for more details.
4
 *
5
 * Copyright (C) 2014 Aleksander Osman
6
 */
7
 
8
module model_simple_dual_ram(
9
    input                       clk,
10
 
11
    input       [widthad-1:0]   address_a,
12
    output reg  [width-1:0]     q_a,
13
 
14
    input       [widthad-1:0]   address_b,
15
    input                       wren_b,
16
    input       [width-1:0]     data_b
17
); /* verilator public_module */
18
 
19
parameter width     = 1;
20
parameter widthad   = 1;
21
 
22
reg [width-1:0] mem [(2**widthad)-1:0];
23
 
24
always @(posedge clk) begin
25
    if(wren_b) mem[address_b] <= data_b;
26
 
27
    q_a <= mem[address_a];
28
end
29
 
30
endmodule

powered by: WebSVN 2.1.0

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