University of Southern California
Department of Electrical Engineering - Systems
EE 477 Laboratory #3 (worth 20% of final grade)
Module Design, Cadence and SPICE
Due 12/7/09 11:59 PM
There will be no extensions so plan your time accordingly!
This lab addresses the design of a special-purpose circuit. The circuit is a simplified digital neuron, including an adder and 11 D flip-flops.
The digital neuron
There are many inputs to the neuron:
- 3 2-bit "strengths," AStr, Bstr, and Cstr, that are loaded infrequently
- 3 data inputs to the neuron, A, B and C, that could be different every clock cycle
- a single-bit inhibitory input I,
- a 4-bit threshold value Threshold, that is loaded infrequently,
- Load control signal, that allows the output ff to be loaded with a new value
that allows A, B, and C to be loaded, - load strengths control signal LoadStr, that allows new strengths to be loaded,
- load threshold control signal LoadThresh, that allows a new threshold to be loaded,
- Reset control signal, that resets all the flipflops to 0,
- and a clock.
Name your signals as shown in bold above. The output should be named AP. It is important you follow this naming convention so we can verify that your circuit works.
The basic Neuron Function:
- Each data input and control input has a single bit, except the three strengths, which are two bits each, and the threshold, which is 4 bits.
- The strengths are stored in flip flops internally in the neuron, as is the 4-bit threshold value.
- The inhibitory input I is a single bit.
- You need to generate all inverted inputs, including /clock.
- The neuron output contains a firing flip-flop, and the output of the flip-flop AP represents the output of the neuron.
- When each data input A, B, or C is high, the strength of that input (stored in the strength flipflops) is added to the other strengths that have high inputs to form the total strength. If the total strength exceeds a stored 4-bit value Threshold, the neuron "fires," as long as I is held high. So if the strength of A is 01 and A is high, 01 is added to the total strength. The total strength is recomputed every clock cycle, when new inputs A, B and C are loaded. The total strength is a maximum of 1001 if all three inputs are high, and all three strengths are set to 11.
- The inhibitory input I is basically a veto that prevents the neuron from "firing" when it is asserted low.
- After the positive edge of the clock, if the neuron fires, the output of the firing flip-flop goes from low to high. After the next rising clock, the firing flip-flop output falls.
- The neuron cannot "fire" two clock cycles in a row.
- Load is normally held high, but is lowered if we want to emulate a neuron failing to fire due to lack of sleep or similar circumstance.
- Note that the addition function the neuron contains is not exactly the same as the compound gate you designed, but you might find a way to use the compound gate.
A block diagram of the neuron is shown below.