diff options
author | lshprung <lshprung@yahoo.com> | 2020-11-06 09:53:31 -0800 |
---|---|---|
committer | lshprung <lshprung@yahoo.com> | 2020-11-06 09:53:31 -0800 |
commit | 8bebe6e4e4d54ab18a483a157a14e00a55bb1c18 (patch) | |
tree | fe37cca217fae148af16a52f6a27da20bd74a684 | |
parent | 601c10ffec6072cb2e92f81c4bbe901ccd164047 (diff) |
Post-class 11/06
-rw-r--r-- | 18.md | 4 | ||||
-rw-r--r-- | 19.1.png | bin | 0 -> 24079 bytes | |||
-rw-r--r-- | 19.2.png | bin | 0 -> 24569 bytes | |||
-rw-r--r-- | 19.3.png | bin | 0 -> 24086 bytes | |||
-rw-r--r-- | 19.4.png | bin | 0 -> 37924 bytes | |||
-rw-r--r-- | 19.5.png | bin | 0 -> 10436 bytes | |||
-rw-r--r-- | 19.6.png | bin | 0 -> 24618 bytes | |||
-rw-r--r-- | 19.md | 67 |
8 files changed, 71 insertions, 0 deletions
@@ -173,3 +173,7 @@ ### State diagram to detect 101 ![diagram](18.15.png) + +--- + +[Multiple control outputs ->](19.md) diff --git a/19.1.png b/19.1.png Binary files differnew file mode 100644 index 0000000..57d34b2 --- /dev/null +++ b/19.1.png diff --git a/19.2.png b/19.2.png Binary files differnew file mode 100644 index 0000000..b4d3e05 --- /dev/null +++ b/19.2.png diff --git a/19.3.png b/19.3.png Binary files differnew file mode 100644 index 0000000..42a850c --- /dev/null +++ b/19.3.png diff --git a/19.4.png b/19.4.png Binary files differnew file mode 100644 index 0000000..376f2a3 --- /dev/null +++ b/19.4.png diff --git a/19.5.png b/19.5.png Binary files differnew file mode 100644 index 0000000..31d11d6 --- /dev/null +++ b/19.5.png diff --git a/19.6.png b/19.6.png Binary files differnew file mode 100644 index 0000000..da6b513 --- /dev/null +++ b/19.6.png @@ -0,0 +1,67 @@ +[\<- State machine concepts](18.md) + +--- + +# Multiple control outputs + +## Background on register swap problem + +### Datapath and control + +- We've learned about muxes and registers as datapath elements +- Mux selects and load enables are control signals that determine how datapath is used +- If these control signals need to be sequenced across multiple cycles, a state machine is the typical way to do this + +### Example 2: Register Swap + +- Swap the contents of R1 and R2 +- Can't be done in a single cycle +- Use R3 as temporary holding register + +![diagram](19.1.png) + +### Another view of the datapath + +- To make the control signals more clear + +![diagram](19.2.png) + +--- + +## State diagram + +### Sequence + +- Since there's a single bus, can only copy/move one value at a time + - Copy the value in R2 into R3 + - Select R2 to drive the bus and assert R3's enable + - Copy the value in R1 into R2 + - Select R1 to drive the bus and assert R2's enable + - Copy the value in R3 into R1 + - Select R3 to drive the bus and assert R1's enable +- Each of these steps is a different state in a state machine + +![diagram](19.3.png) + +--- + +## State table and implementation + +### State Table & Assignment + +![diagram](19.4.png) + +### Visually deriving equations + +- Y2 = (stateB) + (stateC) + - `= !y2*y2 + y2*!y1 = y2^y1` +- Y1 = w\*(stateA) + (stateC) + - `= w*!y2*!y1 + y2*!y1` + +### K-maps for Next State + +![diagram](19.5.png) + +### Implementation + +![diagram](19.6.png) |