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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [basal/] [src/] [RAM/] [read_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
  read_mixed_width_ram // 256x32 write and 1024x8 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] <= wdata;
15
    q <= ram[raddr / 4][raddr % 4];
16
  end
17
endmodule

powered by: WebSVN 2.1.0

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