• Aucun résultat trouvé

MEMOCODE,July2011 GiovanniFunchal andMatthieuMoy ModelingofTimeinDiscrete-EventSimulationofSystems-on-Chip

N/A
N/A
Protected

Academic year: 2022

Partager "MEMOCODE,July2011 GiovanniFunchal andMatthieuMoy ModelingofTimeinDiscrete-EventSimulationofSystems-on-Chip"

Copied!
55
0
0

Texte intégral

(1)jTLM. Duration. Applications. Implementation. Conclusion. Modeling of Time in Discrete-Event Simulation of Systems-on-Chip Giovanni Funchal1,2 and Matthieu Moy1 1 Verimag. (Grenoble INP) Grenoble, France. 2 STMicroelectronics. Grenoble, France Work partially supported by HELP ANR project. MEMOCODE, July 2011 Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 1 / 22 >.

(2) jTLM. Duration. Applications. Implementation. Conclusion. Outline. 1. Transaction Level Modeling and jTLM. 2. Time and Duration in jTLM. 3. Applications. 4. Implementation. 5. Conclusion. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 2 / 22 >.

(3) jTLM. Duration. Applications. Implementation. Conclusion. Outline. 1. Transaction Level Modeling and jTLM. 2. Time and Duration in jTLM. 3. Applications. 4. Implementation. 5. Conclusion. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 3 / 22 >.

(4) jTLM. Duration. Applications. Implementation. Conclusion. Modern Systems-on-a-Chip. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 4 / 22 >.

(5) jTLM. Duration. Applications. Implementation. Conclusion. Modern Systems-on-a-Chip Software. Hardware. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 4 / 22 >.

(6) jTLM. Duration. Applications. Implementation. Conclusion. Transaction-Level Modeling. (Fast) simulation essential in the design-flow I I I. To write/debug software To validate architectural choices As reference for hardware verification. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 5 / 22 >.

(7) jTLM. Duration. Applications. Implementation. Conclusion. Transaction-Level Modeling. (Fast) simulation essential in the design-flow I I I. To write/debug software To validate architectural choices As reference for hardware verification. Transaction-Level Modeling (TLM): I I. High level of abstraction Suitable for. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 5 / 22 >.

(8) jTLM. Duration. Applications. Implementation. Conclusion. Transaction-Level Modeling. (Fast) simulation essential in the design-flow I I I. To write/debug software To validate architectural choices As reference for hardware verification. Transaction-Level Modeling (TLM): I I. High level of abstraction Suitable for. Industry Standard = SystemC/TLM. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 5 / 22 >.

(9) jTLM. Duration. Applications. Implementation. Conclusion. SystemC/TLM vs. “TLM Abstraction Level” SystemC. Matthieu Moy (Verimag). TLM. Modeling of Time/jTLM. MEMOCODE, July 2011. < 6 / 22 >.

(10) jTLM. Duration. Applications. Implementation. Conclusion. SystemC/TLM vs. “TLM Abstraction Level” SystemC. TLM. Cycle accurate TLM 2.0. RTL. Gate level. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 6 / 22 >.

(11) jTLM. Duration. Applications. Implementation. Conclusion. SystemC/TLM vs. “TLM Abstraction Level” SystemC. TLM. Cycle accurate TLM 2.0. RTL. ?. Gate level. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 6 / 22 >.

(12) jTLM. Duration. Applications. Implementation. Conclusion. SystemC/TLM vs. “TLM Abstraction Level” SystemC Cycle accurate. Parallelism. Clocks RTL Coroutine semantics Gate level δ-cycle. Matthieu Moy (Verimag). TLM. Function TLM calls 2.0. Modeling of Time/jTLM. ?. MEMOCODE, July 2011. < 6 / 22 >.

(13) jTLM. Duration. Applications. Implementation. Conclusion. SystemC/TLM vs. “TLM Abstraction Level” SystemC Cycle accurate. jTLM = this talk. Parallelism. Clocks RTL Coroutine semantics Gate level δ-cycle. Matthieu Moy (Verimag). TLM. Function TLM calls 2.0. Modeling of Time/jTLM. ?. MEMOCODE, July 2011. < 6 / 22 >.

(14) jTLM. Duration. Applications. Implementation. Conclusion. jTLM: goals and peculiarities. jTLM’s goal: define “TLM” independently of SystemC I I I. Not cooperative (true parallelism) Not C++ (Java) No δ-cycle. Interesting features I I. Small and simple code (≈ 500 LOC) Nice experimentation platform. Not meant for production. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 7 / 22 >.

(15) jTLM. Duration. Applications. Implementation. Conclusion. Outline. 1. Transaction Level Modeling and jTLM. 2. Time and Duration in jTLM. 3. Applications. 4. Implementation. 5. Conclusion. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 8 / 22 >.

(16) Duration. Applications. Implementation. Conclusion. Simulation Time Vs Wall-Clock Time. Wall-clock time. jTLM. Time elapse Computation. 0. 10. 20. 30. 40. Simulation time. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 9 / 22 >.

(17) jTLM. Duration. Applications. Implementation. Conclusion. jTLM. SystemC. Time in SystemC and jTLM. A B. P Q. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 10 / 22 >.

