nfs_server os_awareness
Simics Reference Manual  /  5 Classes  / 

onfi_flash

Description

The onfi_flash class is a generic NAND Flash Memory model that is compliant to ONFI 1.0 standard.

The following commands are supported:

Read
Change Read Column
Block Erase
Read Status
Read Status Enhanced
Page Program
Change Write Column
Read ID
Read Parameter Page
Reset

Other commands are currently not supported.

The data_image and spare_image attributes must points to image objects holding the data and spare area data of the flash of size consistent with the parameter of the device.

The following attributes regarding device parameters are required to be properly set before object instantiation (and can not be changed after configuration):

bus_width: data bus width of this device, either 8 or 16
data_bytes_per_page: value multiple of 512
pages_per_block: value multiple of 2
blocks: total number of blocks
id_bytes: the electronic signature of this device returned by Read ID
parameter_page: 256+ bytes of device parameters read by Read Parameter Page

The following attribute regarding device parameters are optional, if not set before object instantiation it will be calculated from data_bytes_per_page:

spare_bytes_per_page: range from 1 to 2208
The following attributes can be read for information purpose:

total_bytes_per_page: data_bytes_per_page + spare_bytes_per_page

Further information can be found in the documentation of the individual attributes.

Notes

Devices with 16-bit bus width will interpret the data in the images as little-endian. For example, if column 0 of page 0 is read, byte 0 in the image will be returned in bit 0 - 7 and byte 1 in bit 8-15. If you use an image in big-endian format you must therefore byte-swap it before loading it.

Interfaces Implemented

conf_object, log_object, io_memory, nand_flash

Notifiers

cell-change
Notifier that is triggered after the object's cell was changed.
object-delete
Notifier that is triggered just before Simics object is deleted.
queue-change
Notifier that is triggered after the object's clock was changed. New clock can be obtained with the SIM_object_clock function.

Port Objects

bank.regs
onfi_flash.regs

Commands for this class

Attributes

address_latch_enable
Optional attribute; read/write access; type: i
The current state of the "address latch enable" pin, true (non-zero) for high and false (zero) for low.
blocks
Required attribute; read/write access; type: i
The number of blocks of the device.
bus_width
Required attribute; read/write access; type: i
Data bus width of the device. Must be either 8 or 16.
command_latch_enable
Optional attribute; read/write access; type: i
The current state of the "command latch enable" pin, true (non-zero) for high and false (zero) for low.
data_bytes_per_page
Required attribute; read/write access; type: i
The number of data bytes per page. Must be a multiple of 512.
data_image
Required attribute; read/write access; type: o|[os]
The image object containing the data part of the device's pages. The image should contain the data contents of the pages concatenated in order.

Required interfaces: image.

id_bytes
Required attribute; read/write access; type: [i*]
Bytes returned by the "read ID (0x00) " command.
pages_per_block
Required attribute; read/write access; type: i
The number of pages per block. Must be a multiple of 2.
parameter_page
Required attribute; read/write access; type: [i*]
bytes returned by the "Read Parameter Page" command.
saved_state
Optional attribute; read/write access; type: i
Saved state.
saved_state_counter
Optional attribute; read/write access; type: i
Saved sub-state.
spare_bytes_per_page
Optional attribute; read/write access; type: i
The number of spare bytes per page. Valid from 1 to 2208. If 0 or not set, it will be calculated from data_bytes_per_page
spare_image
Required attribute; read/write access; type: o|[os]
The image object containing the spare parts of the device's pages. The image should contain the spare contents of the pages concatenated in order.

Required interfaces: image.

state
Optional attribute; read/write access; type: i
Current state.
state_column_address
Optional attribute; read/write access; type: i
Current column address.
state_counter
Optional attribute; read/write access; type: i
Current sub-state.
state_page_address
Optional attribute; read/write access; type: i
Current page address.
state_page_buffer
Optional attribute; read/write access; type: d
Current content of the page buffer.
status_byte
Optional attribute; read/write access; type: i
Status Register
sub_feature_parameter
Optional attribute; read/write access; type: [i{4}]
Sub feature parameters
total_bytes_per_page
Pseudo attribute; read/write access; type: i
Total number of bytes per page (Read Only).
write_protect
Optional attribute; read/write access; type: i
The current state of the "write protect" pin, true (non-zero) for high (write-protect off) and false (zero) for low (write-protect on).

Provided By

onfi-flash

onfi_flash.regs

Interfaces Implemented

conf_object, log_object, bank_instrumentation_subscribe, instrumentation_order, int_register, io_memory, register_view

Notifiers

cell-change
Notifier that is triggered after the object's cell was changed.
object-delete
Notifier that is triggered just before Simics object is deleted.
queue-change
Notifier that is triggered after the object's clock was changed. New clock can be obtained with the SIM_object_clock function.

Commands for interface bank_instrumentation_subscribe

Commands for interface instrumentation_order

nfs_server os_awareness