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

Subversion Repositories softavrcore

[/] [softavrcore/] [trunk/] [synth/] [flash.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 apal
module flash
2
 #(     parameter       flash_file = "main.mem",
3
        parameter       flash_width = 10
4
 )
5
 (      input                           clk,
6
        input                           mem_ce,
7
        input   [flash_width-1:0]        mem_a,
8
        output  [15:0]                   mem_d
9
 );
10
 
11
reg [15:0] flash_array [0:2**flash_width-1];
12
 
13
reg [15:0] data_read;
14
 
15
assign mem_d = data_read;
16
 
17
always @(posedge clk) begin
18
        if (mem_ce) data_read <= flash_array[mem_a];
19
end
20
 
21
initial begin
22
//      $readmemh(flash_file, flash_array);
23
        `include "flash_array.v"
24
end
25
 
26
endmodule

powered by: WebSVN 2.1.0

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