ANU: The Australian National University
_____________________________________________________________________
[ANU] [FEIT] [DCS] [Jim Grundy] [COMP8033] [ML] [HOL] [Exercises] [Lectures] [Assignments]
_____________________________________________________________________

Exercise 10: Timed Circuits

As with the last exercise, you should load the numLib library to define the natural numbers before continuing.

Modelling Timed Behaviour

Until now we have been interested in the voltage level on a wire only at a particular point in time. For this purpose it was sufficient to model a wire as a boolean value, with true representing a high value and false representing a low one. We would now like to look at how the voltage on a wire changes over time; for this we require a more elaborate model.

We will model times as natural numbers. Time 0 will be the time at which the circuit is turned on, and greater numbers will represent progressively later times. The length of time between some time point t and the next t+1 will be some arbritrary, but small, period of time; lets call it a tick. For the sake of argument, lets say that a tick is equal to the switching time of a CMOS gate, called a gate delay.

Lets now think of a wire not just as a voltage, but as a wave-form, which describes how the voltage changes over time. We can model this in HOL as a function from numbers to booleans. For example, If w is a wire, then w t models the voltage (high or low) on that wire at time t. For example, imaging the waveform below as a function from numbers to booleans.

High:  
   
 


   
Low:
 

 
     
...
Time: 0 1 2 3 4 5 6 7 8 9  

Circuits with Delay

Using this model of time, define a predicate DNOR a b c such that the predicate represents a NOR gate with input wires a and b and output wire c, and there is a one `tick' propagation delay between a value being present on the input wires and the corresponding value appearing on the output wire.

Using the DNOR predicate define a predicate SR_IMP r s q q' to represent the following circuit:

SR Flip-Flop
SR Flip-Flop

Next, prove the following properties of the flip-flop implementation:

Hints:

You can search for existing theorems using the LAL documentation system by selecting the option `HOL Theorem Manual' from the search menu. Use this facility to find all the theorems with names that contain `ADD'.

The MoscowML help system can be used to learn more about any loaded theory (and many other things besides). For example, use the command `help "arithmeticTheory"' to learn more about the arithmetic theory.

_____________________________________________________________________
[ANU] [FEIT] [DCS] [Jim Grundy] [COMP8033] [ML] [HOL] [Exercises] [Lectures] [Assignments]
_____________________________________________________________________
Feedback & Queries: Jim.Grundy@anu.edu.au
Date Last Modified: Wed 22 Mar 2000
Universal Resource Locator: http://cs.anu.edu.au/student/comp8033/ex10.html
Copyright © 2000 The Australian National University
All rights reserved