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

Subversion Repositories pss

[/] [pss/] [trunk/] [pss/] [hdl/] [pss/] [zpu_uc/] [ram/] [ram.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 AlexAntono
module ram
2
  #(
3
    parameter dat_width=32, adr_width=32, mem_size=1024
4
  )
5
  (
6
    input [dat_width-1:0]      dat_i,
7
    input [adr_width-1:0]      adr_i,
8
    input          we_i,
9
    output reg [dat_width-1:0] dat_o,
10
    input          clk
11
  );
12
 
13
   reg [dat_width-1:0] ram [0:mem_size - 1] /* synthesis ram_style = no_rw_check */;
14
 
15
   always @ (posedge clk)
16
     begin
17
             dat_o <= ram[adr_i];
18
             if (we_i)
19
               ram[adr_i] <= dat_i;
20
     end
21
 
22
endmodule // ram

powered by: WebSVN 2.1.0

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