Midterm Exam: ECE 423 W20 Embedded Computer Systems
Midterm Exam: ECE 423 W20 Embedded Computer Systems
Midterm Exam
Instructions:
ID Number: ____________________
Signature: ____________________
DO NOT WRITE ON THIS PAGE. THIS PAGE IS USED TO COMPUTE YOUR MARK.
1. Periodic Scheduling: consider the following periodic repeating schedule for a task graph. The
schedule contains 5 periods and repeats every 50 time units. The table below shows start and
finish time for each of the 5 periods (the start time of the first task in each period, and the finish
time of the last task in each period).
Period 1 2 3 4 5
Start time 0 10 15 24 42
Finish time 18 30 41 49 62
b. Under the assumption that inputs are periodic, compute again the worst-case makespan
for the task graph. [2p]
2. Synchronous Dataflows:
a. Prove that the dataflow shown below is consistent, and compute the number of firings in the
minimal periodic schedule. [4p]
b. Determine the minimal delays on the c -> d edge required to execute the dataflow without
deadlock. Note: there is no need to simulate the dataflow execution; instead, think about the
structure of the dataflow and number of firings. [2p]
3. Task Graph Scheduling: Consider the following task graph, to be scheduled on two
homogeneous processors. The number in each node denotes the execution time of the task.
a. Compute the Static Levels for the task graph under both forward and backward
scheduling. [3p]
Task A B C D E F G
Forward SL
Backward SL
b. Schedule the task graph using forward static list scheduling. Specify the order in which
tasks are scheduled. Use the timing lines and table below to help you. [3p]
e. Is the schedule obtained at either step b), c) or d) optimal (in the sense of minimizing
the makespan for one execution of the task graph)? If yes, prove why. If no, draw an
optimal schedule below. [2p]
a. Draw a Kahn process network to efficiently compute the convolution. You can only use the
processes below, but each process that you instantiate can have different values of input
parameters (R, C, k, v, div, M, or none, depending on the process). Note that the Input and
Output processes expect pixels to be provided one row at a time; furthermore, images are
processed one after the other (i.e., after one image is completed, the processes immediately
obtain another one). [5p]
b. Assuming the same way to provide inputs and outputs, could you implement the same
computation using a synchronous dataflow instead? Explain why. [2p]
c. Bonus Question: Assume that instead of a 2-dimensional image, you need to convolve a 3-
dimensional image (with dimension sizes R, C, W) by a 2x2x2 filter. Briefly explain how you
would modify the Kahn process network (you don’t need to draw the whole network) and
specify the parameters of the Drop processes you would need to use. [2p]
class TDMA_arbiter
{
private:
int number; //number of requestors
sc_time size; //size of the slot; sc_time is SystemC’s time type
public:
TDMA_arbiter(int n, sc_time s) : number(n), size(s) {}
and invoked by calling time = request(id); within a SystemC thread, where id is the
numeric id of the requestor (between 0 and number – 1) making the request. If the request is
made during a slot assigned to that requestor, the function should return the amount of time
(greater than zero) left in the slot; otherwise, it should block the requestor until its next slot,
and return the slot size. Write the code of the request function. Note: the sc_time_stamp()
function can be used to obtain the current simulation time. [4p]