Modeling AVR Components

Read time: 3 minutes (990 words)

So far in our development, we have created a simple Component class that is behaving almost the way we want the actual components in our simulator to work. We also have a primitive Wire class tht is taking care of inter-component signal transmissions.

The big problem with this setup is that all components are the same, and we can only handle connections where a wire attaches to only one component on each end.

Clearly, we need to modify this design.


need several different kinds of components to build a working simulator

  • Memory
  • ALU
  • I/O

Not listed here is the Control unit, which we will build separately, since it is in charge of the entire system.

We also need to enhance our WIre class, so it can handle connections to multiple components. As we mentioned before, a single wire can be attached to only one component output, but it can be connected to multiple component inputs.

  • Wires

Wait a minute, the wires are not components. Well, they connect the other parts, so they are pretty important!