Changeset 26 in XOpenSparcT1 for trunk/sim/flash.v
- Timestamp:
- 04/04/11 11:58:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sim/flash.v
r21 r26 42 42 $readmemh(memfilename, mem); 43 43 $display("INFO: MEMH %m: Memory initialization completed"); 44 //for(i=0; i<=1023; i=i+1) $display("mem_i = %x",mem[i]) ; 44 45 end 45 46 `endif 46 47 47 48 assign flash_data = !flash_oen ? data :16'hzzzz; 48 49 49 50 50 always @(posedge flash_clk) begin 51 51 // Read cycle 52 52 if (!flash_oen & flash_wen) 53 data <= mem[flash_addr]; 53 begin 54 //$display("INFO: flash: read from address %x data %x",flash_addr, mem[flash_addr]); 55 data <= mem[flash_addr]; 56 end 54 57 else // Write cycle 55 if (flash_oen & !flash_wen) mem[flash_addr] <= flash_data; 56 end 58 if (flash_oen & !flash_wen) 59 $display("INFO: flash: write to address %x data %x (now disabled)",flash_addr,flash_data); 60 //mem[flash_addr] <= flash_data; FIXME: errouneous spourious writes in flash 61 end 57 62 endmodule 58 63
Note: See TracChangeset
for help on using the changeset viewer.