OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_processor/] [aeMB/] [verilog/] [src/] [aeMB2_sparam.v] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 alirezamon
/* $Id: aeMB2_sparam.v,v 1.2 2008-04-26 01:09:06 sybreon Exp $
2
**
3
** AEMB2 EDK 6.2 COMPATIBLE CORE
4
** Copyright (C) 2004-2008 Shawn Tan <shawn.tan@aeste.net>
5
**
6
** This file is part of AEMB.
7
**
8
** AEMB is free software: you can redistribute it and/or modify it
9
** under the terms of the GNU Lesser General Public License as
10
** published by the Free Software Foundation, either version 3 of the
11
** License, or (at your option) any later version.
12
**
13
** AEMB is distributed in the hope that it will be useful, but WITHOUT
14
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
** or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
16
** Public License for more details.
17
**
18
** You should have received a copy of the GNU Lesser General Public
19
** License along with AEMB. If not, see <http:**www.gnu.org/licenses/>.
20
*/
21
/**
22
 * @file aeMB2_sparam.v
23
 * @brief On-chip single-port asynchronous SRAM.
24
 
25
 * This will be implemented as distributed RAM.
26
 
27
 */
28
`timescale  1ns/1ps
29
module aeMB2_sparam (/*AUTOARG*/
30
   // Outputs
31
   dat_o,
32
   // Inputs
33
   adr_i, dat_i, wre_i, clk_i, ena_i
34
   ) ;
35
   parameter AW = 5; // 32
36
   parameter DW = 2; // x2
37
 
38
   // PORT A - READ/WRITE
39
   output [DW-1:0] dat_o;
40
   input [AW-1:0]  adr_i;
41
   input [DW-1:0]  dat_i;
42
   input           wre_i;
43
 
44
   // SYSCON
45
   input           clk_i, ena_i;
46
 
47
   /*AUTOREG*/
48
 
49
   reg [DW-1:0]    rRAM [(1<<AW)-1:0];
50
   reg [AW-1:0]    rADDR;
51
 
52
   always @(posedge clk_i)
53
     begin
54
        if (wre_i)
55
          rRAM[adr_i] <= #1 dat_i;
56
     end
57
 
58
   assign          dat_o = rRAM[adr_i];
59
 
60
   // --- SIMULATION ONLY ------------------------------------
61
   // synopsys translate_off
62
   integer i;
63
   initial begin
64
      for (i=0; i<(1<<AW); i=i+1) begin
65
         rRAM[i] <= {(DW){1'b0}};
66
end
67
   end
68
   // synopsys translate_on
69
 
70
endmodule // aeMB2_sparam
71
 
72
/*
73
 $Log: not supported by cvs2svn $
74
 Revision 1.1  2008/04/20 16:33:39  sybreon
75
 Initial import.
76
*/

powered by: WebSVN 2.1.0

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