laboratórios de computadores: apresentação computer labs ...pfs/aulas/lcom2016/at/1apres.pdf ·...

28
Laboratórios de Computadores: Apresentação Computer Labs: Introduction 2 o MIEIC Pedro F. Souto ([email protected]) September 19, 2016

Upload: others

Post on 06-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Laboratórios de Computadores:Apresentação

Computer Labs: Introduction2o MIEIC

Pedro F. Souto ([email protected])

September 19, 2016

Page 2: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Staff

I João Paiva Cardoso ([email protected])I Nuno Paulino ([email protected])I Ricardo Nobre ([email protected])I Tiago Boldt ([email protected])I Pedro Ferreira do Souto ([email protected])

Page 3: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Objectives

Upon successful completion of this class you shouldbe able to:

1. Program at the HW interface level of the mostcommon PC I/O Devices

2. Develop system-level programs3. Use software tools typical of large programming

projects

Page 4: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Prerequisites

I ProgramaçãoI You’ll program a lot, mostly in C

I but also in assemblyI ... for the IA-32 architecture

I Microprocessadores e Computadores PessoaisI Arquitectura de ComputadoresI If you have not completed Programação,

you should consider to drop LCOM

Page 5: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Syllabus

I/O devicesC programming with assemblyProgramming tools

Page 6: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

MethodLearn by doing

“I hear, I forget. I see, I remember. I do, I understand”Several short lab assignments

I Each focusing on one I/O deviceI Some of them take only one lab class, others take two

lab classesI Requiring a preparation of about 6 hours per lab class

(excluding classes)One integration project

I Must use at least 3 different I/O devicesI Must use interruptsI Should use both C and assemblyI Should require about 9 hours per week (during 5 weeks)

Note: Both lab assignments and project should be done ingroups of 2 students.

Page 7: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Recent Changes Still in Place

What? There are no lab classes on the RTC or on the serialport (UART)

I However, we will still talk about them in the lecturesI Students wishing to get a grade of 16 or better, are

expected to use these devices anywayI To use any of these devices you are required to use all

the other

Why?I Have more lab classes for the other I/O devices

I Most of them now have 2 lab classesI Remove some pressure out of the graded lab

assignmentsExpected results (and fulfilled)

I Less cheatingI Higher passing rate

Page 8: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Work Load

I LCOM has 6 ECTS, i.e. about 160 hoursI Assuming 1 ECTS equal to 27 hours

I Check out the European Credit Transfer and AccumulationSystem (ECTS)

I If you share the load with your team-mate, this should notbe a problem.

Unit Hours/Week No. Weeks TotalLectures 2 12 24Labs. 3 11/9 33/27Prep. L0 1 5 5Prep L2-L5 8 6 48Proj. 5 9 45Slack 7/13Total 162

Page 9: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Bibliography and Other Resources

I PC HW is well documented on several books and onlineresources

I Book mentioned in SIFEUPMazidi, Muhammad, The 80x86 IBM PC andCompatible Computers: Assembly Language,Design and Interfacing, 4th Ed., Prentice-Hal

Note that it does not cover all the subjects, and that, on theother hand, it has a lot more material than needed for thisclass.

Page 10: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Grading (1/2)1. Four lab assignments are graded.

I You must submit your code via SVN at the end of the lastclass of every lab;

I Grading will be done off-line on code retrieved from theSVN repository

2. We will also grade your participation in the class, i.e.whether you have prepared the lab, whether youparticipate actively and your contribution to the work ofyour team

3. The final project must be demonstrated in January (from4th to 6th)

Formula∑

ci ∗ 0.15 + 0.45 FP + 0.1 CP

where ci is the grade of 3 graded-labs (out of 4) of your choiceBUT for a final grade of 19 or 20,you must "choose" the mouse lab

I.e., we’ll use the best 3 grades of the 4 graded labassignments, except for final grades higher than 18.

Page 11: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Grading (2/2)I All grades are individual

I Even though labs and projects should be done in groupsI Lab/project grades are normalized for groups of 2I The grade of each group member is obtained by applying a

