Autosave: 2022-12-29 14:30:05

This commit is contained in:
thomasabishop 2022-12-29 14:30:05 +00:00
parent b4fb88aed7
commit 079f0ad146
3 changed files with 25 additions and 5 deletions

View file

@ -17,12 +17,16 @@ There are many HDLs but the most popular are VHDL ("very high speed integrated-c
We won't use an actual HDL language, instead we will use a simplified toy language called HDL that is simple enough that when it is used with a simulator, we can learn the main facets of chip design. Its syntax is very similar to VHDL.
## Demonstration
## Demonstration of HDL program
### Boolean function to enact
We will create an HDL program for an XOR gate that is implemented through the following arrangement of NOT, AND, and OR gates:
![](/img/xor-hdl.png)
### HDL file (`Xor.hdl`):
Here is our HDL file:
```vhdl
@ -41,8 +45,6 @@ CHIP Xor {
}
```
### Key points of note
#### Interface (`CHIP, IN, OUT`)
At the top level of the HDL program, the `CHIP` name and `IN`/`OUT` declaration is the _interface_ of the chip. Here we specify our naming convention for the `IN` and `OUT` values which we will refer to in the implementation declaration in `PARTS`.
@ -50,3 +52,19 @@ At the top level of the HDL program, the `CHIP` name and `IN`/`OUT` declaration
#### Implementation (`PARTS`)
Everything under the `PARTS` section is the chip _implementation_. We can draw on composite gates in the `PARTS` declaration (e.g. `Not`, `And`, `Or`). The convention is to work from left to right when transcribing from a digital circuit diagram
#### Pins
In an HDL program we distinguish internal pins along with the standard [input and output pins](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md). At the level of the interface, we are concerned only with input and output pins (in the example program these are `a`, `b` and `out`). It is at the level of the implementation that internal pins are encountered. In the example these are the connections between, e.g. the AND and NOT gates such as `And (a=a, b-notb, out=w1)`. This means the AND gate is receiving through its `a` pin the input `a` value and through its `b` pin the value of `b` inverted by a NOT. `out` is the value that is computed based on the input pins of `a` and `b`.
### Test file (`Xor.tst`)
Along with the HDL file we also create a test file. This runs the chip against the inputs we supply, these will typically be equivalent to the (left-hand) truth-values column in a truth table which is the same as the parameters passed to a [Boolean function](/Logic/Propositional_logic/Boolean_functions.md)
```vhdl
load Xor.hdl
output-list a, b, out;
set a 0, set b 0, eval, output;
set a 0, set b 1, eval, output;
set a 1, set b 0, eval, output;
```

View file

@ -10,7 +10,9 @@ tags: [logic-gates]
An integrated circuit (IC) is a single unit that comprises several logic gates designed for the easy construction of [digital circuits](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md). The terms "integrated circuit" and "chip" are often used interchangeably.
An IC puts the gates on a single piece of silicon that has electrical contact points called pins. The type we will look at are called **dual in-line packages** (DIPs). They are rectangular wth two parallel rows of pins. The pins make it easy to connect DIPs to a breadboard.
An IC puts the gates on a single piece of silicon that has electrical contact points called pins. There are two types of pins on an IC: input pins and output pins. Input pins are used to receive signals from other components in the circuit, while output pins are used to send signals to other components. The function of a pin is determined by the connection it has to the rest of the circuit and the type of signal it is intended to transmit or receive.
The type we will look at are called **dual in-line packages** (DIPs). They are rectangular wth two parallel rows of pins. The pins make it easy to connect DIPs to a breadboard.
_An integrated circuit and its use on a breadboard:_

View file

@ -12,7 +12,7 @@ tags: [logic-gates, binary]
[J.C. Scott. 2009. **But How Do It Know? The Basics of Computers for Everyone**, 21]
Logic gates are the basic building blocks of digital computing. **A logic gate is an electrical circuit that has one or more than one input and only one output.** The input controls the output and the logic determining which types of input (on/off) lead to specific outputs (on/off) is isomorphic with the truth-conditions of the [Boolean connectives](/Logic/Truth-functional_connectives.md) specifiable in terms of [truth tables](/Logic/Truth-tables.md).
Logic gates are the basic building blocks of digital computing. **A logic gate is an electrical circuit that has one or more than one input and only one output.** The input and output points of the gate are [pins](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md) The input controls the output and the logic determining which types of input (on/off) lead to specific outputs (on/off) is isomorphic with the truth-conditions of the [Boolean connectives](/Logic/Truth-functional_connectives.md) specifiable in terms of [truth tables](/Logic/Truth-tables.md).
Physically, what 'travels through' the gates is electrical current and what constitutes the 'gate' is a [transistor](/Electronics_and_Hardware/Digital_circuits/Transistors.md) responding to the current. Going up a level of abstraction, the current/ charge is identified with a [bit](/Electronics_and_Hardware/Binary/Binary_units_of_measurement.md#binary-units-of-measurement). It is bits that go into the gate and bits which come out: binary information that may be either 1 or 0.