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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [JFIFGen/] [HeaderRAM.v] - Rev 48

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

module HeaderRam(d, waddr, raddr, we, clk, q);
output [7:0] q;
input [7:0] d;
input[9:0] raddr;
input[9:0] waddr;
input clk, we;
 
reg [9:0] read_addr;
reg[7:0] mem [1023:0] /* synthesis syn_ramstyle="block_ram" */;
 
initial $readmemh("../design/jfifgen/header.hex", mem);
 
assign q = mem[read_addr];
 
always @(posedge clk) begin
if (we)
mem[waddr] <= d;
read_addr <= raddr;
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.