Building a COFFEE POT simulation on CCESS for Blackfin BF533

Size: px
Start display at page:

Download "Building a COFFEE POT simulation on CCESS for Blackfin BF533"

Transcription

1 Building a COFFEE POT simulation on CCESS for Blackfin BF533 Last lecture covered some detailed ideas Let step back and do something simpler to get an introduction of ideas needed for Lab0 and Assignment 1 CCES is based on Eclipse Continued

2 First steps in Assignment 1 We have Built a Project and then a main( ) as a driver of other functions meaning make calls to other functions no detailed code Software Engineering concept Abstraction as an approach to simplify coding and testing Need to discuss what it is important to understand the difference between Introduced Error and Discovered Defect and impact on time spent when developing assignments and labs (and quizzes and life) We will solve and prevent problems by CODE REVIEW to avoid L.S.D.s like typos (Compiler messages) Adding our own header files (fix Unresolved compiler messages) Adding a library (system errors) linker messages Adding STUBs for our own functions to resolve linker errors RUN A TEST ON MAIN Checks that system (hardware and software is functioning) Check that the program flow is correct by calling functions the functions are stubs, perhaps without all the full code detail

3 PSP Start with a Test does systemstill work main( ) to CoffeePot_main.cpp Before clicking Build project to activate the compiler Do a CODE REVIEW BEFORE compiling (PSP Personal Software Process) Fix all syntax errors that editor is telling you about The number of syntax found by compiler and not you indicates possible logical mistakes (now DEFECTS) left behind in your code not found by you or compiler and likely to cause time waste later Mistakes of the type LOGICAL DEFECTS will take MUCH time to correct as you DON T KNOW when you made them, where they are, and what knock on effect they are having!

4 My Personal Software Process (PSP) Never more than ideas to think about Never have code segment that occupies more than a screen (Turn screen long ways is a partial fix) If code occupies more than a screen then move code portions into a subroutine / function S.E. Abstraction Plan the project in parts S.E. Abstraction less to worry about at one time Do things in a standard order so you do the right things automatically (PSP)^2) Practice Safe Programming in PSP Make code readable to yourself later (when stressed out (always)) Make main( ) a series of calls to functions (flow, 7 + 2); Add YOUR function prototypes (interface) into header (no compiler defects) Add stubs (placeholder code) for all your functions (no linker defects) Compile, Link, Download, Run and (IYAG) move to next stage

5 Plan Ahead in small chunks Need to tell simulator how many coffeepots you want to simulate adding to the embedded system Check that simulator set up the number of coffeepots Find out where the plug and play control system placed the coffeepots you requested (hardware addresses to access) Control whether you will do simulation using functions written C / C++ code or using Assembly code (Need both) Watch for some hints about doing the more complex Assignment 2 where you control rather than display coffeepots Learn how to recognize some standard LSD issues LSD are Little Stupid Details causing catastrophic errors

6 How to waste BEACOUP de temps in assignments and laboratories Ignore all the warning message from the IDE tools that your code is wrong Just activate Build project icon and watch and wait for errors to appear Get into PSP habit of Code Review as you go along

7 PSP Avoiding having header issues Are these Compiler or Linker defect messages? What PSP steps did the person forget to do to cause these errors? or are they defects? And why care? // More prototypes added as we move through assignment 1) COFFEPTOT1 2) Too few args Why might IDE cntrl space hot key help?

8 CoffeePot_SimulatorFunctions2017.h Look inside Name So everybody gets a different assignment Is it hot key Cntrl space for help (after F12 refresh)

9 Fixing two types of Linker errors you could have avoided with PSP code review Add Do_Simulation_CPP( ) STUB code to fix / avoid the linker error about our code Add Coffeepot Library.dlb (See Lab0 Familiarization) to fix / avoid other linker errors about SYSTEM CALLS

10 Rebuild project Ready to RUN TEST OF MAIN MAGIC You will get an error about missing Symbol USE_CCES_GUI_Delay when you link in Coffeepot2015 library (dlb) Add the following MAGIC code to MyCoffeePotFunctions_CPP.cpp WAIL void USE_CCES_GUI_Delay(void) { /* DO NOTHING */ } BUILD PROJECT Then DEBUG AS and see what happens

11 Runtime Defect caused by mistake in defining COFFEEPOT1 in enum Computers count from 0; USERS count from 1 NOTE: I am running at home using a Blackfin533 simulator session (no hardware needed) Fix defect (error out of phase) and run again

12 Oh!! We all had a tragic accident Remember: Embedded Systems are safety critical, so Practice Safe Programming habits Real World Nobody remembered to plug in coffeepot embedded system crashed Embedded World Program tried to access nonexistent memory. This caused an EXCEPTION EMBEDDED SYSTEM FAILURE No EXCEPTION HANDLER was provided to printout message System will start aging as nothing plugged in so EVERYTHING TOTAL SYSTEM FAILED!

13 SIMULATING adding 4 MOCK coffeepot interfaces into embedded system Auto Plug and play You add in the interface (USB stick of coffeepot connection) The operating system assigns memory for the interface Manual Plug and play used here deliberately so you can get a chance to learn how to change how the LDF (Loader Descriptor File) manipulates the memory allocation inside any embedded system environment e.g. Code used fast on chip memory rather than slow external

14 Simulating plug and play operations Click on system.svc, then Startup Code / LDF, then LDF, then ADD (Stacks and Heaps) Add memory space for COFFEEPOT1 (Heap1), COFFEEPOT2 (Heap2). T.I.S. No save button so Control S to save LDF.

15 Go back to CCES, rebuild and run. Display you get with Init_CoffeePotSimulation(numCoffeePots_ToInstall, USE_TEXT_GUI); Click on project name (sets scope) Get coffeepot working first Click on CCES Coffeepot SCADA GUI menu and activate Long distance SCADA view of COFFEEPOT. (Click on LOCK option too)? Run your code again with Init_CoffeePotSimulation (numcoffeepots_toinstall, (WHICH DISPLAY) (USE TEXT GUI USE CCES GUI))

16 Plan a Do_Simulation_CPP( ) for a quick check that we understand and can do basic COFFEEPOT control PSP Make compiler happy PSP Make linker happy Put new prototypes at top of the first file that uses them Refactor to MyCoffeePot h So all files can call this function without introducing :defects

