Skip to content

yasith46/Simple-11bit-Signed-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple 11-bit Signed Integer Calculator

This project aims to create a simple 11-bit signed integer calculator. The project was done using Quartus Prime Lite 20.1.1

The project consists of following modules (the ticked ones have been completed):

  • CLA - 4-bit Carry Look Ahead adder
  • ALU - 12-bit ALU
  • Main PC Part
  • Binary to BCD converter
  • BCD 7 Segment Display

WhatsApp Image 2024-09-08 at 23 58 06_81e6a666

Note

PS: The readme originally said 32-bit ALU, that was the aim. But I wanted to make it a bit more than that and to be so that I could implement it on the DE2-115 board I recently got for this year from the Department of Electronics and Telecommunications Engineering - University of Moratuwa - Sri Lanka

Instructions

Note

PS: Please note that [15:14] of the instruction has been set as N/A only because the switches on my FPGA have developed too much rust and are stuck up there. You are free to use those bits as well (probably you don't have the same issue). I might change the instruction and the length if I come about a workaround for this which does not include meddling with the already existing switches (mind you the FPGA is not mine).

Input configuration:
For input mode CMD = 3'b000

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMD
[2:1]
-- N/A -- CMD
[0]
R0 IMMEDIATE

Operation configuration:
For operation mode CMD != 3'b000

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMD
[2:1]
-- N/A -- CMD
[0]
R0 R2 R1 ----------- VOID -----------

Commands

OPCODE CMD Description Status
000 Ld Loads the immediate to R0 ✅ Works
001 Ad Add R1 and R2, save to R0 ✅ Works
010 Su Substracts R2 from R1, saves to R0 ✅ Works
011 An Bitwise AND between R2 from R1, saves to R0 ✅ Works
100 Or Bitwise OR between R2 from R1, saves to R0 ✅ Works
101 Sh Displays the number at R0 (for debugging purposes) ✅ Works

Function Buttons:
KEY0: ENTER
KEY1: CLR (Temporarily deleted)

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published