factor to the group’s gradeI The factor depends on the member’s

contribution mostlyparticipation alsoto the final result

I We will use a piecewise linear function to determine thevalue of the factor

I Likely "breakpoints" are: (0,0), (0.33,0.8), (0.5,1), (0.8, 1.1)and (1, 1.1)

I Each member of the group must fill a Google form with itsown self-assessment (contribution and participation) ofeach of the labs/projects submitted by the end of the day ofthe respective deadline

I Failure to comply, leads to a penalty of 10% in the grade

Page 12: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Final Project Grading (1/2)Execution: 40% + 10%

I 10% for demo in the last lab classCode: 20%

I Structure and ModularityI Documentation (use Doxygen)I Readability

I Names and commentsI Indentation

I Compilation warningsFinal Report: 20%

I Summary of what is and what is not implemented;I Usage instructions (with images)I Description of the program’s architectureI Relevant implementation aspects (grades above 18)I Function call diagram

Tools: 5% (SVN) (We expect you to commit to the SVNrepository at least once a week, and to log messages then)

Project Specification: 5%

Page 13: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Final Project Grading (2/2)

I To the grade obtained by applying the above criteria, we’ll apply:Difficulty Factor

I number and type of I/O devicesI features used of the I/O devicesI I/O techniques used (interrupt vs. polling)I use and extent of assembly programming

Originality FactorTeam Management Factor

I load share among group members

Marketing BonusI of 1 valor for the participation in the Semana Profissão

Engenheiro (SPE), sometime in March 2017I in recent years, we have selected 3 or 4 projects per year

Page 14: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Final Project MilestonesProject proposal: Beginning of the 7th lab (week starting 14th

November)I Half to one page description of the functionalities

desired, of the devices used and their role in theprogram

I Must be rewritten in class, if the instructor does notaccept it

Project specification: Beginning of 8th lab class (week starting21st November)

I Refinement of the proposal, identifying the modules toimplement, their functionality and API.

I Should include planning of the projectI Must be rewritten in class, if the instructor does not

accept itFirst demo: At the last lab class of the semester.Project submission: January 2th, 20:00 (to be confirmed)Project presentation: January: 4th to 6th (to be confirmed)

Page 15: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Project Examples

I Games (video, timer, keyboard and mouse)I Two user games (video, timer, keyboard and serial port)I Electronic calendar (video, keyboard, mouse, RTC and

timer)I Music composer/player (video, keyboard, mouse and timer)I Text editor (video, keyboard, mouse, timer and RTC)I Typing tutor (video, keyboard, mouse, timer)I File transfer between PCs (video, keyboard, serial port)I Chat between PCs (video, keyboard, serial port)I Video player (video, keyboard, mouse, timer and RTC)I Drawing/painting program (video, keyboard, mouse, timer,

RTC and serial port)

Page 16: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

TEs Grading

Labs 3 of the 4 graded labs, each with a weight of 15%I Presentation/discussion in the week of that lab class

I Student must get in touch with me ([email protected]) to arrange foran hour, at least 7 calendar days in advance

I Submission at the end of presentation/discussionProject Similar to that of the other students, but with a weight of 55%.

I Presentation/discussion of proposal and specification in thesame week as that of the other students

I Student must get in touch with me ([email protected]) to arrange fora date and hour, at least 7 calendar days in advance

I Submission by the same deadline as other studentsI Presentation/discussion in the same period as for other

students (in January 4th through 6th).

Page 17: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Grading in “Época Especial”

Project Similar to that of the other students, but with a weight of100%

I Presentation/discussion of proposal and specificationI Student must get in touch with me ([email protected]) to arrange for

a date and hour, at least 7 days in advanceI Submission and presentation/discussion within 7 days of

approval of the specification

Page 18: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Special Evaluation

IMPORTANT Students wishing to:1. be assessed as TE’s2. use their labs/project (positive) grades from 2014/2015 or

2015/2016must fill this Google form by the end of this week, i.e. 2016-09-23.

IMPORTANT Please note that by choosing this option, you may haveto work alone in some or all grading components