(18) jTLM. Duration. Applications. Implementation. Conclusion. jTLM. SystemC. Time in SystemC and jTLM Process A: // computation f(); // time taken by f wait(20, SC_NS);. A B. P Q. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 10 / 22 >.

(19) jTLM. Duration. Applications. Implementation. Conclusion. Time in SystemC and jTLM. jTLM. SystemC. f() wait(20). Process A: // computation f(); // time taken by f wait(20, SC_NS);. A B. P Q. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 10 / 22 >.

(20) jTLM. Duration. Applications. Implementation. Conclusion. jTLM. SystemC. Time in SystemC and jTLM f() wait(20). Process A: // computation f(); // time taken by f wait(20, SC_NS);. g() awaitTime. Process P: g(); awaitTime(20);. A B. P Q. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 10 / 22 >.

(21) jTLM. Duration. Applications. Implementation. Conclusion. jTLM. SystemC. Time in SystemC and jTLM f() wait(20). Process A: // computation f(); // time taken by f wait(20, SC_NS);. g() awaitTime. Process P: g(); awaitTime(20); consumesTime(15) { h(); }. A B. P. h(). Q. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 10 / 22 >.

(22) jTLM. Duration. Applications. Implementation. Conclusion. jTLM. SystemC. Time in SystemC and jTLM f() wait(20). Process A: // computation f(); // time taken by f wait(20, SC_NS);. g() awaitTime. Process P: g(); awaitTime(20); consumesTime(15) { h(); }. A B. h(). P Q. i(). Matthieu Moy (Verimag). j(). Modeling of Time/jTLM. MEMOCODE, July 2011. < 10 / 22 >.

(23) Duration. Applications. Implementation. Conclusion. Time à la SystemC: awaitTime(T). By default, time does not pass ⇒ instantaneous tasks. Wall-clock time. jTLM. awaitTime(T) : let other processes execute for T time units. Time elapse Computation 0. 10. 20. 30. 40. Simulation time f(); // instantaneous awaitTime(20);. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 11 / 22 >.

(24) jTLM. Duration. Applications. Implementation. Conclusion. Task with Known Duration: consumesTime(T). Semantics: I I. Start and end dates known Actions contained in task spread in between. Advantages: I I I. Model closer to actual system Less bugs hidden Better parallelization. Matthieu Moy (Verimag). Modeling of Time/jTLM. consumesTime(15) { f1(); f2(); f3(); } consumesTime(10) { g(); }. MEMOCODE, July 2011. < 12 / 22 >.

(25) jTLM. Duration. Applications. Implementation. Conclusion. Execution of consumesTime(T) Fast computation. Slow computation Task finishes. Task starts 0. 10. 20. 30. Computation ends. Wall-clock time. Wall-clock time. Simulation time blocked. 40. Rest of the platform drives time Task starts 0. Simulation time. Task finishes. 10. 20. 30. 40. Simulation time idle. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 13 / 22 >.

(26) jTLM. Duration. Applications. Implementation. Conclusion. Outline. 1. Transaction Level Modeling and jTLM. 2. Time and Duration in jTLM. 3. Applications. 4. Implementation. 5. Conclusion. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 14 / 22 >.

(27) jTLM. Duration. Applications. Implementation. Conclusion. Exposing Bugs Example bug: mis-placed synchronization: flag = true; awaitTime(5); writeIMG(); awaitTime(10);. ||. while(!flag) awaitTime(1); awaitTime(10); readIMG();. ⇒ bug never seen in simulation. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 15 / 22 >.

(28) jTLM. Duration. Applications. Implementation. Conclusion. Exposing Bugs Example bug: mis-placed synchronization: flag = true; awaitTime(5); writeIMG(); awaitTime(10);. ||. while(!flag) awaitTime(1); awaitTime(10); readIMG();. ⇒ bug never seen in simulation consumesTime(15) { flag = true; writeIMG(); }. ||. while(!flag) awaitTime(1); awaitTime(10); readIMG();. ⇒ strictly more behaviors, including the buggy one. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 15 / 22 >.

(29) jTLM. Duration. Applications. Implementation. Conclusion. Parallelization P1 jTLM’s Semantics P2 Simultaneous tasks run in parallel. P3 P4. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 16 / 22 >.

(30) jTLM. Duration. Applications. Implementation. Conclusion. Parallelization P1 jTLM’s Semantics P2 Simultaneous tasks run in parallel. P3. Non-simultaneous tasks don’t P4. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 16 / 22 >.

(31) jTLM. Duration. Applications. Implementation. Conclusion. Parallelization P1 jTLM’s Semantics P2 Simultaneous tasks run in parallel. P3. Non-simultaneous tasks don’t Overlapping tasks do. P4. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 16 / 22 >.

(32) jTLM. Duration. Applications. Implementation. Conclusion. Parallelization P1 jTLM’s Semantics P2 Simultaneous tasks run in parallel. P3. Non-simultaneous tasks don’t Overlapping tasks do. P4 Back to SystemC: I I. Parallelizing within δ-cycle = great if you have clocks Simulation time is the bottleneck with quantitative/fuzzy time. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 16 / 22 >.

