I wanted to understand how calculators work and the hardware in them. I gave myself the challenge of creating a 64 functions. The types of functions are Basic Math, Logic, Reduction, Bitwise, and more. The functions are similar to the AVR commands for Assembly code. I was able to study and learn from the AVR command sheets. I also can use a memory, seven segment display and Pmod switchs on the Basys 3 Board. I was able to save memory to the Registers and Flip-Flops on the Basys 3 Board. I really liked this project and all that I was able to learn.
Materials
Computer with Vivado
Basys 3 FPGA Board
Micro usb cable
Pmod 4 switch expansion (2)
Oscilliscope
Inputs and Outputs
24 bit input into function and selectors
16 bit output from function feed into seven seg display
Clock for certain functions and Display / Storage
Reset to set seven seg display to all 0s
Fill to set seven seg display to all Fs
Reset to clear the calculator
8 bits used for Oscilliscope Readings
Technology List
Higher level Math Functions (Multiply type)
7-segment Display
External Sensors (off-board switches)
Oscilliscope Readings
Function Selectors
This will allow the user to select what type of function will be performed.
Display
This will only show the user the resulting value.
Circuit Power, Schematic and Implemented Design
Module Selections
rst - 16'h0000
sel0 - 16'hFFFF
JB[0] - functional
JB[1] - operational
JB[2] - relational
JC[0] - logical
JC[1] - multiplication
JC[2] - add or sub(function_sel)
Function Selections
Functional
sw[8] - comp_2s
sw[9] - negate
sw[10] - inc_dec
sw[11] - times 2
default - square
Relational
sw[8] - compare
sw[9] - xor reduction
sw[10] - and reduction
sw[11] - or reduction
sw[12] - right shift 1
sw[13] - left shift 1
sw[14] - right arithmetic 1
sw[15] - left arithmetic 1
default - comparator
Logical
sw[8] - ander
sw[9] - nander
sw[10] - orer
sw[11] - norer
sw[12] - xorer
sw[13] - xnorer
sw[14] - inversion
sw[15] - or not
default - and not
Operational/Sequental
sw[8] - nop
sw[9] - not nop
sw[10] - operation
sw[11] - buffer
sw[12] - bitflip
sw[13] - gray
sw[14] - ring
sw[15] - mega shift
default - up or down(sw[1])
Oscilliscope Readings
JA[3:0] - an[3:0]
JA[4] - rst
JA[5] - function_sel
JA[6] - 7seg clk speed
JA[7] - counter clk speed
Peer Reviews
Peer 1: Chase Busacker
Peer 2: Jonathon Chacon
Conclusions
In this project I was able to create multiple functions. I created the needed registers and flip-flops to store the correct value. I was also able to display the results from the functions on the 7-segment display. I got my multifunction calculator to also perform the functions at the times the switches determined. I was able to learn alot more about Digital Systems, FPGA and Verilog through the course of this project.