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

Subversion Repositories pci

[/] [pci/] [tags/] [working_demo/] [rtl/] [verilog/] [dp_async_ram.v] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name "dp_async_ram.v"                                  ////
4
////                                                              ////
5
////  This file is part of the "PCI bridge" project               ////
6
////  http://www.opencores.org/cores/pci/                         ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - mihad@opencores.org                                   ////
10
////      - Miha Dolenc                                           ////
11
////                                                              ////
12
////  All additional information is avaliable in the README.pdf   ////
13
////  file.                                                       ////
14
////                                                              ////
15
////                                                              ////
16
//////////////////////////////////////////////////////////////////////
17
////                                                              ////
18
//// Copyright (C) 2000 Miha Dolenc, mihad@opencores.org          ////
19
////                                                              ////
20
//// This source file may be used and distributed without         ////
21
//// restriction provided that this copyright statement is not    ////
22
//// removed from the file and that any derivative work contains  ////
23
//// the original copyright notice and the associated disclaimer. ////
24
////                                                              ////
25
//// This source file is free software; you can redistribute it   ////
26
//// and/or modify it under the terms of the GNU Lesser General   ////
27
//// Public License as published by the Free Software Foundation; ////
28
//// either version 2.1 of the License, or (at your option) any   ////
29
//// later version.                                               ////
30
////                                                              ////
31
//// This source is distributed in the hope that it will be       ////
32
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
33
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
34
//// PURPOSE.  See the GNU Lesser General Public License for more ////
35
//// details.                                                     ////
36
////                                                              ////
37
//// You should have received a copy of the GNU Lesser General    ////
38
//// Public License along with this source; if not, download it   ////
39
//// from http://www.opencores.org/lgpl.shtml                     ////
40
////                                                              ////
41
//////////////////////////////////////////////////////////////////////
42
//
43
// CVS Revision History
44
//
45
// $Log: not supported by cvs2svn $
46 6 mihad
// Revision 1.1.1.1  2001/10/02 15:33:46  mihad
47
// New project directory structure
48
//
49 2 mihad
// Revision 1.1  2001/08/06 18:12:43  mihad
50
// Pocasi delamo kompletno zadevo
51
//
52
//
53
 
54
// behavioral dual port asynchronous read / synchronous write RAM
55
`include "constants.v"
56 6 mihad
`include "timescale.v"
57
 
58 2 mihad
module DP_ASYNC_RAM(reset_in, wclock_in, data_in, raddr_in, waddr_in, data_out, wenable_in);
59
 
60
parameter ADDR_LENGTH = 7 ;
61
parameter SIZE = 128 ;
62
input reset_in ;
63
input wclock_in ;
64
input [39:0] data_in ;
65
input [(ADDR_LENGTH - 1):0] raddr_in ;
66
input [(ADDR_LENGTH - 1):0] waddr_in ;
67
output [39:0] data_out ;
68
input wenable_in ;
69
 
70
reg [39:0] mem [(SIZE - 1):0] ;
71
wire [(ADDR_LENGTH - 1):0] raddr = raddr_in ;
72
wire [(ADDR_LENGTH - 1):0] waddr = waddr_in ;
73
 
74
assign data_out = mem[raddr] ;
75
 
76
always@(posedge wclock_in)
77
begin
78
    if (wenable_in)
79
        mem[waddr] <= #`FF_DELAY data_in ;
80
end
81
 
82
endmodule

powered by: WebSVN 2.1.0

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