(33) jTLM. Duration. Applications. Implementation. Conclusion. Outline. 1. Transaction Level Modeling and jTLM. 2. Time and Duration in jTLM. 3. Applications. 4. Implementation. 5. Conclusion. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 17 / 22 >.

(34) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant. P, Q, R Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(35) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant. awaitTime(50). Q, R Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). P Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(36) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant awaitTime(30). R Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). Q. P. Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(37) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant. awaitTime(90). Q Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). P. Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. R Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(38) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant. Time Elapse Q Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). P. Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. R Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(39) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant. Q Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). P. Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. R Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(40) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and awaitTime(T) Current instant awaitTime(30). P Process P: f(); awaitTime(50);. Matthieu Moy (Verimag). Process Q: h(); awaitTime(30); g(); awaitTime(30); Modeling of Time/jTLM. R. Q. Process R: i(); awaitTime(90);. MEMOCODE, July 2011. < 18 / 22 >.

(41) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T). What about consumesTime(T) ?. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 19 / 22 >.

(42) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. P, Q, R Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30); g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(43) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. consumesTime(50). Q, R. P. Process P: Process R: Process Q: f(); l(); i(); awaitTime(90); consumesTime(50){ awaitTime(30); g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(44) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. Q, R. P. Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30);  g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(45) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant awaitTime(30). R. Q. P. Process R: Process P: Process Q: l(); f(); i(); awaitTime(90); consumesTime(50){ awaitTime(30);  g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(46) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. awaitTime(90). Q. P. R. Process R: Process P: Process Q: l(); f(); i(); awaitTime(90); consumesTime(50){ awaitTime(30);  g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(47) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. Time Elapse Q. P. R. Process R: Process P: Process Q: l(); f(); i(); awaitTime(90); consumesTime(50){ awaitTime(30);  g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(48) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. Q. P. R. Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30);  g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(49) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant consumesTime(30). P. Q. R. Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30);  g(); j(); } consumesTime(30){ h(); k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(50) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. P. Q. R. Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30);  g(); j(); } consumesTime(30){ h();  k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(51) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. Time Elapse P. Q. R. Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30); g(); j(); } consumesTime(30){ h();  k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(52) jTLM. Duration. Applications. Implementation. Conclusion. Time Queue and consumesTime(T) Current instant. P. Q. R. Process P: Process R: Process Q: f(); l(); i(); consumesTime(50){ awaitTime(90); awaitTime(30); g(); j(); } consumesTime(30){ h();  k(); } Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 20 / 22 >.

(53) jTLM. Duration. Applications. Implementation. Conclusion. Outline. 1. Transaction Level Modeling and jTLM. 2. Time and Duration in jTLM. 3. Applications. 4. Implementation. 5. Conclusion. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 21 / 22 >.

(54) jTLM. Duration. Applications. Implementation. Conclusion. Perspectives Summary I I I. Tasks with duration Exhibit more behaviors/bugs Better parallelization. Skipped from the talk (cf. paper) I I. Tasks with a priori unknown duration jTLM’s cooperative mode. Perspectives I I I. Adapt the ideas to SystemC (ongoing, not so hard) Run-time Verification to explore schedules (science-fiction) Open-Source Release?. Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 22 / 22 >.

(55) jTLM. Duration. Applications. Implementation. Conclusion. Perspectives Summary I I I. Tasks with duration Exhibit more behaviors/bugs Better parallelization. Skipped from the talk (cf. paper) I I. Tasks with a priori unknown duration jTLM’s cooperative mode. Perspectives I I I. Adapt the ideas to SystemC (ongoing, not so hard) Run-time Verification to explore schedules (science-fiction) Open-Source Release?. Thank you! ; Questions? Matthieu Moy (Verimag). Modeling of Time/jTLM. MEMOCODE, July 2011. < 22 / 22 >.

(56)

Références

Documents relatifs

7.1 Three level hierarchical model, showing the discrete cell population and cell division controllers, and the continuous single-cell model.. This model generates pedigree trees

The proposed method is inspired by conventional linear system theory : from an ARMA form of the model and the system impulse response, the model parameters are computed by using a

For example, it is possible to specify for a given event: a desired number of occurrences in an interval of fixed dates, a minimum and/or a maximum time separation between

- Le codage de source rend plus vulnérable aux erreurs de transmission, qui entraînent la multiplication des erreurs après décodage de source (d’autant que les mot-codes sont

Table 4.5: Comparison of network layer decisions for various on-chip communica- tion architectures: topology, routing technique and routing granularity.. 4.23 Related work

Mais pour faire levain, les espaces ruraux ont besoin de populations bi-culturelles, de personnes qui partagent l’idéal de la transition et qui sont en même temps en connivence

Pour le montrer, nous soulignerons que les maladies infectieuses comme la COVID-19 ont longtemps laissé totalement indifférents les spécialistes de l’éthique des soins

Les principales contributions de cet ouvrage sont repr´ esent´ ees par : (1) le d´ eveloppement d’un simulateur de r´ eseaux sur puce complet, pr´ ecis au cycle pr` es, bas´ e