


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



A n a ly s is
A rc h ite c tu re
& D e s ig n
P ro b le m D o m a in
A n a ly s is M o d e l (U M L )
D e s ig n M o d e l (A S M )
The Binary Up/Down Counter – The Binary Up/Down Counter– Register LevelRegister Level
z The Binary Up/Down Counter
9 This multi-mode counter
block takes an input “seed”
value, and counts up or
down from this value,
based on the direction of
count.
9 Each count cycle the
Enable pulse is set, the
Direction bit can be set to
count in one or the other
direction, and the Seed and
NoCounts values are set.
9 The counter will run for the
number of cycles indicated
by input NoCounts.
NoCounts
8
Seed
8 Direction
1
Enable
1
CountValue
8
Valid
1
Up/Down Counter Model – Up/Down Counter Model– Use Case DiagramUse Case Diagram
z Use cases and actors:
9 We have two different Use
Case models, one that is
more abstract than the
other.
9 The more abstract one is
created from the 1 st pass
analysis of the Counter, the
2 nd one is created from a
more detailed look.
Set_NoCounts
Set_Seed
Set_Direction
Set_Enable
Reset
Count_Up
Count_Down
U-D_Counter
Output_CountValue
Set_ValidFlag
" User"
Specify_Count_Up
Specify_Count_Down " Us er"
Reset
2 nd^ Pass Analysis Model. 1 st^ Pass Analysis Model.
Up/Down Counter ModelUp/Down Counter Model –– State ChartState Chart
z States:
9 We use the State Diagram
notation to get a sense of
the state behavior of a
block.
9 Here we use a Statechart
to model the state-based
behavior for the counter’s
overall function.
9 Notice that, in the 2 nd pass
analysis model, we have a
“nested” state model,
showing that out ability to
count is dependent on first
enabling the counter (to
load its values), then
clearing the enable signal.
9 Just as for the Activity
Chart, we consider State
Charts when looking at the
control flow within a single
Class (i.e., a hardware
Block or ASM Thread).
Start
Finish
Not_Activated Enabled
Enable_Cleared
Enable = '1'
Enable = '0' Enable = '1'
Enable = '0'
1 st^ Pass State Model.
Start
Finis h
Not_Activated Enabled
Enable_Cleared Enable_Cleared_St art
Count_UP Count_DN
Enable_Cleared_Finish
Enable = '1'
Enable = '0' Enable = '1'
Enable = '0'
Enable_Cleared_St art
Count_UP Count_DN
Count < NoCounts Count < NoCounts
Enable_Cleared_Finish
DirectionUp = '1' DirectionUp = '0'
2 nd Pass State Model.
Up/Down Counter Design ModelUp/Down Counter Design Model –– ASM ChartASM Chart
O This is an in-class Exercise, which we’ll discuss, and continue as Homework #2. You’ll
need to create your design model in flowHDL®, by enhancing the one I have created here.
^RES Bus_1 <- Seed Bus_2 <- Direction Bus_3 <- NoCounts Loop <- ‘0’ CountVal <- ‘0’
Enable = ‘1’
Loop = Bus_
Loop <- INCRNC(Loop)
Bus_2 = ‘1’ Y N
Bus_1 <- INCRNC(Bus_1)
Bus_1 <- DECRNC(Bus_1)
Poll
CountVal <- Bus_