Skip to content

Initial framework source code for CSE240A branch predictor project

Notifications You must be signed in to change notification settings

Allison-Turner/CSE240A

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Branch Prediction Algorithm Simulator

By Allison Turner & James Yuan

For CSE 240A Fall 2021

Algorithms

gshare

tournament

Perceptron

Dependencies

Makefile struggles

CC=gcc
OPTS=-fPIE -g -std=gnu99 -Werror

all: main.o predictor.o python3 pip
	$(CC) $(OPTS) -lm -o predictor main.o predictor.o
	pip3 install -r requirements.txt

main.o: main.c predictor.h
	$(CC) $(OPTS) -c main.c

predictor.o: predictor.h predictor.c
	$(CC) $(OPTS) -c predictor.c

python3:
	@if [ -z $(which python3)]; then\
		bash -c "apt-get -y update";\
		bash -c "apt install -y software-properties-common";\
		bash -c "add-apt-repository -y ppa:deadsnakes/ppa";\
		bash -c "apt-get -y update";\
		bash -c "apt-get install -y python3.8";\
	fi;\
	alias python3=python3.8;

pip: python3
	@if [ -z $(which pip3)]; then\
		bash -c "apt-get install -y python3-pip";\
	fi;

clean:
	rm -f *.o predictor
	rm -rf __pycache__

About

Initial framework source code for CSE240A branch predictor project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.5%
  • Python 10.3%
  • Makefile 1.2%