I If you do not want to work alone, it will be up to you to create agroup (together with other students) or find a group thataccepts you as a new member.

Page 19: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Academic IntegrityI The UP and we take this issue very seriously

I Check the Despacho do Reitor No 08/09/2011I We believe that the majority of you follow the rules

I You are allowed to discuss the labsI For each lab and for the project, there will be a discussion

forum on MoodleI However, all code submitted should be either:

I Developed by the group membersI Provided by me

I We will use tools to automatically detect common codeI All groups with common code will be penalizedI You cannot show or share code

The lab assignments are identical to those of last year, butthis is no excuse

I The penalty may range:From a zero in that lab and a penalty of “2 valores” in your

final grade;To failing the course (especially, in case of relapse or of

the project)I The delay in publishing the grades is no excuse.

Page 20: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Important DatesLabs

Lab Week Topic CommentsLab 0 26-09 Redmine, Devel. and SVN Not gradedLab 2 03-10 Timer Two classesLab 3 17-10 Keyboard Two classesLab 4 07-11 Mouse One class, plus Semana da FEUPLab 5 14-11 Video (graphics) Two classes

I Lab 1 was cancelled because this semester has 1 week less

ProjectWhat Week CommentsProposal 14-11 7th lab classSpecification 21-11 8th lab classFirst demo 14-12 Last lab classSubmission 2017-01-02 @ 20:00 To be confirmedPresentation 4, 5 and 6 January, 2017 (afternoon) To be confirmed

I Three lab classes (but Thursday section will have only two)I We will try to schedule at least one extra class (whose attendance

is not mandatory, but to your advantage)

Page 21: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Lab Sections

I I’ve instructed the secretariat not to accept more than 30students per section

I Room B107 has only 15 PCs, andI each group should have only 2 students

I Any changes will have to be done by permutation amongsections

I We have created a forum in LCOM’s Moodle explicitly with thatpurpose

I Next week, students will be allowed to join only groups intheir sections

Page 22: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Acknowledgments

I Prof. António Miguel Pimenta Monteiro (who designed thecourse)

I Prof. João Cardoso (not the same person as TC’s lecturer)(who perfected it)

I The lab technicians:I Rui Fernandes (from previous years)I Nuno Sousa (from previous years)

Page 23: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Thank You!

Page 24: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Questions?

Page 25: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Platform

MINIX 3Unix-like operating system that allows privileged userprocesses to:

I Access every memory addressI Access directly I/O devicesI Process interrupts

LinuxI MINIX 3 is installed in a VirtualBox VM

Page 26: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Software

I Eclipse with the Remote System Explorer pluginI GNU C compiler and assemblerI Other SW development tools

I makeI SVNI doxygenI ar

Page 27: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Announcements

LecturesI Start 10 minutes after the hour, i.e. 14:10.

I Actually, this is a FEUP’s rule, and therefore applies also tolab classes

LabsI Start next week, i.e. September 26

I All sections will have 11 lab classes, except those onThursday, which will have only 9 lab classes

I We’ll try to schedule extra classes for 2MIEIC01I There is only one possible slot in B007 – Wednesday from

17:00 to 20:00

Page 28: Laboratórios de Computadores: Apresentação Computer Labs ...pfs/aulas/lcom2016/at/1apres.pdf · Apresentação Computer Labs: Introduction 2o MIEIC Pedro F. Souto (pfs@fe.up.pt)

Advice

For Lecture Preparation

I Read the material before the lecture:I In each lecture before a lab assignment, I’ll present:

I The concepts and the information required to complete thatlab class

I Provide hints to address the key issues of the labI The lecture slides will be available at least the day before at:

http://web.fe.up.pt/ pfs/aulas/lcom2016/I The handout of every graded lab will be also available by

Thursday of the previous week via the same URLso that you can:

I Understand better the lectureI Participate more actively in the lectureI Get your questions answered before the lab class

I If I’m late and you cannot wait, check last year’s materialavailable at http://web.fe.up.pt/ pfs/aulas/lcom2015/