149 Continious Math

149 : Continious Math

Select Project123456789ONSW2
  • Author: Sophia Li
  • Description: output is a total you can ADD, SUBTRACT, XOR, or LEFT_SHIFT with the input
  • GitHub repository
  • Clock: 1000 Hz

How it works

uses a register and some combinational logic. There is a simple state machine so you must release the button for enable_arithmetic before enabeling it again. Basically, the same operation won't happen every clock cycle 100k times a second.

How to test

Switch 6. after reset, the output should be zero. Hitting enable (Switch 5) will compute the current arithOp (+ = 2'b00, - = 2'b01, ^ = 2'b10, << = 2'b11

IO

#InputOutput
0clockLED[7]
1resetLED[6]
2enableLED[5]
3in_val[2]LED[4]
4in_val[1]LED[3]
5in_val[0]LED[2]
6arithOp[1]LED[1]
7arithOp[0]LED[0]