last commit

This commit is contained in:
Raphaël LACROIX 2023-05-31 23:55:26 +02:00
parent 6085f51211
commit 315602a36f
7 changed files with 31 additions and 6 deletions

Binary file not shown.

View file

@ -1,2 +1,18 @@
# Projet-Systemes-Informatiques
**LEJEUNE AURÉLIA - LACROIX RAPHAËL**
*This project was carried out as part of our computer engineering training.
The aim of this project is to design a C compiler and a microprocessor, the former being thought with the latter in mind.*
The compiler is based on a simplified version of the C language. It supports basic arithmetic operations (addition, subtraction, integer division, multiplication), Boolean operations, while loops and complex conditions. It has been coded using Lex, Yacc and C. The resulting assembly code and object code can be produced using the cross-assembler (itself coded in Python).
An interpreter is available in a GUI version to follow assembly code execution step by step in memory.
## Compilation
- `$ make vhdl` : compiles and run the compiler then convert its binary into VHDL format
- `$ make cli-inter` : compiles and run the compiler then interprets its binary (GUI)
- `$ make gui-inter` :compiles and run the compiler then interprets its binary
## Microprocessor
The VHDL folder contains all the files needed to build our microprocessor. It also contains two test files, `test_alu` and `test_cpu`, for testing all ALU operations and simulating program execution, respectively.

View file

@ -31,6 +31,9 @@ clean:
vhdl: clean asm
python3 ../cross-Compiler/cross-compiler.py
inter: clean asm
cli-inter: clean asm
python3 ../interpreter/interpreter.py
gui-inter: clean asm
python3 ../interpreter/graph_interpreter.py

Binary file not shown.

View file

@ -194,7 +194,7 @@ void checkArraySanity(){
if (currentIndex == maxIndex){
reallocateArray(maxIndex * 2);
} else {
if (currentIndex < maxIndex / 2 && maxIndex / 2 > START_TABLE_SIZE){
if (currentIndex < maxIndex / 4 && maxIndex / 4 > START_TABLE_SIZE){
reallocateArray(maxIndex / 2);
}
}

View file

@ -8,7 +8,7 @@ try:
from textual.containers import Container, VerticalScroll
from textual.widgets import Footer, Header, Static
except:
print("please install textual and rich !")
print("\n\n=====================\n\nplease install textual and rich !\n\n=====================\n\n")
def getLinesToShow(ip, lines):

View file

@ -1,5 +1,11 @@
from rich.console import Console
from rich.table import Table
try:
from rich.console import Console
from rich.table import Tablessdf
except:
print("\n\n=====================\n\nplease install rich !\n You can also run \"python3 interpreter/interpreter.old.py\" if you want something that does not use any non-core package\n\n=====================\n\n")
table = Table()
table.add_column("Operation", justify="left", style="red", no_wrap=True)