Bilkent University Name :
CS223 DIGITAL DESIGN Surname :
2019 - 2020 Spring
Student ID :
(TAKE-HOME) QUIZ # 5
Q1. You are required to design a High-Level State Machine (HLSM) to control the speed of a step
motor. Speed is a 4-bit value between 0 and 15 that is controlled by using two buttons. Upon
reset, the speed must be set to zero.
If no button is pushed, no change in speed occurs.
Up-button increments the speed by one. When the speed value is maximum, it will not be
increased anymore (the speed value will not wrap around from 1111 to 0000).
Down-button decrements the speed by one. When the speed value is minimum, it will not be
decreased anymore (the speed value will not wrap around from 0000 to 1111).
If both buttons are pushed, no change in speed occurs.
(a) Draw the state transition diagram to describe the system’s desired behavior as a high-level
state machine (Step 1).
(b) Create a datapath to carry out the data operations of the HLSM (Step 2A). Use the
components from the datapath component library given in the lecture slides.
(c) Connect the datapath to a controller block. Connect external control inputs and outputs to
the controller block (Step 2B).
(d) Convert the high-level state machine (HLSM) to a finite-state machine (FSM) for the
controller block (Step 2C).
WRITE THE HONOR CODE, YOUR NAME-SURNAME, STUDENT ID AND SIGN
YOUR PAPERS. YOU SHOULD SCAN AND UPLOAD YOUR ANSWER SHEETS
TO UNILICA OR MOODLE UNTIL Monday, 11 May 2020, 09:00 AM.
CS223 Quiz5 (Sections 3&4) 10.05.2020