17 The control register has many fields (Parts that control switches of different things) NOTE: The design defect (no LED control) is accidentally fixed by designer BUT introduces a different design defect. Note: COFFEEPOD change in Customer Scope Details shown in documentation as follows Similar format in Blackfin manual for the registers used to control Blackfin on chip peripherals COFFEEPOT PERIPHERAL CONTROL REGISTER (CPCR) OFFSET 0x00 RESET 0x00 W1S, W0C LED CONTROL FIELD (Bits 15 to 12) 0x1 LED 1 0x2 LED 2 0x4 LED 3 0x8 LED 4 Can combine values in a field (Lab 0, Assign 1) 0x5 causes LED1 and LED3 to be on COFFEEPOD CONTROL FIELD (Bit 11) 0x1 Insert coffee pod GENERAL CONTROL (Bits 4 to 0) 0x1 b00001 Cause device to initialize (2 seconds) and stay powered up 0x2 b00010 Turns LED Power on (So LEDs work) 0x4 b00100 Turns Water control power on (So water will flow) 0x8 b01000 Turns Heater power on (So heating will occur) 0x10 b10000 Device is ready after initialization RO (read only) Can combine values in a field 0x6 (b00110) turns on BOTH LED and water power but deactivates the device (bit 0 = 0; so nothing works) NOTE: Design refactoring occurring LED and Coffeepod? control registers fields of CPCR READY BIT accounts for coffeepot is hardware and not software so not immediately ready You CAN T set the READY bit (its READ ONLY), the device itself sets that bit when running properly 17

18 Demonstrate we know what we are doing turn LED1 on LED CONTROL FIELD (Bits 15 to 12) 0x1 LED 1 0x2 LED 2 0x4 LED 3 0x8 LED 4 Lesson 1 on manipulating control fields If you WRITE a 1 (needs 1 << 12) into this field to turn on LED 1 you are actually writing b0001 The 1 on b0001 turns on LED 1 but the 0 s in b0001 turns OFF LEDs 2 to 4 So you must READ the field, OR a 1 into bit 12 (which leaves bits 13, 14, 15 unchanged) and then write back the changed and unchanged bits THIS LESSON FROM LAB0 DOES NOT WORK WHY

19 LEDS don t work unless we turn the LED power on COFFEEPOT PERIPHERAL CONTROL REGISTER (CPCR) OFFSET 0x00 RESET 0x00 W1S, W0C GENERAL CONTROL (Bits 4 to 0) 0x2 b00010 Turns LED Power on (So LEDs work) Write a 1 to LED Power on bit (needs 1 << 1) Does not work Reason 1 Writing 1 << 1 to the control register means we write b So we turn on bit 1 LED Power ON, but also turn off bit 12 a switch to turn LED 1 on / off And also we turn off the RESET bit which totally deactivates the processor

