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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [env/] [async_mem.v] - Blame information for rev 102

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

Line No. Rev Author Line
1 2 ghutchis
module async_mem (/*AUTOARG*/
2
  // Outputs
3
  rd_data,
4
  // Inputs
5
  wr_clk, wr_data, wr_cs, addr, rd_cs
6
  );
7
 
8
  parameter asz = 15,
9
            depth = 32768;
10
 
11
  input       wr_clk;
12
  input [7:0] wr_data;
13
  input       wr_cs;
14
 
15
  input [asz-1:0] addr;
16
  inout [7:0]      rd_data;
17
  input           rd_cs;
18
 
19
  reg [7:0]        mem [0:depth-1];
20
 
21
  always @(posedge wr_clk)
22
    begin
23
      if (wr_cs)
24
        mem[addr] <= #1 wr_data;
25
    end
26
 
27
  assign rd_data = (rd_cs) ? mem[addr] : {8{1'bz}};
28
 
29
endmodule // async_mem

powered by: WebSVN 2.1.0

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