An Energy Aware Buffer Mapping Technique on Multiple
An Energy Aware Buffer Mapping Technique on Multiple Retention Time STT-MRAMs for Stream Applications Kwangil Choi, Hyunok Oh Hanyang University
Outline � Introduction ◦ Non-volatile Memory (NVM) ◦ Synchronous dataflow (SDF) � Problem Definition � Answer Set Programming � Experiment � Conclusion
Introduction � Non-Volatile Memory (NVM) � Replace DRAM for main memory Type Phase change RAM (PRAM) Spin-transfer torque magneto resistive RAM (STT-MRAM) Ferroelectric RAM(FRAM) Pros High density Low static energy consumption Cons High write energy consumption Poor write performance
STT-MRAM Cell Structure current Top Electrode Top AF Layer free layer tunnel oxide MTJ* Spacing Layer Bottom AF Layer Buffer Layer fixed layer Capping Layer Pinned Layer Tunnel Barrier Free Layer Seed Layer Gate Source Drain Bottom Electrode(substrate) (*MTJ : Magnetic Tunnel Junction) Synthetic Anti ferromagnetic (Sy. AF) structure
Reduction of Retention Time The reduction of the retention time contributes the cell density, leakage power, dynamic power consumption, and performance.
STT-MRAMs with Different Retention Times STT 1 STT 2 STT 3 Cell size (F 2) 20. 7 22 23 Tretention 26. 5μs 3. 24 s 4. 27 yr Lat. R(ns) 2. 065 2. 118 2. 158 Latw(ns) 3. 373 6. 415 11. 447 Dyn. R(n. J) 0. 081 0. 083 0. 085 Dyn. W(n. J) 0. 347 0. 932 1. 916 Pleak(m. W) 96. 1 104 110
System with Multiple Retention Time Memories 26. 5μs STT 1 memory 3. 24 s processor STT 2 memory 4. 27 y STT 3 memory
Application Specification � Synchronous dataflow (SDF) ◦ represents streaming applications like multimedia that require frequent memory access ◦ Node(Actor) - functional algorithm ◦ Edge - communication between two actors ◦ Producing / Consuming rate � the number of produced and consumed samples ◦ Rate is fixed A 3 2 B
Motivational Example } 1 ms Tretention= 1 ms 16 refresh operations Tretention= 4 ms no refresh operation
Outline � Introduction ◦ Non-volatile Memory (NVM) ◦ Synchronous dataflow (SDF) � Problem Definition � Answer Set Programming � Experiment � Conclusion
Problem Definition � Input ◦ Target architecture: A system with multiple relaxed retention time STT-MRAM modules. Note that the memory refreshes memory cells containing valid data. ◦ Characteristics of STT-MRAM : retention time, read/write energy, and refresh energy. ◦ Application : An application is specified in SDF model. A schedule and the execution time of each node are given. � Goal ◦ Minimization the total energy consumption on the memory system for the application. � Output ◦ The mapping of buffers to STT-MRAM modules.
Problem Definition Map the buffer to memory to minimize the energy consumption A 3 2 B SDF graph, schedule and execution time are given A system with multiple retention time memories
Our Approach 1. Construct a schedule AACBDDFEEEE STTShort Energy consumption = 13860 STTLong Energy consumption = 15033 2. Build lifetime chart 3. Determine buffer mapping
Buffer Mapping Formulation � Write energy � Refresh � Total � energy = write energy+refresh energy Constraint Meaning lt(tj) The lifetime of token belonging to buffer map(bi) The mapped memory for buffer rt(m) The retention time of memory bi The buffer size on edge Eref(m) The refresh energy for a token in memory
Outline � Introduction ◦ Non-volatile Memory (NVM) ◦ Synchronous dataflow (SDF) � Problem Definition � Answer Set Programming � Experiment � Conclusion
Answer Set Programming (ASP) � Declarative approach for NP problems � Problem - logic predicates “ AND” � Solutions - answer sets � Easy to understand the formulation � Fast ASP solvers have been introduced
Problem Solving Flow Answer: 1 lifetime(E, Inv, Duration) : - fire(A, S), fire(B, F), edge(E, A, B, P, C, I), num. Fired. Before(A, S, SN), num. Fired. Before(B, F, FN), Inv=FN*C-C+1. . FN*C, SN*P-P <Inv, Inv <= SN*P, acc. Real. Time(Start, S), acc. Real. Time(Finish, F), Duration=Finish. Start+ATime, Duration>0, Inv<= R*P, repetition(A, R), S<F, extime(A, ATime). 5 A 2 2 3 3 buffer_energy(E, Write*P*Rep+Refresh*Energy) : - Energy = [lifetime(E, T, Duration)=Duration/Retention+1], edge(E, A, _, P, _, I), retention(Type, Retention), memory_type(M, Type), map(E, M), refresh_energy(Type, Refresh), write_energy(Type, Write), repetition(A, Rep). B 3 node(1. . 2). edge(1, 1, 2, 3, 3, 3). edge(2, 2, 1, 2, 2, 5). repetition(1, 1). repetition(2, 1). memory_type(2, 1) memory_type(1, 1) map(8, 2) map(7, 2) map(6, 2) map(5, 2) map(4, 2) map(3, 2) map(2, 2) map(1, 2) buffer_energy(8, 3123) buffer_energy(7, 11196) buffer_energy(6, 12438) buffer_energy(5, 4850) buffer_energy(4, 11196) buffer_energy(3, 11196) buffer_energy(2, 11196) buffer_energy(1, 19269) Optimization: 84464 Answer: 2 memory_type(2, 2) memory_type(1, 1) map(8, 2) map(7, 2) map(6, 2) map(5, 2) map(4, 2) map(3, 2) map(2, 2) map(1, 2) buffer_energy(8, 5004) buffer_energy(7, 5994) buffer_energy(6, 5994) buffer_energy(5, 6660) buffer_energy(4, 5994) buffer_energy(3, 5994) buffer_energy(2, 5994) buffer_energy(1, 5994) Optimization: 47628 1 { memory_type(M, T) : retention(T, _) } 1 : - memory(M). Answer: 3 1 { map(E, M) : memory(M) } 1 : - edge(E, _, _, _). sample(E, S-C, T) : - fire(B, T), edge(E, _, B, P, C, I), sample(E, S, T-1), S>= C, time(T). memory_type(2, 2) memory_type(1, 1) map(8, 2) map(7, 2) map(6, 2) map(5, 1) map(4, 2) map(3, 2) map(2, 2) map(1, 2) buffer_energy(8, 5004) buffer_energy(7, 5994) buffer_energy(6, 5994) buffer_energy(5, 4850) buffer_energy(4, 5994) buffer_energy(3, 5994) buffer_energy(2, 5994) buffer_energy(1, 5994) Optimization: 45818 #minimize [buffer_energy(E, Energy)=Energy : edge(E, _, _, _)]. OPTIMUM FOUND SDF Graph ASP formulation Result
Outline � Introduction ◦ Non-volatile Memory (NVM) ◦ Synchronous dataflow (SDF) � Problem Definition � Answer Set Programming � Experiments � Conclusion
Experiments � Synthetic examples ◦ 7 randomly generated examples ◦ 3 to 7 actors � Real-life applications ◦ Part of CELP ◦ H. 263 encoder / decoder ◦ MP 3 decoder CPU Intel i 5 RAM 8 GB OS Ubuntu Linux ASP Solver Clingo 3. 0 � Each node n has the execution time ◦ T(n) = k*Ti(n) ◦ where k represents the scale factor, Ti(n) the initial execution time, and T(n) the execution time of node n.
Synthetic SDF Graphs
Real-life SDF Graphs
Assumed STT-MRAM Parameters
Normalized Energy Consumption w/ multiple retention memories Scale factor = 1000 Scale factor = 10 Scale factor = 50000
Mapped STT-MRAMs ratio scale factor
Normalized Energy Consumption w/ an STT-MRAM Scale factor=10
Conclusion � Buffer mapping algorithm for a system with multiple retention STT-MRAM memories can reduce the energy consumption by 30~70%. � The mapped STT-MRAM memory is dependent on the variable lifetime.
Thank you
- Slides: 27