as2_mprcs_135104.pdf

2
Name: Alpaslan Surname: GOKCEN Number: #135104 Department: Computer Engineering Homework 2 Assigned Date: Tuesday, March 31, 2015 Due Date: Friday, April 10, 2015 Problem 1: (10 points total) a. Convert 114910 to its equivalent 16-bit binary representation 114910=0100 0111 11012 => 47D16 b. Convert 1101 10102 to its equivalent signed decimal representation. This Number’s MSB is 1 so, it is Negative Number 2’s Complement = 001001102 => -38 c. Convert 1111 1010 1000 10112 to its equivalent hexadecimal representation. 1111 1010 1000 10112 => FA8B16 d. Convert 21310 to its equivalent 2-digit hexadecimal representation. 21310 = 1101 01012 = D516 Problem 2: (15 points) Using the Digilent chipKIT Pro MX4 reference manual, available on Moodle course page, provide the following information: 1. (6 pts) The Digilent Connector Pin Numbers for the on-board buttons (BTN1, BTN2) and the on- board LEDs (LD1, LD2, LD3, LD4). BTN1 – pin 42, BTN2 – pin 43, LD1 – pin 64, LD2 – pin 65, LD3 – pin 66, LD4 – pin 67 2. (6 pts) The MCU Port Bits corresponding to the on-board buttons (BTN1, BTN2) And the on-board LEDs (LD1, LD2, LD3, LD4). BTN1 – RA6 (MCU_PIN 91), BTN2 – RA7 (MCU_PIN 92), LD1 – RB10 (MCU_PIN 34), LD2 RB11 (MCU_PIN 35), LD3 – RB12 (MCU_PIN 41), LD4 –RB13 (MCU_PIN 42) 3. (3 pts) Do we configure the Digilent Connector Pin Numbers or the MCU Port Bits in our programs? Explain. We should configure the ports for our purpose. If we want to use LD1 as OUTPUT which is RB10, We should configure TRISB.10 = 0. And if we want to Low or Down PORTB.10=1(High) or PORTB.10=0(Low) Problem 3: (20 points) Describe the PIC32MX 5-stage Pipeline. The pipeline conceders Instruction-Fetch (I), Execution (E), Memory-Fetch(M), Align (A), Write back (W). All states works simultaneously. I-State Fetches the 32-Bit length instruction from memory. E-Stage performs instructions decode and execute. M-Stage, memory operands are fetched from the on chip memory maybe S- ram or Flash. A-Stage, memory data is word aligned. W-Stage, result is returned the destination.

Upload: serdar-durmaz

Post on 11-Nov-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

  • Name: Alpaslan Surname: GOKCEN Number: #135104 Department: Computer Engineering

    Homework 2 Assigned Date: Tuesday, March 31, 2015

    Due Date: Friday, April 10, 2015

    Problem 1: (10 points total)

    a. Convert 114910 to its equivalent 16-bit binary representation

    114910=0100 0111 11012 => 47D16

    b. Convert 1101 10102 to its equivalent signed decimal representation.

    This Numbers MSB is 1 so, it is Negative Number

    2s Complement = 001001102 => -38

    c. Convert 1111 1010 1000 10112 to its equivalent hexadecimal representation.

    1111 1010 1000 10112 => FA8B16

    d. Convert 21310 to its equivalent 2-digit hexadecimal representation.

    21310 = 1101 01012 = D516

    Problem 2: (15 points) Using the Digilent chipKIT Pro MX4 reference manual, available on Moodle course page, provide the following information:

    1. (6 pts) The Digilent Connector Pin Numbers for the on-board buttons (BTN1, BTN2) and the on-

    board LEDs (LD1, LD2, LD3, LD4).

    BTN1 pin 42, BTN2 pin 43, LD1 pin 64, LD2 pin 65, LD3 pin 66, LD4 pin 67

    2. (6 pts) The MCU Port Bits corresponding to the on-board buttons (BTN1, BTN2)

    And the on-board LEDs (LD1, LD2, LD3, LD4).

    BTN1 RA6 (MCU_PIN 91), BTN2 RA7 (MCU_PIN 92), LD1 RB10 (MCU_PIN 34), LD2 RB11 (MCU_PIN

    35), LD3 RB12 (MCU_PIN 41), LD4 RB13 (MCU_PIN 42)

    3. (3 pts) Do we configure the Digilent Connector Pin Numbers or the MCU Port

    Bits in our programs? Explain.

    We should configure the ports for our purpose. If we want to use LD1 as OUTPUT which is RB10, We should

    configure TRISB.10 = 0. And if we want to Low or Down PORTB.10=1(High) or PORTB.10=0(Low)

    Problem 3: (20 points)

    Describe the PIC32MX 5-stage Pipeline.

    The pipeline conceders Instruction-Fetch (I), Execution (E), Memory-Fetch(M), Align (A), Write back (W). All

    states works simultaneously. I-State Fetches the 32-Bit length instruction from memory. E-Stage performs

    instructions decode and execute. M-Stage, memory operands are fetched from the on chip memory maybe S-

    ram or Flash. A-Stage, memory data is word aligned. W-Stage, result is returned the destination.

  • Name: Alpaslan Surname: GOKCEN Number: #135104 Department: Computer Engineering Problem 4: (15 points) Compare and contrast Harvard vs Von Neumann architectures (use the Computer Architectures unit for help; also look online for help).

    The memory is separated 2 part instructions and data in Harvard Architecture. Von Neumann architectures has only one memory. Harvard Architecture allowing transfers to be performed simultaneously on both busses. Von Neumann architectures has only one Bus. Problem 5: (20 points) List and describe 10 features of the Microchip PIC32MX460F512L MIPS microcontroller

    (Use the PIC32MX460F512L data sheet for help, available on Moodle course page).

    80MHz/105DMIPS, 32-bit MIPS M4K Core 80 million Clock Pulse each Second

    USB 2.0 On-The-Go Peripheral with integrated PHY USB 2.0 Peripheral Bus

    32K RAM (can execute from RAM) - 32KB RAM

    5 Stage pipeline, Harvard architecture Separated Memory , 5 Stage Integer Pipeline

    MIPS16e mode for up to 40% smaller code size

    Single cycle multiply and hardware divide unit MDU Unit And Pipeline

    32 x 32-bit Core Registers

    32 x 32-bit Shadow Registers

    Fast context switch and interrupt response

    512K Flash (plus 12K boot Flash)

    Problem 6: (20 points)

    List and describe 5 features of the Digilent chipKIT Pro MX4 embedded microcontroller board (use the chipKIT

    Pro MX4 reference manual for help).

    Development board based on the Microchip PIC32MX460F512L, It has 4 Led, 2 button. Support for

    programming and debugging within the Microchip MPLAB development environment. Support for

    programming within the chipKIT MPIDE development environment. Multiple power supply options, including

    USB powered.