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] - Rev 47

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

module 
  read_mixed_width_ram // 256x32 write and 1024x8 read
  (
    input [7:0] waddr,
    input [31:0] wdata,
    input we, clk,
    input [9:0] raddr,
    output logic [7:0] q
  );
  logic [3:0][7:0] ram[0:255];
  always_ff@(posedge clk)
  begin
    if(we) 
      ram[waddr] <= wdata;
    q <= ram[raddr / 4][raddr % 4];
  end
endmodule

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

powered by: WebSVN 2.1.0

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