generic_pcie_switch_port gfx-console
Simics Reference Manual  /  5 Classes  / 

generic_spi_flash

Description

The generic_spi_flash class implements the M25P05/10/20/40/80/16/32/64/128, N25Q256A/512A/00AA and W25Q80/16/32/64/128 BV/CV serial flash memories, accessed via the SPI Interface. Different flash models using serial interface from different manufactures can be implemented by manually configure JEDEC ID, sector number and sector size attributes.

Interfaces Implemented

conf_object, log_object, serial_peripheral_interface_slave

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.
state-change
Notifier on potential DML state change

Port Objects

bank.fcl
generic_spi_flash.fcl – Flash control logic
port.HRESET
generic_spi_flash.HRESET
port.TOP_SECTOR_LOCK
generic_spi_flash.TOP_SECTOR_LOCK
port.WRITE_PROTECT
generic_spi_flash.WRITE_PROTECT

Commands for this class

Attributes

JEDEC_signature
Optional attribute; read/write access; type: n|[iii]
JEDEC standard signature. It should be configured in format like [0x20, 0x20, 0x15] for M25P16. Please refer to the hardware documentation for the correct value.
addr4b_enabled
Optional attribute; read/write access; type: b
Enable 4-byte address mode.
dual_parallel_enabled
Optional attribute; read/write access; type: b
Device represents two instances in dual parallel mode.
elec_signature
Optional attribute; read/write access; type: i
Electronic Signature, has default value 0x13. this is not the same as, or even a subset of, the JEDEC 16-bit Electronic Signature. this is for reason of backward compatibility, only, and should not be used for new designs. It should be configured with value 0x05 for M25P05-A, 0x10 for M25P10-A, 0x11 for M25P20, 0x12 for M25P40, 0x13 for M25P80, 0x14 for M25P16, 0x15 for M25P32. 0x16 for M25P64. For all other devices not listed above, please check the respective hardware documentation.
extended_id
Optional attribute; read/write access; type: n|[ii]
Extended device identification. It is only implemented in some flash models. For those models, the two bytes are used to identify different devices. It should be configured like: [0x4d, 0x00] for S25FL032P. Please refer to the hardware documentation for the correct value.
fcmd_counter
Optional attribute; read/write access; type: [i{256}]
Array of the commands statistic counters.
fpdi_enabled
Optional attribute; read/write access; type: b
Enable DUAL INPUT FAST PROGRAM Command. Please refer to the hardware documentation to set True.
fpqi_enabled
Optional attribute; read/write access; type: b
Enable QUAD INPUT FAST PROGRAM Command. Please refer to the hardware documentation to set True.
frdo_enabled
Optional attribute; read/write access; type: b
Enable DUAL OUTPUT FAST READ Command. Please refer to the hardware documentation to set True.
frqo_enabled
Optional attribute; read/write access; type: b
Enable QUAD OUTPUT FAST READ Command. Please refer to the hardware documentation to set True.
mem_block
Required attribute; read/write access; type: o|[os]
Connects to an image object which holding the data, the size of attached object should be equal to sector_number.val * sector_size.val.

Required interfaces: image.

pp_buffer
Optional attribute; read/write access; type: d|n
buffer for holding page program data
sector_lock
Optional attribute; read/write access; type: d
The SPM1 lock registers.
sector_number
Optional attribute; read/write access; type: i
Sector number in the whole flash, has default value 16. Please refer to the hardware documentation for the correct value.
sector_size
Optional attribute; read/write access; type: i
Bytes size for flash sector, has default value 0x10000(64 * 1024). Please refer to the hardware documentation for the correct value. For example, 0x8000 for M25P05-A
sfdp_data
Optional attribute; read/write access; type: [i*]
Array for storing headers and data for sfdp tables.
sfdp_flash_size
Optional attribute; read/write access; type: i
Size of flash memory which is stored in basic SFDT table.
sfdp_tables_num
Optional attribute; read/write access; type: i
Total number of SFPD tables.
sfdp_tables_revision
Optional attribute; read/write access; type: [[ii]{2}]
Revision of sfdp table [msb, lsb].
spi_master
Optional attribute; read/write access; type: o|[os]|n
SPI master this device connected to.

Required interfaces: serial_peripheral_interface_master.

Provided By

generic-spi-flash

generic_spi_flash.HRESET

Interfaces Implemented

conf_object, log_object, signal

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.

generic_spi_flash.TOP_SECTOR_LOCK

Interfaces Implemented

conf_object, log_object, signal

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.

generic_spi_flash.WRITE_PROTECT

Interfaces Implemented

conf_object, log_object, signal

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.

generic_spi_flash.fcl

Description

Flash control logic

Interfaces Implemented

conf_object, log_object, bank_instrumentation_subscribe, instrumentation_order, io_memory, register_view, register_view_read_only

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

generic_pcie_switch_port gfx-console