20 Pseudo code Activate bit 0 to turn on the processor baseaddress >control = 1 (b Wait till READY bit 4 turns on (b ) BIGGY ERROR WAIT TILL READY Now set LED power on (bit 1) with out turning off bits 0 and 4 unsigned short int temp1 = baseaddress >control; unsigned short int temp2 = (1 << 1); temp1 = temp1 temp2; // Bit wise OR baseaddress >control = temp1; See same syntax in the EWARM JEADI ARM articles DONE IN 4 STEPS OF THE SIMPLEST POSSIBLE C++ as that is the way you to be able to translate the code from C++ into assembly code

21 DONE IN 4 STEPS as that is the way you would have to do it in assembly code unsigned short int temp1 = baseaddress >control; R0 = W[P0] (Z); // switch 16 to 32 bits unsigned short int temp2 = (1 << 1); R1 = (1 << 1); temp1 = temp1 temp2; // Bit wise OR R0 = R0 R1; baseaddress >control = temp1; W[P0] = R0; // Switch 32 bits to 16 ssync; // Force Blackfin architecture to write PSP Write simple C++ code as that makes it easy to translate into assembly code

22 Now turn on LED1 and then off COFFEEPOT PERIPHERAL CONTROL REGISTER (CPCR) OFFSET 0x00 RESET 0x00 W1S, W0C #define LED1_ON_BIT 12 R0 = W[P0] (Z); // unsigned short int temp1 = baseaddress >control; R1 = (1 << LED1_ON_BIT ); // unsigned short int temp2 = (1 << LED1_ON_BIT ); R0 = R0 R1; // temp1 = temp1 temp2; // Bit wise OR W[P0] = R0; // baseaddress >control = temp1; ssync; // Force Blackfin architecture to write // LED 1 ON R0 = W[P0] (Z); // unsigned short int temp1 = baseaddress >control; R1 = (1 << LED1_ON_BIT ); // unsigned short int temp2 = (1 << LED1_ON_BIT ); R1 = ~R1; // Flip 1 0 and 0 1 with twiddle operator R0 = R0 & R1; // temp1 = temp1 & temp2; // Bit wise AND W[P0] = R0; // baseaddress >control = temp1; ssync; // Force Blackfin architecture to write // LED 1 ON

23 Back to discussion on turning WaterControl_CPP( ) into ASM What I am going to do is Design the CPP code on paper Then translate the CPP into ASM on paper without changing the design. Put the paper code into an ASM file and code review for errors. See what syntax errors CrossCore finds that you did not REMEMBER THE WAY YOU CODE NOW IS THE WAY YOU WILL CODE TOMORROW UNLESS YOU PIP Process Improvement Plan PIP CHOOSE 2 THINGS I GET WRONG ALL THE TIME AND CHECK FOR THOSE EACH TIME. ADD 2 MORE THINGS NEXT LAB / EXAM DSFQ The number of syntax errors CrossCore finds (and you did not) provides an estimate of all the mistakes you made and left behind as DEFECTS since logical errors is something that CrossCore can t find. USEFUL SKILL Will do a lecture on estimating the defects left behind

24 ASM code Add standard stuff first // #include all necessary include filesasm.h need at least #include <blackfinasm.h>.section data1; // Always something like this // Where we will place ASM variables when we need them PSP place holder for now.section program; // Always something like this.global _WaterControlCode_ASM; // ASM way of saying that function is NOT PRIVATE _WaterControlCode_ASM: // extern C void WaterControlCode_ASM( // COFFEEPOT_DEVICE *coffeepot_baseaddress, // SAVE non volatile // ^ INPAR 1 always passed in R0 // registers used // unsigned short int waterlevelrequired) // ^ INPAR 2 always passed in R1 LINK 20; // Special magic needed when calling functions from Blackfin ASM functions // { // unsigned int waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); // while { // (waterlevel <= waterlevelrequired) // { // coffeepot_baseaddress > waterinflowregister = 200; // My_SimulateOneSecondPassing(); // waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); // } /* END WHILE */ _WaterControlCode_ASM.END: UNLINK; // } // LINK and UNLINK always paired // RECOVER non volatile // NOTE SAVE BEFORE LINK; LINK NEEDS A NUMBER 20 ALWAYS WORKS // registers used // RECOVER AFTER UNLINK; UNLINK KNOW HOW MUCH TO UNLINK RTS; 24

25 ASM code Add the obvious.section program; // Always something like this.global _WaterControlCode_ASM; // ASM way of saying that function is NOT PRIVATE _WaterControlCode_ASM: // extern C void WaterControlCode_ASM( // COFFEEPOT_DEVICE *coffeepot_baseaddress, // SAVE non volatile // ^ INPAR 1 always passed in R0 // registers used // unsigned short int waterlevelrequired) LINK 20; // ^ INPAR 2 always passed in R1 // Special magic needed when calling functions from Blackfin ASM functions // {.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // unsigned int waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddres waterlevel_r1 = returnvalue_r0 ; // Functions always return values in R0 BIG PROBLEM // while { // (waterlevel <= waterlevelrequired) returnvalue_r0 has // { destroyed INPAR_R0 // coffeepot_baseaddress > waterinflowregister = 200;.extern Z23 My_SimulateOneSecondPassingv; CALL Z23 My_SimulateOneSecondPassingv // My_SimulateOneSecondPassing(); Guess at name mangling.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); waterlevel_r1 = returnvalue_r0 ; // CUT AND PAST CODE // } /* END WHILE */ _WaterControlCode_ASM.END: UNLINK; // } // LINK and UNLINK always paired // RECOVER non volatile // NOTE SAVE BEFORE LINK; LINK NEEDS A NUMBER 20 ALWAYS WORKS // registers used // RECOVER AFTER UNLINK; UNLINK KNOW HOW MUCH TO UNLINK RTS; 2017 new Knowledge The 23 in the name mangled name means 23 letters in the C++ name (TAO OWYKTO) 25

26 Work on the while loop control.section program; // Always something like this.global _WaterControlCode_ASM; // ASM way of saying that function is NOT PRIVATE _WaterControlCode_ASM: // extern C void WaterControlCode_ASM( // COFFEEPOT_DEVICE *coffeepot_baseaddress, // SAVE non volatile // ^ INPAR 1 always passed in R0 // registers used // unsigned short int waterlevelrequired) LINK 20; // ^ INPAR 2 always passed in R1 // Special magic needed when calling functions from Blackfin ASM functions // {.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // unsigned int waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress waterlevel_r1 = returnvalue_r0 ; // Functions always return values in R0 THINK I WHILE_WCC: // while { CC = waterlevel_r1 <= INPAR2_R1 // (waterlevel <= waterlevelrequired) DOWN HILL IF!CC JUMP END_WHILE_CC // EXIT WHILE IF CONDITION IS NOT TRUE { GO WE // coffeepot_baseaddress > waterinflowregister = 200;.extern Z23 My_SimulateOneSecondPassingv; CALL Z23 My_SimulateOneSecondPassingv // My_SimulateOneSecondPassing(); Guess at name mangling.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); waterlevel_r1 = returnvalue_r0 ; // CUT AND PAST CODE JUMP WHILE_WCC; END_WHILE_WCC: // } /* END WHILE */ _WaterControlCode_ASM.END: UNLINK; // } // LINK and UNLINK always paired // RECOVER non volatile // NOTE SAVE BEFORE LINK; LINK NEEDS A NUMBER 20 ALWAYS WORKS // registers used // RECOVER AFTER UNLINK; UNLINK KNOW HOW MUCH TO UNLINK RTS; 26

27 Loop body need base address in P0.section program; // Always something like this.global _WaterControlCode_ASM; // ASM way of saying that function is NOT PRIVATE _WaterControlCode_ASM: // extern C void WaterControlCode_ASM( // COFFEEPOT_DEVICE *coffeepot_baseaddress, // SAVE non volatile // ^ INPAR 1 always passed in R0 // registers used // unsigned short int waterlevelrequired) LINK 20; // ^ INPAR 2 always passed in R1 // Special magic needed when calling functions from Blackfin ASM functions // {.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // unsigned int waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress waterlevel_r1 = returnvalue_r0 ; // Functions always return values in R0 DOWN HILL WHILE_WCC: // while { FAST GO CC = waterlevel_r1 <= INPAR2_R1 // (waterlevel <= waterlevelrequired) IF!CC JUMP END_WHILE_CC // EXIT WHILE IF CONDITION IS NOT TRUE { MORE WE baseaddress_p0 = INPAR1_R0; // coffeepot_baseaddress > waterinflowregister = 200; temp_r2 = 200; // Number values can t be placed in memory only register values can B[P0 + waterflowoffset] = temp2;.extern Z23 My_SimulateOneSecondPassingv; CALL Z23 My_SimulateOneSecondPassingv // My_SimulateOneSecondPassing(); Guess at name mangling.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); waterlevel_r1 = returnvalue_r0 ; // CUT AND PAST CODE JUMP WHILE_WCC; END_WHILE_WCC: // } /* END WHILE */ _WaterControlCode_ASM.END: UNLINK; // } // LINK and UNLINK always paired // RECOVER non volatile // NOTE SAVE BEFORE LINK; LINK NEEDS A NUMBER 20 ALWAYS WORKS // registers used // RECOVER AFTER UNLINK; UNLINK KNOW HOW MUCH TO UNLINK RTS; 27

28 Code review, save / recover INPAR_R1 to R4 Why?.section program; // Always something like this.global _WaterControlCode_ASM; // ASM way of saying that function is NOT PRIVATE _WaterControlCode_ASM: // extern C void WaterControlCode_ASM( [ SP] = R4; // COFFEEPOT_DEVICE *coffeepot_baseaddress, INPAR1_COPY_R4 = INPAR1_R0; // ^ INPAR 1 always passed in R0 [ SP] = R5; // unsigned short int waterlevelrequired) INPAR2_COPY_R5 = INPAR2_R1 // ^ INPAR 2 always passed in R1 LINK 20; // Special magic needed when calling functions from Blackfin ASM functions // {.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs allthats necessary for Quiz 1 CALL CurrentWaterLevel_CPP_NM; // unsigned int waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); waterlevel_r1 = returnvalue_r0 ; // Functions always return values in R0 WHILE_WCC: // while { CC = waterlevel_r1 <= INPAR2_COPY_R5; // (waterlevel <= waterlevelrequired) IF!CC JUMP END_WHILE_CC ; // EXIT WHILE IF CONDITION IS NOT TRUE { baseaddress_p0 = INPAR1_COPY R4; // coffeepot_baseaddress > waterinflowregister = 200; temp_r2 = 200; // Number values can t be placed in memory only register values can B[P0 + waterflowoffset] = temp_r2;.extern Z23 My_SimulateOneSecondPassingv; CALL Z23 My_SimulateOneSecondPassingv // My_SimulateOneSecondPassing(); Guess at name mangling.extern CurrentWaterLevel_CPP_NM; // I show I know name mangling occurs CALL CurrentWaterLevel_CPP_NM; // waterlevel = CurrentWaterLevel_CPP(coffeePot_BaseAddress); waterlevel_r1 = returnvalue_r0 ; // CUT AND PAST CODE JUMP WHILE_WCC; END_WHILE_WCC: // } /* END WHILE */ _WaterControlCode_ASM.END: UNLINK; // } // LINK and UNLINK always paired R4 = [SP++]; // NOTE SAVE BEFORE LINK; LINK NEEDS A NUMBER 20 ALWAYS WORKS R5 = [SP++]; // RECOVER AFTER UNLINK; UNLINK KNOW HOW MUCH TO UNLINK RTS; DOWN HILL FAST GO MORE WE TREE INTO YES 28

29 Totally acceptable exam answer 90% This error is NOT fixed Program will crash in a very nasty way

30 These define must be added in real life if we want the code to assemble

31 This demonstrates my PSP for turning CPP into ASM Through my PSP I have learnt that I can generate 20 LOC / hr (on a good day) if I have to design, code and test the project If the design is already there then I can probably handle LOC /hr (on a good day) Unless I am careful (and not tired) I typically make 80 mistakes per 1 kloc (1 error every 9 lines) at the start of term I can get down to mistakes per 1 kloc by the end of term I don t spend enough time reviewing If spend 10 minutes coding spend 3 minutes reviewing

32 In the code above I did a code review, and I don t think I have made any syntax errors I KNOW that the assembler will not pick out the LOGICAL DEFECTS I introduced after the UNLINK This means that the program will probably crash after the RTS (return from subroutine to C++) My PSP says if the compiler picks up more syntax errors then there are probably more logical defects present in the code (about 3 to 1) I still have to link the ASM file to the project and test the code using the tests I used to check that the C++ code version works And there is a nasty hidden logical error waiting to byte me

33 Here is the result of the assemble Attempt 1 3 syntax errors I missed with the assembler then refusing to continue WHAT S YOUR SCORE? Attempt 2 2 new syntax errors Then success (with 2 hidden LOGICAL DEFECTS) 5 errors in 48 lines of code needs a PIP for PSP

All these things are discussed today QUICK REVIEW QUIZ 1 / Midterm

All these things are discussed today QUICK REVIEW QUIZ 1 / Midterm All these things are discussed today QUICK REVIEW QUIZ 1 / Midterm VIP (Very Important Points) from Micro controller v Microprocessor lecture Microcontroller MUST be able to talk to many devices and receive

More information

Test driven development Example

Test driven development Example Test driven development Example Developing a moving average filter that can be tested using the EUNIT plug in REVIEW Using the E UNIT testing Framework Activate CCES and select your workspace (H:/ENCM511

More information

Automated Testing Environment

Automated Testing Environment Automated Testing Environment Concepts required for testing embedded systems adopted in this course (quizzes, assignments and laboratories) 1 To be tackled today Why test, and what kinds of tests are there?

More information

Generating Rectify( ) Test driven development approach to TigerSHARC

Generating Rectify( ) Test driven development approach to TigerSHARC Generating Rectify( ) Test driven development approach to TigerSHARC assembly code production Assembly code examples Part 1 of 3 Concepts Concepts of C++ stubs Forcing the test to fail test of test Generating

More information

Getting the O in I/O to work on a typical microcontroller

Getting the O in I/O to work on a typical microcontroller Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller used in the Familiarization Lab Agenda Processors

More information

Getting the O in I/O to work on a typical microcontroller

Getting the O in I/O to work on a typical microcontroller Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller used in the Familiarization Lab Agenda Processors

More information

ENCM511 Assignment 1 Version 16 September 2012

ENCM511 Assignment 1 Version 16 September 2012 ENCM511 Assignment 1 Version 16 September 2012 This is an individual assignment, essentially a take home quiz. This means the purpose behind this assignment is for YOU to show the skills learnt during

More information

Laboratory 1 Manual V1.2 1 st September 2007 Developing a Blackfin GPIO interface using an automated embedded testing environment

Laboratory 1 Manual V1.2 1 st September 2007 Developing a Blackfin GPIO interface using an automated embedded testing environment Laboratory 1 Manual V1.2 1 st September 2007 Developing a Blackfin GPIO interface using an automated embedded testing environment These pages are cut-and-paste from the Lab. 1 web-pages. I have not spent

More information

A look at interrupts Dispatch_Tasks ( )

A look at interrupts Dispatch_Tasks ( ) SHOWS WHERE S FIT IN A look at interrupts Dispatch_Tasks ( ) What are interrupts and why are they needed in an embedded system? Equally as important how are these ideas handled on the Blackfin Assignment

More information

1: Introduction to Object (1)

1: Introduction to Object (1) 1: Introduction to Object (1) 김동원 2003.01.20 Overview (1) The progress of abstraction Smalltalk Class & Object Interface The hidden implementation Reusing the implementation Inheritance: Reusing the interface

More information

QUIZ. What are 3 differences between C and C++ const variables?

QUIZ. What are 3 differences between C and C++ const variables? QUIZ What are 3 differences between C and C++ const variables? Solution QUIZ Source: http://stackoverflow.com/questions/17349387/scope-of-macros-in-c Solution The C/C++ preprocessor substitutes mechanically,

More information

If we can just send 1 signal correctly over the SPI MOSI line, then Lab 4 will work!!!

If we can just send 1 signal correctly over the SPI MOSI line, then Lab 4 will work!!! If we can just send 1 signal correctly over the SPI MOSI line, then Lab 4 will work!!! Design and implementation details on the way to a valid SPI-LCD interface driver Slides 3 to 13 are old versions of

More information

Table of Contents. ENCM511 Assignment 1 Marking Scheme Want to drive the real car on the A301 track later in the term. It can be arranged, but

Table of Contents. ENCM511 Assignment 1 Marking Scheme Want to drive the real car on the A301 track later in the term. It can be arranged, but Assignment 1 V3 Final 1 st October 2013 P age 1 Assignment 1 V3 Final 1 st October 2013 P age 2 YOUR NAME LAB. Section Table of Contents ENCM511 Assignment 1 V2 We shall drive a virtual car during this

More information

Writing Code and Programming Microcontrollers

Writing Code and Programming Microcontrollers Writing Code and Programming Microcontrollers This document shows how to develop and program software into microcontrollers. It uses the example of an Atmel ATmega32U2 device and free software. The ATmega32U2

More information

Summer 2003 Lecture 14 07/02/03

Summer 2003 Lecture 14 07/02/03 Summer 2003 Lecture 14 07/02/03 LAB 6 Lab 6 involves interfacing to the IBM PC parallel port Use the material on wwwbeyondlogicorg for reference This lab requires the use of a Digilab board Everyone should

More information

QUIZ. Source:

QUIZ. Source: QUIZ Source: http://stackoverflow.com/questions/17349387/scope-of-macros-in-c Ch. 4: Data Abstraction The only way to get massive increases in productivity is to leverage off other people s code. That

More information

EE475 Lab #3 Fall Memory Placement and Interrupts

EE475 Lab #3 Fall Memory Placement and Interrupts EE475 Lab #3 Fall 2005 Memory Placement and Interrupts In this lab you will investigate the way in which the CodeWarrior compiler and linker interact to place your compiled code and data in the memory

More information

Department of Electrical and Computer Engineering, University of Calgary ENCM415 FINAL EXAM, DECEMBER 17 th, 2002

Department of Electrical and Computer Engineering, University of Calgary ENCM415 FINAL EXAM, DECEMBER 17 th, 2002 Department of Electrical and Computer Engineering, University of Calgary ENCM415 FINAL EXAM, DECEMBER 17 th, 2002 3 HOURS PLEASE WRITE CLEARLY. USE AN HB GRADE OR SOFTER (DARKER) PENCIL! WHAT CAN T BE

More information

Lesson 4: Introduction to the Excel Spreadsheet 121

Lesson 4: Introduction to the Excel Spreadsheet 121 Lesson 4: Introduction to the Excel Spreadsheet 121 In the Window options section, put a check mark in the box next to Formulas, and click OK This will display all the formulas in your spreadsheet. Excel

More information

Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst

Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst Department of Computer Science Why C? Low-level Direct access to memory WYSIWYG (more or less) Effectively

More information

CSCI341. Lecture 22, MIPS Programming: Directives, Linkers, Loaders, Memory

CSCI341. Lecture 22, MIPS Programming: Directives, Linkers, Loaders, Memory CSCI341 Lecture 22, MIPS Programming: Directives, Linkers, Loaders, Memory REVIEW Assemblers understand special commands called directives Assemblers understand macro commands Assembly programs become

More information

Introduction to Test Driven Development (To be used throughout the course)

Introduction to Test Driven Development (To be used throughout the course) Introduction to Test Driven Development (To be used throughout the course) Building tests and code for a software radio Concepts Stages in a conventional radio Stages in a software radio Goals for the

More information

Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09

Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09 Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09 Hello, today we will create another application called a math quiz. This

More information

QUIZ How do we implement run-time constants and. compile-time constants inside classes?

QUIZ How do we implement run-time constants and. compile-time constants inside classes? QUIZ How do we implement run-time constants and compile-time constants inside classes? Compile-time constants in classes The static keyword inside a class means there s only one instance, regardless of

More information

Data Structure Series

Data Structure Series Data Structure Series This series is actually something I started back when I was part of the Sweet.Oblivion staff, but then some things happened and I was no longer able to complete it. So now, after

More information

My malloc: mylloc and mhysa. Johan Montelius HT2016

My malloc: mylloc and mhysa. Johan Montelius HT2016 1 Introduction My malloc: mylloc and mhysa Johan Montelius HT2016 So this is an experiment where we will implement our own malloc. We will not implement the world s fastest allocator, but it will work

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

QUIZ Friends class Y;

QUIZ Friends class Y; QUIZ Friends class Y; Is a forward declaration neeed here? QUIZ Friends QUIZ Friends - CONCLUSION Forward (a.k.a. incomplete) declarations are needed only when we declare member functions as friends. They

More information

Finding and Fixing Bugs

Finding and Fixing Bugs C Finding and Fixing Bugs C.1 Introduction As you will quickly find the BUG is the pain of all programmers existence. This section looks at the most common types of BUGS and some of the strategies for

More information

Static Methods. Why use methods?

Static Methods. Why use methods? Static Methods A method is just a collection of code. They are also called functions or procedures. It provides a way to break a larger program up into smaller, reusable chunks. This also has the benefit

More information

15 Sharing Main Memory Segmentation and Paging

15 Sharing Main Memory Segmentation and Paging Operating Systems 58 15 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per

More information

CS354 gdb Tutorial Written by Chris Feilbach

CS354 gdb Tutorial Written by Chris Feilbach CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that

More information

IMASK FIO_FLAG_S FIO_DIR SIC_IMASK FIO_EDGE FIO_POLAR ILAT FIO_BOTH TCOUNT FIO_FLAG_D FIO_ENEN PF_STATUS_D

IMASK FIO_FLAG_S FIO_DIR SIC_IMASK FIO_EDGE FIO_POLAR ILAT FIO_BOTH TCOUNT FIO_FLAG_D FIO_ENEN PF_STATUS_D SECTION B -- ATTEMPT NO MORE THAN 2 QUESTIONS These are open-ended questions and you may be required to make some educated, engineering relevant, design decisions. Only the first two answers to questions

More information

SP LOCKER USER MANUAL. v1.0

SP LOCKER USER MANUAL. v1.0 SP LOCKER USER MANUAL v1.0 Table of Contents 1 Introduction to the SP Locker Security Software... 2 2 Before You Get Started... 2 3 Features... 2 4 Public and Secured Partition... 3 5 How to use SP Locker...

More information

Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1.

Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Figure 1 Forward declaration for the default handlers These are the forward declarations,

More information

UKNova s Getting Connectable Guide

UKNova s Getting Connectable Guide UKNova s Getting Connectable Guide Version 1.2 2010/03/22 1. WHAT IS "BEING CONNECTABLE" AND WHY DO I NEED IT? Being connectable means being able to give back to others it is the fundamental principle

More information

Do this by creating on the m: drive (Accessed via start menu link Computer [The m: drive has your login id as name]) the subdirectory CI101.

Do this by creating on the m: drive (Accessed via start menu link Computer [The m: drive has your login id as name]) the subdirectory CI101. Creating and running a Java program. This tutorial is an introduction to running a computer program written in the computer programming language Java using the BlueJ IDE (Integrated Development Environment).

More information

RIS shading Series #2 Meet The Plugins

RIS shading Series #2 Meet The Plugins RIS shading Series #2 Meet The Plugins In this tutorial I will be going over what each type of plugin is, what their uses are, and the basic layout of each. By the end you should understand the three basic

More information

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program.

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program. Language Translation Compilation vs. interpretation Compilation diagram Step 1: compile program compiler Compiled program Step 2: run input Compiled program output Language Translation compilation is translation

More information

Hands-On with STM32 MCU Francesco Conti

Hands-On with STM32 MCU Francesco Conti Hands-On with STM32 MCU Francesco Conti f.conti@unibo.it Calendar (Microcontroller Section) 07.04.2017: Power consumption; Low power States; Buses, Memory, GPIOs 20.04.2017 21.04.2017 Serial Interfaces

More information

Final CSE 131B Spring 2004

Final CSE 131B Spring 2004 Login name Signature Name Student ID Final CSE 131B Spring 2004 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 (25 points) (24 points) (32 points) (24 points) (28 points) (26 points) (22 points)

More information

Introduction to the IDE

Introduction to the IDE 1 Introduction Introduction to the IDE The IDE that we are using is called SourceBoost, and is available on all of the machines in the ELC. There is also a free version which has some limitations that

More information

Agenda CS121/IS223. Reminder. Object Declaration, Creation, Assignment. What is Going On? Variables in Java

Agenda CS121/IS223. Reminder. Object Declaration, Creation, Assignment. What is Going On? Variables in Java CS121/IS223 Object Reference Variables Dr Olly Gotel ogotel@pace.edu http://csis.pace.edu/~ogotel Having problems? -- Come see me or call me in my office hours -- Use the CSIS programming tutors Agenda

More information

COMP 202 Java in one week

COMP 202 Java in one week COMP 202 Java in one week... Continued CONTENTS: Return to material from previous lecture At-home programming exercises Please Do Ask Questions It's perfectly normal not to understand everything Most of

More information

Summer Assignment for AP Computer Science. Room 302

Summer Assignment for AP Computer Science. Room 302 Fall 2016 Summer Assignment for AP Computer Science email: hughes.daniel@north-haven.k12.ct.us website: nhhscomputerscience.com APCS is your subsite Mr. Hughes Room 302 Prerequisites: You should have successfully

More information

15-323/ Spring 2019 Project 4. Real-Time Audio Processing Due: April 2 Last updated: 6 March 2019

15-323/ Spring 2019 Project 4. Real-Time Audio Processing Due: April 2 Last updated: 6 March 2019 15-323/15-623 Spring 2019 Project 4. Real-Time Audio Processing Due: April 2 Last updated: 6 March 2019 1 Overview In this project, you will create a program that performs real-time audio generation. There

More information

Recitation 10: Malloc Lab

Recitation 10: Malloc Lab Recitation 10: Malloc Lab Instructors Nov. 5, 2018 1 Administrivia Malloc checkpoint due Thursday, Nov. 8! wooooooooooo Malloc final due the week after, Nov. 15! wooooooooooo Malloc Bootcamp Sunday, Nov.

More information

XP: Backup Your Important Files for Safety

XP: Backup Your Important Files for Safety XP: Backup Your Important Files for Safety X 380 / 1 Protect Your Personal Files Against Accidental Loss with XP s Backup Wizard Your computer contains a great many important files, but when it comes to

More information

1.2 - Introduction to the IAR Workbench IDE *

1.2 - Introduction to the IAR Workbench IDE * OpenStax-CNX module: m13621 1 1.2 - Introduction to the IAR Workbench IDE * Naren Anand Based on Introduction to CrossStudio MSP430 IDE by Kileen Cheng This work is produced by OpenStax-CNX and licensed

More information

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7 Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7 Ziad Matni Dept. of Computer Science, UCSB Programming in Multiple Files The Magic of Makefiles!

More information

Programming Style and Optimisations - An Overview

Programming Style and Optimisations - An Overview Programming Style and Optimisations - An Overview Summary In this lesson we introduce some of the style and optimization features you may find useful to understand as a C++ Programmer. Note however this

More information

DER GOBBLE. Good Secure Crypto Wallet Practices. What is your wallet?

DER GOBBLE. Good Secure Crypto Wallet Practices. What is your wallet? DER GOBBLE Good Secure Crypto Wallet Practices When it comes to crypto currencies and securing your money, the absolute best 99% guaranteed security for your wallets is YOU. You are the one that will expose

More information

CS121/IS223. Object Reference Variables. Dr Olly Gotel

CS121/IS223. Object Reference Variables. Dr Olly Gotel CS121/IS223 Object Reference Variables Dr Olly Gotel ogotel@pace.edu http://csis.pace.edu/~ogotel Having problems? -- Come see me or call me in my office hours -- Use the CSIS programming tutors CS121/IS223

More information

Data Structure Layout. In HERA/Assembly

Data Structure Layout. In HERA/Assembly Data Structure Layout In HERA/Assembly Today, we re going to build some data structures in HERA First, a note on memory Registers are very fast RAM is relatively slow We use a cache to sit between them

More information

Using Karel with Eclipse

Using Karel with Eclipse Chris Piech Handout #3 CS 106A January 10, 2018 Using Karel with Eclipse Based on a handout by Eric Roberts and Nick Troccoli Once you have downloaded a copy of Eclipse as described on the course website,

More information

ENCM 369 Winter 2017 Lab 3 for the Week of January 30

ENCM 369 Winter 2017 Lab 3 for the Week of January 30 page 1 of 11 ENCM 369 Winter 2017 Lab 3 for the Week of January 30 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2017 Lab instructions and other documents for

More information

Some Basic Concepts EL6483. Spring EL6483 Some Basic Concepts Spring / 22

Some Basic Concepts EL6483. Spring EL6483 Some Basic Concepts Spring / 22 Some Basic Concepts EL6483 Spring 2016 EL6483 Some Basic Concepts Spring 2016 1 / 22 Embedded systems Embedded systems are rather ubiquitous these days (and increasing rapidly). By some estimates, there

More information

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations , 1 C#.Net VT 2009 Course Contents C# 6 hp approx. BizTalk 1,5 hp approx. No exam, but laborations Course contents Architecture Visual Studio Syntax Classes Forms Class Libraries Inheritance Other C# essentials

More information

Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto

Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto Microprocessor or Microcontroller Not just a case of you say tomarto and I say tomayto Discussion of the capabilities of the Analog Devices ADSP-5333 Evaluation Board used in this course M. Smith, ECE

More information

Boot Camp. Dave Eckhardt Bruce Maggs

Boot Camp. Dave Eckhardt Bruce Maggs Boot Camp Dave Eckhardt de0u@andrew.cmu.edu Bruce Maggs bmm@cs.cmu.edu 1 This Is a Hard Class Traditional hazards 410 letter grade one lower than other classes All other classes this semester: one grade

More information

Physics 335 Intro to MicroControllers and the PIC Microcontroller

Physics 335 Intro to MicroControllers and the PIC Microcontroller Physics 335 Intro to MicroControllers and the PIC Microcontroller May 4, 2009 1 The Pic Microcontroller Family Here s a diagram of the Pic 16F84A, taken from Microchip s data sheet. Note that things are

More information

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics COMP-202 Unit 1: Introduction Announcements Did you miss the first lecture? Come talk to me after class. If you want

More information

Table of Contents. A. Introduction...2. B. General Description...2. C. Features...3. D. Before Using the Security Application Program LOCK...

Table of Contents. A. Introduction...2. B. General Description...2. C. Features...3. D. Before Using the Security Application Program LOCK... v1.00 Table of Contents A. Introduction...2 B. General Description...2 C. Features...3 D. Before Using the Security Application Program LOCK...4 E. Introduction to the Security Application Program LOCK...5

More information

NO CALCULATORS ARE ALLOWED IN THIS EXAM

NO CALCULATORS ARE ALLOWED IN THIS EXAM Department of Electrical and Computer Engineering, University of Calgary ENCM415 DECEMBER 18 th, 2001 3 HOURS NAME:- ID#:- PLEASE WRITE CLEARLY. USE AN HB GRADE OR SOFTER (DARKER) PENCIL! WHAT I CAN=T

More information

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file?

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file? QUIZ on Ch.5 Why is it sometimes not a good idea to place the private part of the interface in a header file? Example projects where we don t want the implementation visible to the client programmer: The

More information

Release Notes for CrossCore Embedded Studio 2.5.0

Release Notes for CrossCore Embedded Studio 2.5.0 Release Notes for CrossCore Embedded Studio 2.5.0 2016 Analog Devices, Inc. http://www.analog.com processor.tools.support@analog.com Contents 1 Introduction 4 1.1 Supported Operating Systems 4 1.2 System

More information

Laboratory 1: Eclipse and Karel the Robot

Laboratory 1: Eclipse and Karel the Robot Math 121: Introduction to Computing Handout #2 Laboratory 1: Eclipse and Karel the Robot Your first laboratory task is to use the Eclipse IDE framework ( integrated development environment, and the d also

More information

Class 1: Homework. Intro to Computer Science CSCI-UA.0101 New York University Courant Institute of Mathematical Sciences Fall 2017

Class 1: Homework. Intro to Computer Science CSCI-UA.0101 New York University Courant Institute of Mathematical Sciences Fall 2017 Intro to Computer Science CSCI-UA.0101 New York University Courant Institute of Mathematical Sciences Fall 2017 1 1. Please obtain a copy of Introduction to Java Programming, 11th (or 10th) Edition, Brief

More information

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: This lab will introduce basic embedded systems programming concepts by familiarizing the user with an embedded programming

More information

16 Sharing Main Memory Segmentation and Paging

16 Sharing Main Memory Segmentation and Paging Operating Systems 64 16 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per

More information

Revising CS-M41. Oliver Kullmann Computer Science Department Swansea University. Robert Recorde room Swansea, December 13, 2013.

Revising CS-M41. Oliver Kullmann Computer Science Department Swansea University. Robert Recorde room Swansea, December 13, 2013. Computer Science Department Swansea University Robert Recorde room Swansea, December 13, 2013 How to use the revision lecture The purpose of this lecture (and the slides) is to emphasise the main topics

More information

Introduction to Embedded Systems. Lab Logistics

Introduction to Embedded Systems. Lab Logistics Introduction to Embedded Systems CS/ECE 6780/5780 Al Davis Today s topics: lab logistics interrupt synchronization reentrant code 1 CS 5780 Lab Logistics Lab2 Status Wed: 3/11 teams have completed their

More information

Linking. Explain what ELF format is. Explain what an executable is and how it got that way. With huge thanks to Steve Chong for his notes from CS61.

Linking. Explain what ELF format is. Explain what an executable is and how it got that way. With huge thanks to Steve Chong for his notes from CS61. Linking Topics How do you transform a collection of object files into an executable? How is an executable structured? Why is an executable structured as it is? Learning Objectives: Explain what ELF format

More information

Using the KD30 Debugger

Using the KD30 Debugger ELEC3730 Embedded Systems Tutorial 3 Using the KD30 Debugger 1 Introduction Overview The KD30 debugger is a powerful software tool that can greatly reduce the time it takes to develop complex programs

More information

C Programming. A quick introduction for embedded systems. Dr. Alun Moon UNN/CEIS. September 2008

C Programming. A quick introduction for embedded systems. Dr. Alun Moon UNN/CEIS. September 2008 C Programming A quick introduction for embedded systems Dr. Alun Moon UNN/CEIS September 2008 Dr. Alun Moon (UNN/CEIS) C Programming September 2008 1 / 13 Programming is both an art and a science. It is

More information

How to Become an IoT Developer (and Have Fun!) Justin Mclean Class Software.

How to Become an IoT Developer (and Have Fun!) Justin Mclean Class Software. How to Become an IoT Developer (and Have Fun!) Justin Mclean Class Software Email: justin@classsoftware.com Twitter: @justinmclean Who am I? Freelance Developer - programming for 25 years Incubator PMC

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

CS 142 Style Guide Grading and Details

CS 142 Style Guide Grading and Details CS 142 Style Guide Grading and Details In the English language, there are many different ways to convey a message or idea: some ways are acceptable, whereas others are not. Similarly, there are acceptable

More information

CS 220: Introduction to Parallel Computing. Arrays. Lecture 4

CS 220: Introduction to Parallel Computing. Arrays. Lecture 4 CS 220: Introduction to Parallel Computing Arrays Lecture 4 Note: Windows I updated the VM image on the website It now includes: Sublime text Gitkraken (a nice git GUI) And the git command line tools 1/30/18

More information

Templates what and why? Beware copying classes! Templates. A simple example:

Templates what and why? Beware copying classes! Templates. A simple example: Beware copying classes! Templates what and why? class A { private: int data1,data2[5]; float fdata; public: // methods etc. } A a1,a2; //some work initializes a1... a2=a1; //will copy all data of a2 into

More information

Agenda. Peer Instruction Question 1. Peer Instruction Answer 1. Peer Instruction Question 2 6/22/2011

Agenda. Peer Instruction Question 1. Peer Instruction Answer 1. Peer Instruction Question 2 6/22/2011 CS 61C: Great Ideas in Computer Architecture (Machine Structures) Introduction to C (Part II) Instructors: Randy H. Katz David A. Patterson http://inst.eecs.berkeley.edu/~cs61c/sp11 Spring 2011 -- Lecture

More information

QUIZ Lesson 4. Exercise 4: Write an if statement that assigns the value of x to the variable y if x is in between 1 and 20, otherwise y is unchanged.

QUIZ Lesson 4. Exercise 4: Write an if statement that assigns the value of x to the variable y if x is in between 1 and 20, otherwise y is unchanged. QUIZ Lesson 4 Exercise 4: Write an if statement that assigns the value of x to the variable y if x is in between 1 and 20, otherwise y is unchanged. QUIZ Lesson 4 Exercise 4: Write an if statement that

More information

CS 231 Data Structures and Algorithms, Fall 2016

CS 231 Data Structures and Algorithms, Fall 2016 CS 231 Data Structures and Algorithms, Fall 2016 Dr. Bruce A. Maxwell Department of Computer Science Colby College Course Description Focuses on the common structures used to store data and the standard

More information

Unknown Error Occurred

Unknown Error Occurred Xcode System Component Installation An Unknown Error Occurred During installation of a new app, the installer creates a number of containers for from the backup by calling -(NSURL setresourcevalue:forkey:error:)

More information

Where Does Global Static Local Register Variables Memory And C Program Instructions Get Stored

Where Does Global Static Local Register Variables Memory And C Program Instructions Get Stored Where Does Global Static Local Register Variables Memory And C Program Instructions Get Stored global/static variables go into different RAM memory segments depending on local register variables free memory

More information

Chapter 17 vector and Free Store. Bjarne Stroustrup

Chapter 17 vector and Free Store. Bjarne Stroustrup Chapter 17 vector and Free Store Bjarne Stroustrup www.stroustrup.com/programming Overview Vector revisited How are they implemented? Pointers and free store Allocation (new) Access Arrays and subscripting:

More information

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment

More information

Handout 4: Version Control Reference

Handout 4: Version Control Reference CSCI 2600 Principles of Software Handout 4: Version Control Reference Introduction SVN (Subversion) provides the following functionality: It allows multiple users to edit the same files independently,

More information

Project #1 Exceptions and Simple System Calls

Project #1 Exceptions and Simple System Calls Project #1 Exceptions and Simple System Calls Introduction to Operating Systems Assigned: January 21, 2004 CSE421 Due: February 17, 2004 11:59:59 PM The first project is designed to further your understanding

More information

Chapter 1 & 2 Introduction to C Language

Chapter 1 & 2 Introduction to C Language 1 Chapter 1 & 2 Introduction to C Language Copyright 2007 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 1 & 2 - Introduction to C Language 2 Outline 1.1 The History

More information

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench by Alex Milenkovich, milenkovic@computer.org Objectives: This tutorial will help you get started with the MSP30

More information

(Refer Slide Time: 1:43)

(Refer Slide Time: 1:43) (Refer Slide Time: 1:43) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture - 27 Pattern Detector So, we talked about Moore

More information

CS504 4 th Quiz solved by MCS GROUP

CS504 4 th Quiz solved by MCS GROUP CS504 4 th Quiz solved by MCS GROUP All are solved 100% correct with pages # remember us in ur prayerssss. Quiz Start Time: 01:26 PM Time Left 90 Question # 1 of 10 ( Start time: 01:26:29 PM ) Total Marks:

More information

An Introduction to Komodo

An Introduction to Komodo An Introduction to Komodo The Komodo debugger and simulator is the low-level debugger used in the Digital Systems Laboratory. Like all debuggers, Komodo allows you to run your programs under controlled

More information

Binghamton University. CS-211 Fall Syntax. What the Compiler needs to understand your program

Binghamton University. CS-211 Fall Syntax. What the Compiler needs to understand your program Syntax What the Compiler needs to understand your program 1 Pre-Processing Any line that starts with # is a pre-processor directive Pre-processor consumes that entire line Possibly replacing it with other

More information

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually.

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25462 The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25460 Some objects of a struct/union type defined with

More information

Programming with MPI

Programming with MPI Programming with MPI p. 1/?? Programming with MPI Miscellaneous Guidelines Nick Maclaren Computing Service nmm1@cam.ac.uk, ext. 34761 March 2010 Programming with MPI p. 2/?? Summary This is a miscellaneous

More information

Making Address Spaces Smaller

Making Address Spaces Smaller ICS332 Operating Systems Spring 2018 Smaller Address Spaces Having small address spaces is always a good idea This is good for swapping: don t swap as often (because if address spaces are small, then RAM

More information

APPENDIX B. Fortran Hints

APPENDIX B. Fortran Hints APPENDIX B Fortran Hints This appix contains hints on how to find errors in your programs, and how to avoid some common Fortran errors in the first place. The basics on how to invoke the Fortran compiler

More information

High Reliability Systems. Lloyd Moore, President

High Reliability Systems. Lloyd Moore, President High Reliability Systems Lloyd Moore, President Lloyd@CyberData-Robotics.com www.cyberdata-robotics.com Overview Appropriate Use of This Presentation Causes of Failures Watchdogs Memory Techniques Safer

More information