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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [JFIFGen/] [HeaderRAM.v] - Blame information for rev 37

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

Line No. Rev Author Line
1 37 mikel262
module HeaderRam(d, waddr, raddr, we, clk, q);
2
output [7:0] q;
3
input [7:0] d;
4
input[9:0] raddr;
5
input[9:0] waddr;
6
input clk, we;
7
 
8
reg [9:0] read_addr;
9
reg[7:0] mem [1023:0] /* synthesis syn_ramstyle="block_ram" */;
10
 
11
initial $readmemh("header.hex", mem);
12
 
13
assign q = mem[read_addr];
14
 
15
always @(posedge clk) begin
16
if (we)
17
mem[waddr] <= d;
18
read_addr <= raddr;
19
end
20
 
21
endmodule

powered by: WebSVN 2.1.0

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