Some Basic Circuits
- There are a set of circuits that we will be using as basic
building blocks.
- Decoders/Encoders
- n-bit input
- 2n outputs.
- This circuit essentially decodes the input and lights a corresponding output line.
- Let us look at a 2 bit decoder
- There is a two bit input line (I1,I0
- There are 22 output lines, O3 ···O0
-
I1 | I0 | O3 | O2 th> | O1 th> | O0 th> |
0 | 0 | 0 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 1 | 0 |
1 | 0 | 0 | 1 | 0 | 0 |
1 | 1 | 1 | 0 | 0 | 0 |
-
- Notice the slashed line to show more than one bit of data.
- In tkgate we will need a few other items.
- A dip switch allows us to have multiple switches in a single uint.
- We can edit the proprieties to make it a 2 bit switch
- Right click on it, select properties.
- Go to Port
- Highlight the port
- Change the bit width to 2.
- The tkgate decoder has an additional line, which seems to be an activation line.
-
- To make our own version, we will need to use a wire merge
-
- And we can build one out of and gates.
- The opposite of a decoder is an encoder.
- How would you implement one of these?
- A decoder will be a key part of any memory system.
- A Multiplexer
- Takes 2n input lines
- Takes n control lines
- Has a single output line.
- It selects between the input lines, based on the control lines
what to transfer to the output line.
-
- We can implement one of these as well.
-
- We often use a 2 to 1 mux with multiple data lines
-
- We will use a multiplexer in our simple CPU.
- For example, load the PC from either the bus or the PC + 1
- PLA - programmable logic arrays
- Since everything can be represented as a sum of products
- A special type of device called a PLA has been designed to
handle this.
-
- A set of input lines, as well as the inversion of the this input
comes into a AND plane
- These lines can be anded together, and the result is passed to the
OR plane
- These lines are ored together and sent to the output.
- Generally, the gates are not draw, just dots to indicate an and or or.
- So our voting machine from before would become
-
- We could reuse some of the minterms (if needed) for other results.
- The gates are only laid down when the circuit is created