hw4_2011 - Copy (2)

hw4_2011 - Copy (2) - execution time. 4. Download and build...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 153a/253 Homework 4 Problems: 1. Construct the Coke Machine 1.0 in C using the nested switch FSM implementation pattern. 2. Design a UML state machine for the Coke Machine 1.1 that doesn’t take your money if the ma- chine jams. 3. Consider a random deterministic FSM with n states and m transitions implemented using nest- ed switch and state table patterns. a. Estimate the total program size in terms of n and m for both kinds of implementation. b. Estimate the execution time in terms of n and m for both kinds of implementation. Hint: We are only interested in the complexity order of the problem (O(n,m) ) . You could use the amount of code lines to estimate the program size, and the amount of function calls to estimate the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: execution time. 4. Download and build the code for the qhsmtst example. The code has a Makefile which should compile correctly on any linux machine and should be easy to convert to the terminal windows environment or on the MicroBlaze platform. a. Read the code, and draw the UML style state chart of the implemented HFSM. b. Instrument the code in main.c to allow you to estimate the relative probability of each of the repeatable states of the machine, given a random selection of input signal at each dispatch. Run the experiment for 10 sets of 10,000 dispatch calls and estimate your confidence in the probabilities....
View Full Document

This note was uploaded on 02/25/2012 for the course ECE 253 taught by Professor Brewer,f during the Fall '08 term at UCSB.

Ask a homework question - tutors are online