/* $Id: DevEEPROM.h 15955 2009-01-14 20:14:36Z vboxsync $ */ /** @file * DevEEPROM - Microware-compatible 64x16-bit 93C46 EEPROM Emulation, Header. */ /* * Copyright (C) 2007 Sun Microsystems, Inc. * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 USA or visit http://www.sun.com if you need * additional information or have any questions. */ /* Interface */ #include /** * 93C46-compatible EEPROM device emulation. * * @remarks This class is intended to be used in device * emulation which imposes some restrictions if the * device supports GC execution. This is why it is a * plain-old-data structure. */ struct EEPROM93C46 { /** General definitions */ enum { /** Size of EEPROM in words */ SIZE = 64, /** Number of bits per word */ WORD_SIZE = 16, /** Number of address bits */ ADDR_SIZE = 6, /** Number of bits in opcode */ OPCODE_SIZE = 2, /** The most significant bit mask in data word */ DATA_MSB = 1<<(WORD_SIZE-1), /** Address mask */ ADDR_MASK = (1<