Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Birla Institute of Technology & Science, Pilani

Work Integrated Learning Programmes Division


First Semester 2023-2024

Mid-Semester Test
(EC-2 Regular)

Course No. : (S1-23) ESZG626/MELZG651/SEZG626/SSZG626


Course Title : HARDWARE SOFTWARE CO-DESIGN
Nature of Exam : Closed Book
Pattern of Exam : Typed Only
Weightage : 30% No. of Pages =
Duration : 2 Hours No. of Questions =
Date of Exam :
Note to Students:
1. Please follow all the Instructions to Candidates given on the cover page of the answer book.
2. All parts of a question should be answered consecutively. Each answer should start from a fresh page.
3. Assumptions made if any, should be stated clearly at the beginning of your answer.

Q.1 Set. (A) [3+2+2+2+1=10 Marks]


Introduction to HW and SW Co-Design
A. Using the 8085 processor; write the software for doing DMA say from location
0x1000 to location 0x1200. Number of bytes = 8.
B. If the frequency of the processor is 100MHz, how many clocks would it take to
complete the DMA.
C. Draw the HW block Peripheral (IP) for the DMA. What are the different
configurable registers that you’d provide with the simplistic DMA IP.
D. Draw a system level block diagram with the Processor and the DMA IP.
E. Write a software program for the processor assuming the DMA IP is part of the
SoC.
Hints and Basic assumptions:
1. Use the instructions from the mnemonics provided on last page.
2. For sake of simplicity, use time in terms of number of clock cycles.
3. Oversimplify and assume that each instruction takes 1 clock cycle to execute.
4. A DMA is direct memory access, where the hardware engine, would copy data
from one memory location and store to another memory location.
Q.1 Set. (B) [3+2+2+2+1 = 10 Marks]
Introduction to HW and SW Co-Design
A. Using the 8085 processor; write the software for doing DMA say from location
0x1200 to location 0x1400. Number of bytes = 8.
B. If the frequency of the processor is 50MHz, how many clocks would it take to
complete the DMA.
C. Draw the HW block Peripheral (IP) for the DMA. What are the different
configurable registers that you’d provide with the simplistic DMA IP.
D. Draw a system level block diagram with the Processor and the DMA IP.
E. Write a software program for the processor assuming the DMA IP is part of the
SoC.
Hints and Basic assumptions:
1. Use the instructions from the mnemonics provided on last page.
2. For sake of simplicity, use time in terms of number of clock cycles.
3. Oversimplify and assume that each instruction takes 1 clock cycle to execute.
4. A DMA is direct memory access, where the hardware engine, would copy data
from one memory location and store to another memory location.
Q.1 Set. (C) [3+2+2+2+1 = 10 Marks]
Introduction to HW and SW Co-Design
A. Using the 8085 processor; write the software for doing DMA say from location
0x1100 to location 0x1300. Number of bytes = 8.
B. If the frequency of the processor is 200MHz, how many clocks would it take to
complete the DMA.
C. Draw the HW block Peripheral (IP) for the DMA. What are the different
configurable registers that you’d provide with the simplistic DMA IP.
D. Draw a system level block diagram with the Processor and the DMA IP.
E. Write a software program for the processor assuming the DMA IP is part of the
SoC.
Hints and Basic assumptions:
1. Use the instructions from the mnemonics provided on last page.
2. For sake of simplicity, use time in terms of number of clock cycles.
3. Oversimplify and assume that each instruction takes 1 clock cycle to execute.
4. A DMA is direct memory access, where the hardware engine, would copy data
from one memory location and store to another memory location.
Q.2 Set. (A) [4+1+2+3 = 10 Marks]
Modeling Analysis and Estimation
Model the following expression
a* (b + 5) + 5 * (c – d)
A. Create a ‘data flow graph’ i.e, a task graph of how you would arrive at the solution
of the expression after evaluating the terms in the right order.
B. How many multiplier, adder, subtractors are needed.
C. If the multiplier takes 3 clock cycles, and adder & subtractor takes 2 clock cycles.
D. What would be the #clock cycles for the complete expression to be evaluated.
E. Mention the schedule (time taken) at each level of the graph.

