University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 1 The SCR/A7E Specification Technique — An Example.

Slides:



Advertisements
Similar presentations
Min terms and logic expression
Advertisements

CS1Q Computer Systems Lecture 12 Simon Gay. Lecture 12CS1Q Computer Systems - Simon Gay 2 Design of Sequential Circuits The systematic design of sequential.
Simulation executable (simv)
The 8051 Microcontroller and Embedded Systems
Why care about debugging? How many of you have written a program that worked perfectly the first time? No one (including me!) writes a program that works.
NAND-gate Latch. Summary NAND-gate Latch The time sequence at right shows the conditions under which the set and reset inputs cause a state change, and.
Chapter 10 – Digital System Projects Using HDL Copyright © 2011, 2007, 2004, 2001, 1998 by Pearson Education, Inc. Upper Saddle River, New Jersey
Stop Watch Sean Hicks Dongpu Jin ELEC 307 Project 2 Instructor: Alvaro Pinto April/12/2011.
Counter Circuits and VHDL State Machines
University of Virginia SCR/A7E Specification Technique (CS340 John Knight 2005) 1 The SCR/A7E Specification Technique.
ECE 331 – Digital System Design
LAB 3 – Review of the Assignment. -- Clarifications Vikram Murali. TA : CSE 140L Prof. CK Cheng.
14-Jun-15 State Machines. 2 What is a state machine? A state machine is a different way of thinking about computation A state machine has some number.
Pseudocode and Algorithms
Software Design Project
Debug Techinques for HW/SW Systems What's broken, the HW or the SW? Some basic thoughts: -assume that its broken -its not working correctly until proven.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 8, 2007.
Testing Test Plans and Regression Testing. Programs need testing! Writing a program involves more than knowing the syntax and semantics of a language.
Programming – Touch Sensors Intro to Robotics. The Limit Switch When designing robotic arms there is always the chance the arm will move too far up or.
Electronics Technology
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Chapter 4 TIMER OPERATION
CoE3DJ4 Digital Systems Design Chapter 4: Timer operation.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Advanced Digital Circuits ECET 146 Week 5 Professor Iskandar Hack ET 221G, Me as I typed this slides.
Khaled A. Al-Utaibi  The Push Button  Interfacing Push Buttons to Arduino  Programming Digital Inputs  Working with “Bouncy”
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
THE GARMIN 305 FORERUNNER A Basic How-To Guide By Laura Colwell Myers.
Digital Logic Design Lecture # 21 University of Tehran.
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
GameBoy Advance Programming Timers. Common Practice Game timing is normally synchronized with the vertical blank. For certain applications such as precise.
Control Structures Repetition or Iteration or Looping Part II.
13-Nov-1513-Nov-1513-Nov-15 State Machines. What is a state machine? A state machine is a different way of thinking about computation A state machine.
CHAPTER-2 Fundamentals of Digital Logic. Digital Logic Digital electronic circuits are used to build computer hardware as well as other products (digital.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Timers and Counters by Dr. Amin Danial Asham. References  Programmable Controllers-Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
Digital Logic Design.
1 Interrupts, Resets Today: First Hour: Interrupts –Section 5.2 of Huang’s Textbook –In-class Activity #1 Second Hour: More Interrupts Section 5.2 of Huang’s.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay 2 The D FlipFlop The RS flipflop stores one bit of information.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 29P. 1Winter Quarter Software Design Project Lecture 29.
Counter Circuits and VHDL State Machines
Introduction to Loops Iteration Repetition Counting Loops Also known as.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL State Machines Anselmo Lastra.
Intro to Loops 1.General Knowledge 2.Two Types of Loops 3.The WHILE loop 1.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
Getting Started With Python Brendan Routledge
Programming Design ROBOTC Software. Behavior-Based Programming A behavior is anything your robot does –Turning on a single motor or servo Three main types.
Requirements Specification
Programming Design ROBOTC Software Principles Of Engineering
INTRODUCTION TO ROBOTICS Part 5: Programming
Basic Computer Organization and Design
Programming and File Management Part 2
Store Multiple Results?
Introduction To Repetition The for loop
Binary Addition and Subtraction
Instructor: Alexander Stoytchev
Programming – Touch Sensors
Interrupts, Tasks and Timers
CSCI1600: Embedded and Real Time Software
Algorithm Discovery and Design
EE4OI4 Engineering Design
Programming Design ROBOTC Software Principles Of Engineering
Guest Lecture by David Johnston
State Machines 6-Apr-196-Apr-19.
ECE 352 Digital System Fundamentals
State Machines 8-May-19.
State Machines 16-May-19.
CSCI1600: Embedded and Real Time Software
ECE 352 Digital System Fundamentals
Presentation transcript:

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 1 The SCR/A7E Specification Technique — An Example

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 2 A Simple Stop Watch  Four Digit Display, Seven Segments Each  Display Is Min Min Sec Sec  Roll Over To Zero At 99:59  Two Buttons: Start/Stop And Lap/Reset  High-Precision Internal Counter Operating At 10 KHz  Need Complete Semi-formal Specification

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 3 A Simple Stop Watch Give me a break, how hard can this be?  What Issues Arise In Specifying Something This Simple? Action On Button Down Or Button Up? Any Action On The "Other" Transition? What If You Push Both Buttons Together? What If You Push The Start/Stop Button When In Lap Display? What If You Push The Lap/Reset Button When Its Reset?

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 4 When Has Software Failed? Software has failed when it no longer does what the stakeholders want it to do. If you don’t specify what a software system is supposed to do under certain circumstances, then anything that it does is correct in a sense. There is no "wrong" software, just software you do not want. READ HENINGER’S PAPER CAREFULLY. ASK QUESTIONS.

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 5 Example vs. Approach This Is An Example, Don’t Follow "Blindly" Apply Ideas At The Abstract Level To Your Problem Discuss, Think, Investigate, Ask Questions

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 6 The Easy Stuff  Symbolic Constants: $maxminutesdisplayed$=99 $processorused$="Intel xyz" $counterfrequency$=10000 Hz  Text Macro: !pushbutton!-Depressing one of the two control buttons for sufficient time that the debounce circuit stabilizes and a single open/close/open sequence is detected. !buttonup!-The event that occurs when a button changes from being down to being up.

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 7 Hardware Device Input & Output  Hardware Specification: Seven Segment Displays Buttons  Seven Segment Displays: Output data item:seven segment digit display tens of min //min-10// hardware:LCD description:display tens of minutes count up to 9 interface:i/o port 4  Button: input data item:start/stop push button /start-stop/ hardware:momentary switch, normally open interface:i/o port 1, bit 3

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 8 Functionality (Functions?)  Periodic vs. Demand  Basic Difference In Real-time Processing  Time Display Update Is A Periodic Function Every Second  Lap Display Setting Is Demand When Button Is Pushed

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 9 Functionality (Functions?)  Display Is Shared—Virtual Displays Explain What Each Display Is To Look Like Separately Explain When And How Each Is To Be Displayed Displays Include: Elapsed Time, Lap Time, Perhaps Others  From Heninger (Paraphrased): "Events specify instants in time, conditions specify intervals of time." "Events provide a convenient way to describe functions where something is done when a button is pushed but not if the pilot continues to hold it down."  Periodic And Demand Functions Defined By Tables That Relate Modes, Events, And Actions

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 10 Conditions And Events  Very Important Conditions: /start-stop/=open /start-stop/=closed /lap-reset/=open /lap-reset/=closed  Very

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 11 Basic Approach  Assume A Hardware-Incremented Counter  Interrupt Raised For Every Second Passing  Time-State Variables: $time$: $seconds$An integer counter. $minutes$An integer counter. Comments: $seconds$ used to contain elapsed seconds since reset. $minutes$ used to contain elapsed minutes since reset. Both $seconds$ & $minutes$ separate from displ. values. //display//: Four-digit seven segment display. //sec-10////sec-1// //min-10////min-1//

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 12 Modes  Modes Of Operations—Collected Into A Table: *initial* *running* *stopped* *lapdisplay*  Mode Transitions (Are These Correct?): *initial* to *stopped* to *running* to *lapdisplay* to *running* to *stopped* to  Would A Picture Work?

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 13 Event Tables  Note That The Syntax Is Not Entirely Correct Here...

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 14 Condition Table  Think About Possible Modes, Conditions, And Outputs For A Robot System

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 15 Major Benefits Of This Approach  Simple Formalisms  Not Hard To Understand  Nevertheless Formal  Several Visual Formalisms, Easy To Work With  Does Not Require Elaborate Tool Support Although Very Sophisticated Tools Do Exist

University of Virginia SCR/A7E Specification Example (CS340 John Knight 2005) 16 Major Benefits Of This Approach  Amenable To Simple Human Checking, E.g. Completeness: Are All Modes Listed In Event Table? Do Set Of Modes Cover All Possible Operating Conditions? Is Mode Transition Table Complete? Are Actions Associated With Mode Transitions Correct?  Provides Structure To Our Specification & The Process By Which It Is Created: Modes Mode Transitions Events And Conditions Function Tables