If you can't read please download the document
Upload
marius-monton
View
3.008
Download
3
Embed Size (px)
Citation preview
2. Outline
3. Objectives 4. Virtual Platforms and SystemC 5. Checkpointing for SystemC 6. Conclusions 7.
8. Objectives 9. Virtual Platforms and SystemC 10. Checkpointing for SystemC 11. Conclusions Introduction 12. Introduction Virtual Platforms
13. Target SW unable to distinguish virtual platform from real HW 14. Run SW or OS on Virtual HW 15. Develop SW for non-existing HW 16. Simulate complex system interconnectivity 17. Introduction Virtual Platforms 18. Introduction Virtual Platforms 19. Introduction Virtual Platforms 20. Introduction Virtual Platforms 21. Virtual Platform Design Hardware Software Integration & Test time Engineering Resources WindRiver (Virtutech) 22. Virtual Platform Design Hardware Software Integration & Test time Engineering Resources time Engineering Resources Resources Time to Market Hardware Software Integration & Test WindRiver (Virtutech) 23. Generic Virtual Platform Diagram Virtual Platform ISS ISS VP Back-end functions Devices Devices Memories Target Drivers Boot code Target Operating System User User User 24. Introduction SystemC & TLM-2
25. OSCI simulator 26. TLM-2 standarizes communication model
De facto standard for system modeling 27. Introduction Checkpointing
28. Retrieve the execution from a disk 29. Useful for simulations of large systems
30. bug fixing (modify a simulation value & continue) 31. reverse execution 32. multi-site development teams 33. Introduction VP Languages
34. HW engineers know (or should) SystemC, not other languages 35. Different VP -> Rewrite own models 36. No interoperability 37.
38. Objectives 39. Virtual Platforms and SystemC 40. Checkpointing for SystemC 41. Conclusions Objectives 42.
43. Objectives 44. Virtual Platforms and SystemC 45. Checkpointing for SystemC 46. Conclusions Objectives 47. Objectives
48. Add SystemC-TLM support to an open-sourced VP Add checkpointing support to SystemC
49. Overcome limitations 50. Generic Virtual Platform Diagram Virtual Platform ISS ISS VP Back-end functions Devices Devices Memories Target Drivers Boot code Target Operating System User User User SystemC SystemC Devices Sync 51.
52. Objectives 53. Virtual Platforms and SystemC 54. Checkpointing for SystemC 55. Conclusions Virtual Platforms and SystemC 56.
57. Objectives 58. Virtual Platforms and SystemC 59. Checkpointing for SystemC 60. Conclusions Virtual Platforms and SystemC 61. Virtual Platforms and SystemC
62. Synchronization strategy 63. Generic bridge 64. Support for generic TLM-2 devices
65.
Virtual Platforms and SystemC SynchVPSystemCVirtual time 66. Virtual Platforms and SystemC Execution time SynchVPSystemCVirtual execution 67. QEMU-SC
68. Generic fabric bus (TLM)->any architecture 69. QEMU simul. master and SystemC slave
Focus on few SystemC devices 70. QEMU-SC Linux Driver VP SystemC module SC_Bridge SC_Link TLM Socket Application 71. Synchronization
72. When pending event in current simulation time
When I/O to/from SystemC device
QuantumKeeper asks to
73. Communication
Fit to LT devices 74. Need to manage AT devices
75. Finish all protocol phases before return to VP 76. Communication - LT 77. Communication - AT 78. Synchronization
79. Bridge knows when a I/O is performed
Continue SystemC simulation when
80. Every quantum time (TLM-2) Advance SystemC time until transaction ends 81. QBox
SystemC manages simulation 82. QEMU is a TLM-2 Initiator module 83. Easy integration 84. Focus on many SystemC 85. models 86. QBox 87. QBox internal architecture 88. QBox complex example QEMUWrapper NIC TILE TILE TILE QEMU NoC 89. Test & results
90. Extract performance metrics Results for performance
91. QEMU-SC Test System TLM Socket QEMU SystemC iDCT acc. SC_Bridge SC_Link DMI Pointer Reg. File IRQ IRQLinux Driver MPEG accelerator irq_event MPEG-2 decoder 92. QEMU-SC Results
93. No acc. w/ drivers 94. QEMU style 1 acc. 95. SystemC 1 acc. 96. QEMU style 2 acc. 97. SystemC 2 acc. 98. SystemC skel. (1 acc.) 99. SystemC skel. (2 acc.) 100. QEMU-SC Results
101. No acc. w/ drivers 102. QEMU style 1 acc. 103. SystemC 1 acc. 104. QEMU style 2 acc. 105. SystemC 2 acc. 106. SystemC skel. (1 acc.) 107. SystemC skel. (2 acc.) Penalty8% ~ 14% 108. Complex QBox system DMI Pointer TLM 2 Socket SignalSocket (IRQ) QEMU Wrapper GreenRouter TLM 2 Socket (Ethernet) Linux QEMU NE2000 NE2000 Testbench 109. QBox Test System TLM Socket SystemC iDCT acc. Reg. File IRQSignalSocket (IRQ) QEMU Wrapper GreenRouter Linux Driver irq_event QEMU MPEG-2 decoder 110. QBox Results
111. No acc. w/ drivers 112. QEMU style 1 acc. 113. SystemC 1 acc. 114. QEMU style 2 acc. 115. SystemC 2 acc. 116. SystemC skel. (1 acc.) 117. SystemC skel. (2 acc.) 118. QBox Results
119. No acc. w/ drivers 120. QEMU style 1 acc. 121. SystemC 1 acc. 122. QEMU style 2 acc. 123. SystemC 2 acc. 124. SystemC skel. (1 acc.) 125. SystemC skel. (2 acc.) Penalty~ 100%!!! 126. QBox Test System TLM Socket SystemC iDCT acc. Reg. File IRQSignalSocket (IRQ) QEMU Wrapper GreenRouter Linux Driver irq_event QEMU MPEG-2 decoder Penalty ~ 100%!!! 127.
128. Objectives 129. Virtual Platforms and SystemC 130. Checkpointing for SystemC 131. Conclusions
132.
133. Objectives 134. Virtual Platforms and SystemC 135. Checkpointing for SystemC 136. Conclusions
137.
138. Two approaches
139. State-variables save and restore 140. Process save checkpointing Save Restore O.S. HW O.S. HW VP VP 141. Process save checkpointing Save Restore O.S. HW O.S. HW HW VP VP 142. Process save checkpointing Save Restore O.S. HW O.S. HW HW VP VP 143. Process save checkpointing Save Restore O.S. HW O.S. HW HW O.S. VP VP 144. Process save checkpointing Save Restore O.S. HW O.S. HW HW O.S. VP VP 145. State save checkpointing Save Restore O.S. HW O.S. HW VP VP chkp_mng chkp_mng 146. State save checkpointing Save Restore O.S. HW O.S. HW VP VP chkp_mng chkp_mng 147. State save checkpointing Save Restore O.S. HW O.S. HW HW VP VP chkp_mng chkp_mng 148. State save checkpointing Save Restore O.S. HW O.S. HW HW O.S. VP VP chkp_mng chkp_mng 149. Checkpointing for SystemC
150. Text conversion for easy management Channels (SC_FIFO, SC_MUTEX, etc.)
151. stored values 152. Checkpointing for SystemC
153. Implicit
Explicit
154. do_restore() 155. Checkpoint manager
156. Offers simulation checkpoint to external control
157. restore() 158. chk_mng::checkpoint()
159. Channels state and data 160. Pending events lists (for SC_METHOD)
161. Dynamic sensibility Converts al l data to text
162. Editable 163. chk_mng::restore()
164. channels state and data 165. events (for SC_METHOD)
166. Dynamic sensibility Simulation state ready to continue
167. Checkpointing for SystemC
168. SC_THREAD left to designer Guidelines
169. Avoid usage of SC_THREAD (in literature) Enough for VP modeling 170. Checkpointing for SystemC VP Device Reg. File
171. Callbacks functions 172. Checkpointing for SystemC VP Device Reg. File
173. Callbacks functions 174. Checkpointing for SystemC VP Device Reg. File
S3 S1 S2 175. Checkpointing for SystemC VP Device Reg. File
S3 S1 S2 176. Checkpointing for SystemC VP Device Reg. File IRQ
IRQgenerator S3 S1 S2 177. Checkpointing for SystemC VP Device Reg. File IRQ
IRQgenerator I/O manag S3 S1 S2 178. Simulation time
Main performance loss is due to overhead in gs_param
179. Other cases about a 50% 180. Checkpoint data size
181. pending events 182. channels dataUsually order of ~kB vs ~GB other solutions
183. Fast saving to disk time 184. Reverse execution 185. Checkpoint data # OSCI data 55000 60000;Initiator.initiator_func; # FIFO my_fifoTarget.my_fifo=14;Target.my_fifo=0; Target.my_fifo=0.5;Target.my_fifo=1; ... Target.my_fifo=6.5; # gs_params Initiator.initiator_func_fsm_param 0 Initiator.int_param 6 Target.data_gs_param {"0" "0.5" "1" "1.5" "2" "2.5" "0" "0" "0" "0"} Target.data_gs_paramB.0 0 Target.data_gs_paramB.1 0.5 Target.data_gs_paramB.2 1 Target.data_gs_paramB.3 1.5 Target.data_gs_paramB.4 2 ... Target.data_gs_paramB.9 0 OSCI kernel data Channels data User modules data 186.
187. Objectives 188. Virtual Platforms and SystemC 189. Checkpointing for SystemC 190. Conclusions Conclusions 191.
192. Objectives 193. Virtual Platforms and SystemC 194. Checkpointing for SystemC 195. Conclusions Conclusions 196.
197. Tested two different strategies for joining two simulators
198. QBox Minor performance impact SystemC bridge 199. Published as open-sourced projects www.greensocs.com Conclusions SystemC 200. Conclusions SystemC Simulation Manager Penalty System for QEMU-SC Yes 10% SW QBox No 25~30% HW 201. Conclusions Simics Virtutech
202. Close source -> new device manages SystemC 203. Same strategy than QEMU-SC 204. Conclusions Simics Results
205. SystemC QT = 1 ms. 206. SystemC QT = 1 s. 207. Simics DML Microbenchmark 208. Conclusions Simics Results
209. SystemC QT = 1 ms. 210. SystemC QT = 1 s. 211. Simics DML Microbenchmark Penalty ~ 5% 212. ConclusionsIndustry
213. Industry project involves PhD
Other vendors using our work
214. ConclusionsCheckpointing
215. Saving only necessary data, not the entire process 216. Focused on VP modeling 217. With limitations but enough for VP devices 218. No simulation speed penalty due to Checkpointing
219. Inspect OSCI kernel when checkpointing 220. Future Work (light)
Enhance QEMU time management
Add multiple instances from QEMU
Explore QEMU user mode
221. Future Work (medium)
Merge QEMU functionality into OSCI kernel
Both merges increase simulation speed due to removed synchronization 222. Future Work (hard)
223. Build a SystemC Virtual Machine
224. performance issues 225. Thank you! Questions? 226. BACKUP SLIDES 227. Conclusions Simics Virtutech 228. QEMU ecosystem