On Tue, 20 Nov 2001, Kevin Cheng wrote:
> hi professor,
>
> I have additional question on problem2.
> there are cases which the machine will return more than one nickels
> eg: insert 4 nicels then a quarter, the machine returns 4 nickels,;
> insert 2 dimes then a quarter, the machine returns 4 nickels...etc.
> so, what you meant below is that after the total amount of money exceeds
> $0.25, it will go into another states which returns the right
> amount of nickels in different states.
> eg:(return 4th)->(return3rd)->(return2nd)->(return1st)->(R = 1) in this
> case.
> and for those returning nickels states, the clock are faster than states
> receive inputs..I mean the states receiving inputs are under slower clock
> rate..
>
> am I correct at this point ??
>
I am afraid that you are not.
There is only one clock in the machine.
This clock determines how fast you can go from one state to another.
If you make this clock fast enough, you can assume that it is impossible
for you to get an input indicating that a quarter was inserted in the
machine, and then immediately in the next clock you receive another
quarter. No person would ever be able to insert two quarters in that
machine that fast.
Therefore you can make an assumption like this:
If an input is one at a clock t, no input can be one at clocks
t+1, t+2, t+3, ... t+n. You have to determine the minimum
value of n for which your design will work. If that is the case
you can use the fact that no input can be one at those clocks to
simplify your design.
>
> On Tue, 20 Nov 2001, Jose Nelson Amaral wrote:
>
> > On Tue, 20 Nov 2001, Aloak Kapoor wrote:
> >
> > >
> > >
> > > Hi Professor,
> > >
> > > I was just wondering about question 2. When doing the state
> > > table, I found that I came to states in which I was ready to dispense
> > > the change back to the user (i.e. after 30 cents of input). In these
> > > states, I want to stop "listening" to the user's input, i.e. I want to go
> > > into go into the 5 cent return state regardless of ANY input. How would I
> > > express this in my state table?
> >
> > You will have to make an assumption about the speed of the clock that
> > you are using to change states in your machine, and the speed at which
> > a person can input coins in the machine. If you make your state machine
> > clock fast enough, you can make sure to have at least X state transitions
> > between two coin inputs, you can determine the minimum value of X at
> > which your machine will work.
> >
> >
> > Cheers,
> >
> > Nelson
> >
> > /
> > \ / / Jose Nelson Amaral - amaral@cs.ualberta.ca
> > ) / ( Associate Professor
> > / / \ Dept. of Computing Science - University of Alberta
> > ( / ) Edmonton, Alberta, Canada, T6G 2E8
> > \ O / Phone: (780)492-5411 Fax: (780)492-1071
> > \ / http://www.cs.ualberta.ca/~amaral
> > `----'
> >
> >
> >
> >
> >
>
--Cheers,
Nelson
/ \ / / Jose Nelson Amaral - amaral@cs.ualberta.ca ) / ( Associate Professor / / \ Dept. of Computing Science - University of Alberta ( / ) Edmonton, Alberta, Canada, T6G 2E8 \ O / Phone: (780)492-5411 Fax: (780)492-1071 \ / http://www.cs.ualberta.ca/~amaral `----'
This archive was generated by hypermail 2.1.3 : Wed Nov 21 2001 - 15:50:13 MST