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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [basal/] [src/] [RAM/] [write_mixed_width_ram.sv] - Blame information for rev 34

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 34 qaztronic
module
2
  write_mixed_width_ram // 1024x8 write and 256x32 read
3
  (
4
    input [7:0] waddr,
5
    input [31:0] wdata,
6
    input we, clk,
7
    input [9:0] raddr,
8
    output logic [7:0] q
9
  );
10
  logic [3:0][7:0] ram[0:255];
11
  always_ff@(posedge clk)
12
  begin
13
    if(we)
14
      ram[waddr / 4][waddr % 4] <= wdata;
15
    q <= ram[raddr];
16
  end
17
endmodule
18
 

powered by: WebSVN 2.1.0

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