Changeset 26 in XOpenSparcT1 for trunk/sim/flash.v


Ignore:
Timestamp:
04/04/11 11:58:11 (13 years ago)
Author:
pntsvt00
Message:

checkpoint: baco con store consecutivi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sim/flash.v

    r21 r26  
    4242    $readmemh(memfilename, mem); 
    4343    $display("INFO: MEMH %m: Memory initialization completed"); 
     44    //for(i=0; i<=1023; i=i+1) $display("mem_i = %x",mem[i]) ; 
    4445  end 
    4546`endif 
    4647 
    4748assign flash_data = !flash_oen ? data :16'hzzzz; 
    48   
    4949 
    5050always @(posedge flash_clk) begin 
    5151    // Read cycle 
    5252 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 
    5457    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 
    5762endmodule 
    5863    
Note: See TracChangeset for help on using the changeset viewer.