|Home > Fast Models components > SystemIP components > MMC|
Generic Multimedia Card. This model is written in LISA+.
MMC contains the following CADI targets:
This component can simulate an SD or SDHC card that is compatible with the MultiMedia Card Association (MMCA, https://www.jedec.org) specification version 3.31. You can extend the functionality using the supplied source code.
When paired with a PL180_MCI component, the MMC device model provides emulation of a flexible, persistent storage mechanism. The MMC component uses a file on the host PC to simulate the storage device. The size of this backing store file determines the reported size of the MMC device. As small sections of this file are paged in by the model, large filesystems can be modeled while making efficient use of host PC memory. The backing store file can contain a partition table and filesystems such as FAT or EXT2. The image file is a direct bit copy of the contents of an SD card. If the image file that the
p_mmc_file parameter refers to does not exist, the component behaves as if the card is absent. If the image file is read-only, then the component behaves as if the card is read-only. Note that operating system boots often attempt to write to the boot filesystem. They might not work properly if the boot filesystem is on a read-only card.
The MMC component does not model card insertion or removal. It models the card having already been inserted at system instantiation time.
You can configure the MMC component to behave as an SDHC card by setting the
card_type parameter to
SDHC. SDHC mode is a model-specific extension, and is not supported by PL180 hardware. It supports filesystems that are larger than 2GB.
The component supports these commands:
The block length is 512 bytes. SimGen reports attempts to change it as errors.
The component supports these erase commands (Class 5), but they have no effect on the disk backing storage:
The component does not support these commands:
The component does not support stream read and write commands (Classes 1 and 3):
The component does not support block oriented write protection commands (Class 6):
The component does not support lock card commands (Class 7) or application-specific commands (Class 8):
The component does not support I/O mode commands (Class 9):
The component does not support reserved commands. Using a reserved command sets the MMC ST_ER_B_ILLEGAL_COMMAND bit in the status register of the card. Read this with the MMC_SEND_STATUS command.
p_diagnostics parameter to select the level of diagnostic output, to help to debug device driver and controller-to-card protocol issues:
The registers are not memory mapped. Instead, you access them using relevant MMC commands. The MMC component model makes the registers available through a CADI interface. Modification of these registers through CADI is not recommended, but not prohibited. For example, modifying the card ID (CID) registers can be useful when experimenting with drivers, but direct modification of the STATUS_REG register is likely to put the card model into an indeterminate state.
For a full definition of MMC registers, see the MMCA System Summary documentation. Device-specific register information can also be obtained from MMC vendors.
Table 3-308 MMC registers
|Name||CADI register number||Description|
||Operating conditions register|
||Card ID bits 127:96|
||Card ID bits 95:64|
||Card ID bits 63:32|
||Card ID bits 31:0|
||Card specific data bits 127:96|
||Card specific data bits 95:64|
||Card specific data bits 63:32|
||Card specific data bit 31:0|
||Relative card address register|
||Driver stage register|
The parameters permit configuration of a number of attributes reflected in the CID and CSD registers. You can customize the component further by modifying the MMC model source code directly.
Table 3-309 Ports
||Master||Used to signal whether an MMC image is loaded. It is set if an image is loaded, and is clear if no image is loaded.|
||Slave||Input clock signal used to drive our 'bus'.|
||Slave||The MMC slave port.|
Table 3-310 Parameters for MMC
||"SD"||Card type ('SD' or 'SDHC')|
||Use sector addressing even on small cards|
||Card ID OEM ID|
||Don't simulate MMC block access delays|
||Card ID Manufacturer ID|
||"ARMmmc"||Card ID Product Name (6 chars)|
||Card ID Product Revision|
||Card Serial Number|