Build a 32-bit accumulator circuit. The circuit features a control signal inc and enable input en. If en is 1 and inc is 1, the circuit increments the stored value by an amount specified by an input A[31:0] on the next clock cycle. If en is 1 and inc is 0 the circuit decrements the stored value by the amount specified in the input A on the next clock cycle. If en is 0, the circuit simply stores its current value without modification. The circuit has the following interface:______.
Input clock governs the state transitions in the circuit upon each rising edge.
Input clear is used as a synchronous reset for the stored value.
Input inc controls whether the value stored is to be incremented or decremented.
Input en is a control signal that activates the values increment/decrement
Input A determines how much to increment or decrement by
Output value is a 32-bit signal that can be used to read the stored value at any time.
* Note: Use any combination of combinational or sequential logic. It may be helpful to look into D Flip Flops and Registers.