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

Subversion Repositories unconfuser

[/] [unconfuser/] [trunk/] [mem64kx8.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 protik
// This is a 64k by 8 bit memory model for testing the fifo design
2
// This memory has 3-4 ns of delay on the output
3
// It is just a model for simulation purposes 
4
//
5
// Author: Morris Jones
6
// San Jose State University
7
//
8
`timescale 1ns/100ps
9
 
10
 
11
module mem64kx8(clk,addrw,din,write,addrr,dout);
12
input clk,write;
13
input [15:0] addrw;
14
input [15:0] addrr;
15
input [7:0] din;
16
output [7:0] dout;
17
reg [7:0] delayedOut ;
18
 
19
reg [7:0] fifo[0:65535];
20
 
21
always @(posedge(clk)) begin
22
        if(write) begin
23
                #0.05;  // check for hold time...
24
                fifo[addrw]=din;
25
        end
26
end
27
always @(addrr or addrw or write) begin
28
        delayedOut <= #3 fifo[addrr];
29
end
30
 
31
assign dout=delayedOut;
32
 
33
endmodule
34
 

powered by: WebSVN 2.1.0

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