Q.2 Set. (B) [4+1+2+3 = 10 Marks]


Modeling Analysis and Estimation
Model the following expression
((a* b) - 10) + ((5 * c) – d)
A. Create a ‘data flow graph’ i.e, a task graph of how you would arrive at the solution
of the expression after evaluating the terms in the right order.
B. How many multiplier, adder, subtractors are needed.
C. If the multiplier takes 2 clock cycles, and adder & subtractor takes 1 clock cycles.
D. What would be the #clock cycles for the complete expression to be evaluated.
E. Mention the schedule (time taken) at each level of the graph.
Q.2 Set. (C) [4+1+2+3 = 10 Marks]
Modeling Analysis and Estimation
Model the following expression
(3*a + (a* b) – 10*b) + ((5 * c) – d*c)
A. Create a ‘data flow graph’ i.e, a task graph of how you would arrive at the solution
of the expression after evaluating the terms in the right order.
B. How many multipliers, adder, subtractors are needed.
C. If the multiplier takes 4 clock cycles, and adder & subtractor takes 3 clock cycles.
D. What would be the #clock cycles for the complete expression to be evaluated.
E. Mention the schedule (time taken) at each level of the graph.

Q.3 Set. (A) [5+5 = 10 Marks]


Software Centric Hardware Peripheral
Design a set of functions for “Time Of Day Clock”. The Hardware peripheral
consists of a realtime clock and a timestamp register. The timestamp is the current
date and time packed into a 32-bit register. The hardware can also provide
interrupts or polling of status bits.
A. Create a list of such functions that you’d provide as standard Application Interface
(API) (preferable with their arguments).
B. The hardware is also used for a microwave-oven. How would you integrate your
functions with the application. Provide a ‘C’ or ‘pseudo code’. The application is
to have a timer for the microwave-oven [start the timer, when the timer expires,
stop the oven].
Note : The API will contain a larger set of functions than the application would need. So
please enumerate all the api calls that you can provide. You do not need to write the
functions themselves, only enumerate and give a short description.
Assume : that the breakup of the 32bit register is :-
{year[31:26], month[25:22],day[21:17],hours[16:12],minutes[11:6], seconds[5:0]}

Q.3 Set. (B) [5+5 = 10 Marks]


Software Centric Hardware Peripheral
Design a set of functions for “Time Of Day Clock”. The Hardware peripheral
consists of a realtime clock and a timestamp register. The timestamp is the current
date and time packed into a 32bit register. The hardware can also provide
interrupts or polling of status bits.
A. Create a list of such functions that you’d provide as standard Application Interface
(API) (preferable with their arguments).
B. The hardware is also used for a microwave-oven. How would you integrate your
functions with the application. Provide a ‘C’ or ‘pseudo code’. The application is
to have a timer for the microwave-oven [start the timer, when the timer expires,
stop the oven].
Note : The API will contain a larger set of functions than the application would need. So
please enumerate all the api calls that you can provide. You do not need to write the
functions themselves, only enumerate and give a short description.
Assume : that the breakup of the 32bit register is :-
{hours[31:27], minutes [26:21], seconds [20:15], day [14:10], month [9:6], year [5:0]}
Q.3 Set. (C) [5+5 = 10 Marks]

Software Centric Hardware Peripheral


Design a set of functions for “Time Of Day Clock”. The Hardware peripheral
consists of a realtime clock and a timestamp register. The timestamp is the current
date and time packed into a 32bit register. The hardware can also provide
interrupts or polling of status bits.
A. Create a list of such functions that you’d provide as standard Application Interface
(API) (preferable with their arguments).
B. The hardware is also used for a microwave-oven. How would you integrate your
functions with the application. Provide a ‘C’ or ‘pseudo code’. The application is
to have a timer for the microwave-oven [start the timer, when the timer expires,
stop the oven].
Note : The API will contain a larger set of functions than the application would need. So
please enumerate all the api calls that you can provide. You do not need to write the
functions themselves, only enumerate and give a short description.
Assume : that the breakup of the 32bit register is :-
{hours[31:27], minutes [26:21], seconds [20:15], day [14:10], month [9:6], year [5:0]}

************

You might also like