1 / 24

PowerPC

PowerPC. Practicum. Introductie. Doel practicum = Computers begrijpen Leer de werking van een computer door een emulator te bouwen. Introductie. Opzet college Introductie PowerPC Systeem Omgeving Opzet Practicum Hoe-haal-ik-het Eisen. Introductie. Informatie en Materiaal

katoka
Télécharger la présentation

PowerPC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PowerPC Practicum

  2. Introductie Doel practicum = Computers begrijpen Leer de werking van een computer door een emulator te bouwen.

  3. Introductie Opzet college • Introductie • PowerPC Systeem • Omgeving • Opzet Practicum • Hoe-haal-ik-het • Eisen

  4. Introductie Informatie en Materiaal • http://www.pds.twi.tudelft.nl/vakken/in101/labcourse/ • Tutorial • Assistenten • Studenten

  5. Systeem PC R0 MEMORY R1 LR R2 CR0 PPC CPU R31

  6. Systeem Geheugen - Labels ; Macht ; pre: R2 is exponent ; post: R1 is 2^exponent MACHTEN: .byte 1, 2, 4, 8, 16 .align 4 Macht: LBZ R1, MACHTEN(R2) ; laad 2^R2 uit tabel BLR

  7. Systeem 0x1000 0x1004 0x1008 0x100C 0x1010 0x1014 Machten = 1004 Macht = 100C 1 2 4 8 16 32 . . c o d e

  8. Systeem Jumptable: Table: .word Macht, Som, Verschil .align 4 Macht: … ; subroutine macht blr Som: … ; subroutine Som Verschil: … ; subroutine Verschil

  9. Systeem 0x1000 0x1004 0x1008 0x100C 0x1010 0x1014 Table = 1000 Macht = 100C Som = 2008 Verschil = 4096 ? ? ? ? ? ? ? ? ? ? ? ? c o d e

  10. Systeem Table = 1000 ← adres ‘Macht’ ← adres ‘Som’ ← adres ‘Verschil’ Macht = 100C 0x1000 0x1004 0x1008 0x100C 0x1010 0x1014 1 0 0 c 2 0 0 8 4 0 9 6 c o d e

  11. Systeem ; R1 bevat nummer van type berekening ; 0 = macht; 4 = som; 8 = verschil. LWZ R2, Table(R1) ; pak adres uit ; Tabel MTLR R2 ; Zet in Link Register BLRL ; Ga naar die subroutine ; en update LR

  12. Omgeving • Terminal voor I/O • I/O in Tutorial • R0 NIET gebruiken • Programma OK Omgeving OK • Breakpoints / Step in handleiding

  13. Inhoud Practicum Deel A • Introductie • Subroutines • Recursie

  14. Inhoud Practicum Deel B • Ophalen van instructies • Decoderen / controleren • Executie voorbereiden

  15. Inhoud Practicum Deel C • Instructie Set • Test Programma

  16. Aanpak • Doe het tutorial • Begin gewoon • Vraag dingen • Specificatie controleren voor coden • Lees de aanwijzingen bij de opgaven

  17. Aanpak GOED: • Overleggen • Samenwerken • Voorbeelden bekijken • Vragen aan Assistenten FOUT: 2 personen met 1 uitwerking

  18. Aanpak Hints Deel A • LHA vs. LHZ bij -1 • Deel A klaar = ½ klaar!

  19. Aanpak Hints Deel B • Bij PC > 1023 NIET stoppen • Lookup Table

  20. Aanpak Hints Deel C • Jumptable • SAP/STAP assembler op website!

  21. Goedkeuren Specificatie • Verduidelijkend • NIET facultatief • Algorithme formuleren • GEEN implementatie-details

  22. Goedkeuren Commentaar: Nuttig en Verduidelijkend: FOUT: li R1, 0 ; R1 = 0 GOED: li R1, 0 ; Initialiseer Teller

  23. Goedkeuren Source Code • Commentaar • Netjes • Uitprinten • 1 source per persoon

  24. Goedkeuren Test Programma: Een aantal getallen optellen is NIET alleen twee getallen optellen.

More Related