1 // -----------------------------------------------------------------------
3 // Copyright 2004 Tommy Thorn - All Rights Reserved
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 // Bostom MA 02111-1307, USA; either version 2 of the License, or
9 // (at your option) any later version; incorporated herein by reference.
11 // -----------------------------------------------------------------------
15 module progmem(input wire clock
,
17 input wire [6:0] rdaddress
,
18 input wire [6:0] wraddress
,
20 input wire [31:0] data
,
21 output wire [31:0] q
);
23 reg [ 6:0] addr_delayed
;
24 reg [31:0] ram
[(1<<7) - 1:0];
26 assign q
= ram
[addr_delayed
];
28 always @(posedge clock
)
30 addr_delayed
<= rdaddress
;
34 $readmemh("initmem.data", ram
);