Download presentation
Presentation is loading. Please wait.
Published byHoward Pitts Modified over 9 years ago
1
Teaching the simulator design in Java Zaharije Radivojević, Miloš Cvetanović 11th Workshop “Software Engineering Education and Reverse Engineering” Ohrid, Macedonia 22-27 August 2011
2
11th Workshop SEE and RE 2/18 Agenda Course description Simulator design Simulation algorithms Project description Conclusions
3
11th Workshop SEE and RE 3/18 Computer Architecture and Organization 2 Type: Mandatory course Starts: 6 semester (of 8 semesters for bachelor studies) Class hours: 2+2+1 Format: –Midterm 20 –Laboratory 20 –Project 40 –Final 20
4
11th Workshop SEE and RE 4/18 Relation to other courses SemesterSoftwareHardware 4OOP JavaComputer architecture 5Computer architecture and orgranization1 6System programmingComputer architecture and orgranization2 7Design patterns 8Software engineeringVLSI design 8Computer performances
5
11th Workshop SEE and RE 5/18 Course Syllabus Part 1: Processor design – 9 weeks –Processor structure –Processor architecture –Processing unit –Control unit Part 2: Simulator design – 5 weeks –Simulators survey –Simulator characteristics –Visual simulation –Simulator testing
6
11th Workshop SEE and RE 6/18 Simulators survey System Hierarchical Representation Component Design Component Scripting Component Parameterization Physical Characteristics Visual Presentation Parallel Execution Simulation Control ANTNo BC CPU SimYesNo IC DigLC2YesNo YesNoIC DLXviewYesNo YesNoIC EDCOMPYesNo YesNoIC HASENoYes NoYesNoIC HASE-DineroNo YesNoIC JCachesimNo YesNoBC JHDLYes NoIC LogisimNoYesNo YesNoIC M5Yes NoYes NoYesBC RMYesNo YesNoIC RSIMNo BC SIMCANo YesBC SimFlexNo YesNo YesBC SimicsNoYesNoYes NoYesBC SimOSNo BC SimpleScalarNo BC VSDSYes No YesNoIC
7
11th Workshop SEE and RE 7/18 Simulator characteristics
8
11th Workshop SEE and RE 8/18 Logic components Principles of logical simulations Usage of building blocks Component internal structure modeling Modeling: –Signals –Delays –Connections Creating component libraries Component re-usage
9
11th Workshop SEE and RE 9/18 Simulation execution Delay modeling Event driven simulation Time driven simulation Parallel simulations Simulation algorithms Optimization of simulation algorithms
10
11th Workshop SEE and RE 10/18 Simulation algorithms - 1 public void run() { init(); while (!end) { lastMsg = queue.getMsg(); localTime = lastMsg.getEnd(); work(lastMsg); } Single thread algorithm
11
11th Workshop SEE and RE 11/18 Simulation algorithms - 2 public void run() { init(); while (!end) { Message m = queue.getMsg(); if (!isTimeInTheRange(m)) { queue.putMsg(m); synchronize(); m = queue.getMsg(); } lastMsg = m; localTime = lastMsg.getEnd(); work(lastMsg); } Multithread algorithm-pessimistic
12
11th Workshop SEE and RE 12/18 Simulation algorithms - 3 public void run() { init(); while (!end) { Message m = queue.getMsg(); if(localTime > m.getEnd()){ restart(m.getEnd()); continue; } lastMsg = m; localTime = lastMsg.getEnd(); if (lastMsg.ok()) { work(lastMsg); pastMsg.putMsg(lastMsg); } Multithread algorithm-optimistic
13
11th Workshop SEE and RE 13/18 Visual simulation Components’ graphical interface Component positioning Communication between logical component and graphical interface Usage of MVC and Observer patterns Loading/saving components
14
11th Workshop SEE and RE 14/18 Visual simulation
15
11th Workshop SEE and RE 15/18 Practical work Part 1: Hardware project –Processor architecture and organization design Part 2: Software project –Simulator architecture 4 students teams Bachelor students (129 students in 34 teams) Review audit Functional testing
16
11th Workshop SEE and RE 16/18 Results Grades: (5 fail – 10 excellent)
17
11th Workshop SEE and RE 17/18 Results Remarks: –Combining hardware and software projects –Creating practical and visual software –Working in teams –Learning new technologies –Grade independently hardware and software parts
18
11th Workshop SEE and RE 18/18 Conclusion Students received practical experience using OOP and Java Methods for describing logical behavior of hardware Understanding of simulation algorithms that are necessary for other courses Combining patterns in order to support visual presentation of elements Hard to understand simulation and physics layer 81% of students passed
19
Thank you! Radivojevic Zaharije
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.