Question: Exercise 1 (10 points) Model at the transaction level in SystemC a module representing a bus which: 1. uses 8 bits for data and 16

 Exercise 1 (10 points) Model at the transaction level in SystemC

Exercise 1 (10 points) Model at the transaction level in SystemC a module representing a bus which: 1. uses 8 bits for data and 16 bits for addresses (both unsigned). 2. implements the following interface (whose functions are called by a processor model, that you do not need to write): class bus_intfc: public sc_interface { void write(... data, ... address) = 0; ... read (... address) = 0; }; where, of course, ... stand for two data types for the data and the address to be defined appropriately). 3. has 3 ports, for a RAM memory, a timer peripheral and an A2D converter peripheral, all of the same bus_intfc type, to be implemented by the connected modules that you do not need to write). The RAM addresses are between hexadecimal 0 and FFF, the timer addresses are between hexadecimal 1000 and 100F. and the A2D addresses are between hexadecimal 1010 and 101F. A read request e.g. on address 100F must be sent to the timer interface (without changing the address: the timer itself can handle 16-bit addresses). Transactions on the bus must take 10 ns for a read and 5 ns for a write. Exercise 2 (5 points) Please mark those among the following ECL code fragments that are illegal and rejected by the compiler (do not mark those that are simply useless). 1. present (a b) emit(a); 2. while(1) { present (a) emit(b); await(b); present (b) emit(a); } await(c): (note the while(1)...) 3. do await(a): if (a > 0) emit(s); await(b): } weak_abort(s); 4. do { await(a); emit(b); ) suspend(b); 5. do { await(a) emit(b); ) suspend(a); Exercise 3 (5 points) Write the basic linear equalities that can be used to analyze the worst-case execution time of this code fragment, assuming that both loops can be executed at most 10 times each time they are started. 1 void f() { // 2 cycles to call this function for (j = 0; j 0) emit(s); await(b): } weak_abort(s); 4. do { await(a); emit(b); ) suspend(b); 5. do { await(a) emit(b); ) suspend(a); Exercise 3 (5 points) Write the basic linear equalities that can be used to analyze the worst-case execution time of this code fragment, assuming that both loops can be executed at most 10 times each time they are started. 1 void f() { // 2 cycles to call this function for (j = 0; j

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!