# Component Models¶

Read time: 7 minutes (1982 words)

Here are the basic components we will use to build out machine:

## ALU parts¶

These are used for incrementing and for math and general boolean functions:

## Multiplexors¶

A Multiplexor is basically a router. It has one input signal, but has multiple output signals. There is also a selector line that is used to route the input signal to one of the available output signal pins. Multiplexors ar available to select one of two, four, eight, etc output paths. The selector line provides a simple integer number used to pick one of the outputs.

We will need several multiplexors in the system. This one selects from one of two signals to pass through to the output. We will need a four-input MUX as well.

## Registers¶

There are simple registers in the system. They hold single values.

We have already mentioned the PC register. Others will be needed as well.

## Memory Components:¶

We have several kinds of memory modules in the system. The instruction memory is normally read-only, but we will need to be able to load it from a data file. The general data memory supports notmal read/write operations. We may add a separate stack memory to simplify the logic needed for the stack. Finally we will need a dual-port register memory to model the internal registers. This last memory supports dual reads on a single operation.

## Barrier Registers¶

We will model the classic four step machine in a simple way. Each stage does the required work, and all signals needed by the next stage in processing will be collected in a special register. This register has a variable number of inputs (depending on the stage we are working with). The barrier has the exact same number of outputs. Basically, the barrier stalls signals headed to the next stage until a clock tick comes along. We cna use these barrier registers to control exactly when a signal gets delivered to some component.

Each stage is separated by a multi function “barrier” that marks the end of a single step in the four-step sequence.

re a few additional parts needed, but these are enough for our basic machine as a start.