OSDN Git Service

* public snapshot of sid simulator
[pf3gnuchains/pf3gnuchains3x.git] / sid / component / memory / hw-memory-flash-at29.txt
1 * Name
2   hw-memory-flash-at29 hw-memory-flash-at29c256 hw-memory-flash-at29lv256 hw-memory-flash-at29c257 hw-memory-flash-at29c512 hw-memory-flash-at29lv512 hw-memory-flash-at29c010a hw-memory-flash-at29lv010a hw-memory-flash-at29bv010a hw-memory-flash-at29c020 hw-memory-flash-at29lv020 hw-memory-flash-at29bv020 hw-memory-flash-at29c040 hw-memory-flash-at29lv040 hw-memory-flash-at29bv040 hw-memory-flash-at29c040a hw-memory-flash-at29lv040a hw-memory-flash-at29bv040a
3
4
5 * Synopsis
6   This is a simulated ATMEL AT29 series flash memory.  It can be configured
7   to emulate any of the AT29 family members.
8
9   Buses: read-write-port
10   Pins: image-load image-store
11   Attributes: device-code image-file manufacturer-code sector-size size size-max
12
13   Library: libmemory.la
14   Symbol name: mem_component_library  
15
16 * Functionality
17
18   - Modelling
19
20     * In the actual hardware, the ATMEL flash memory has timing
21       sensitivities when programming sectors.  During such programming, 
22       the final byte that is modified in a sector is set to an
23       incorrect value until the programming has been completed.  In
24       simulation, the programming of a sector appears to be
25       instantaneous.  Therefore, it may not be possible to detect
26       software programs that are not sensitive to the timing
27       requirements in real hardware.  
28
29     * The data security facility that prevents the memory
30       from being inadvertently modified in the presence of bus
31       transients, has a similar restriction that forces data writes to
32       be performed in rapid succession.  If an interval elapses, data
33       security is re-enabled and the unlocking code sequence must be
34       reissued (see ``References'' for more details).
35
36   - Behaviors
37
38     * Configuration
39
40       Flash memory chips are self-describing using their device-code
41       and manufacturer-code values, accessible both to a target
42       program, and to the simulator user via attributes.  Since a
43       target program may infer memory size from these values, further
44       simulation configuration that overrides these values should be
45       avoided unless necessary.
46
47       The "device-code" attribute represents the device code of the
48       flash memory part being simulated.  Refer to the ATMEL data sheet
49       for a complete list of device identification codes.  The
50       "manufacturer-code" read-only attribute represents the
51       manufacturer code of the flash memory.  It is a constant value
52       for ATMEL.  The "sector-size" attribute specifies the size of an
53       individual sector in the flash memory.  Typical values are 64
54       to 512 bytes.
55
56       When the "size" attribute is written-to with a legal value, a
57       new cleared byte array is allocated with the new size.  The old
58       byte array is thrown away.  The "size-max" read-only attribute
59       supplies to the user the maximum size that this component will
60       attempt to allocate.
61
62     * Image save/load
63
64       When the "image-load" pin is driven, this component will open
65       and attempt to load the contents of the file given by the
66       "image-file" attribute into the memory image.  The file is
67       copied byte-for-byte.  If the file is too short, zeroes are used
68       to fill out the rest of the memory.
69  
70       Similarly, when the "image-store" pin is driven, the component
71       will write to the "image-file" file a byte-for-byte dump of the
72       entire memory image.
73
74     * Reading/writing
75
76       When an access is received on the "read-write-port" bus, the
77       component checks the incoming address and rejects it if
78       out-of-range. The component also rejects non-byte-sized accesses.
79
80       Memory can be read at will, but the data security protocol must
81       be followed when writing to the memory - see ATMEL
82       documentation.
83
84   - SID conventions
85     
86     * This is a functional component.
87     * The component supports saving and restoring state in addition to
88       memory persistence, via the image-store pin/attribute.
89     * Triggerpoints are not supported.
90
91 * Environment
92
93   - Related components
94
95     * Customized versions of this component are available for standard
96       members of the AT29 flash family.  Instantiating each of them is
97       equivalent to instantiating this generic component and setting 
98       the appropriate "sector-size", "size", and "device-code" attribute
99       settings.
100
101     * A flash memory will usually form a small part of the complete
102       memory subsystem, providing a region of non-volatile memory. The 
103       following configuration file fragment demonstrates this:
104
105         new hw-mapper-basic bus
106         new hw-memory-flash-at29lv040 flash # AT29LV040: 512KB size, 512 sector-size
107         connect-bus bus [0,0x7FFFF] flash read-write-port
108
109   - Host system
110
111   * The memory is modelled as a contiguous array of bytes in host
112     memory.  As such, a component configured for 8MB of memory
113     requires 8MB of host memory.  This is an important consideration
114     for simulations running on machines with low memory or on busy
115     multiuser systems.  Similarly, when a memory image is written to
116     disk, the same amount of space may be used there.
117
118 * SID interface reference
119
120   - low level:
121
122     * buses
123       - read-write-port | 0 .. size-1 | byte-wide access only |
124
125     * attributes
126       - device-code | setting | 0 .. 0xFF | 0x5B | configuration
127       - manufacturer-code | setting | 0x1F | 0x1F | configuration
128       - size | setting | numeric | 524288 | configuration
129       - size-max | setting | numeric | fixed at 32MB | configuration
130       - sector-size | setting | numeric | 512 | configuration
131       - image-file | setting | filename | | image save/load
132
133     * pins
134       - image-load | input | any | image load/store
135       - image-store | input | any | image load/store
136
137 * References
138   ATMEL AT29 series data sheets, application notes.
139   Also see: <http://www.atmel.com/>