Skip to content

Commit 4c6a22f

Browse files
authored
Merge pull request #11 from ErickOF/dev
Releasing the version 1 of the project
2 parents 125c38c + de2a376 commit 4c6a22f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+13622
-32
lines changed

.gitignore

Lines changed: 234 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,234 @@
1-
# Prerequisites
2-
*.d
3-
4-
# Compiled Object files
5-
*.slo
6-
*.lo
7-
*.o
8-
*.obj
9-
10-
# Precompiled Headers
11-
*.gch
12-
*.pch
13-
14-
# Compiled Dynamic libraries
15-
*.so
16-
*.dylib
17-
*.dll
18-
19-
# Fortran module files
20-
*.mod
21-
*.smod
22-
23-
# Compiled Static libraries
24-
*.lai
25-
*.la
26-
*.a
27-
*.lib
28-
29-
# Executables
30-
*.exe
31-
*.out
32-
*.app
1+
# Created by https://www.toptal.com/developers/gitignore/api/c++,python,jupyternotebooks
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=c++,python,jupyternotebooks
3+
4+
### C++ ###
5+
# Prerequisites
6+
*.d
7+
8+
# Compiled Object files
9+
*.slo
10+
*.lo
11+
*.o
12+
*.obj
13+
14+
# Precompiled Headers
15+
*.gch
16+
*.pch
17+
18+
# Compiled Dynamic libraries
19+
*.so
20+
*.dylib
21+
*.dll
22+
23+
# Fortran module files
24+
*.mod
25+
*.smod
26+
27+
# Compiled Static libraries
28+
*.lai
29+
*.la
30+
*.a
31+
*.lib
32+
33+
# Executables
34+
*.exe
35+
*.out
36+
*.app
37+
38+
### JupyterNotebooks ###
39+
# gitignore template for Jupyter Notebooks
40+
# website: http://jupyter.org/
41+
42+
.ipynb_checkpoints
43+
*/.ipynb_checkpoints/*
44+
45+
# IPython
46+
profile_default/
47+
ipython_config.py
48+
49+
# Remove previous ipynb_checkpoints
50+
# git rm -r .ipynb_checkpoints/
51+
52+
### Python ###
53+
# Byte-compiled / optimized / DLL files
54+
__pycache__/
55+
*.py[cod]
56+
*$py.class
57+
58+
# C extensions
59+
60+
# Distribution / packaging
61+
.Python
62+
build/
63+
develop-eggs/
64+
dist/
65+
downloads/
66+
eggs/
67+
.eggs/
68+
lib/
69+
lib64/
70+
parts/
71+
sdist/
72+
var/
73+
wheels/
74+
share/python-wheels/
75+
*.egg-info/
76+
.installed.cfg
77+
*.egg
78+
MANIFEST
79+
80+
# PyInstaller
81+
# Usually these files are written by a python script from a template
82+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
83+
*.manifest
84+
*.spec
85+
86+
# Installer logs
87+
pip-log.txt
88+
pip-delete-this-directory.txt
89+
90+
# Unit test / coverage reports
91+
htmlcov/
92+
.tox/
93+
.nox/
94+
.coverage
95+
.coverage.*
96+
.cache
97+
nosetests.xml
98+
coverage.xml
99+
*.cover
100+
*.py,cover
101+
.hypothesis/
102+
.pytest_cache/
103+
cover/
104+
105+
# Translations
106+
*.mo
107+
*.pot
108+
109+
# Django stuff:
110+
*.log
111+
local_settings.py
112+
db.sqlite3
113+
db.sqlite3-journal
114+
115+
# Flask stuff:
116+
instance/
117+
.webassets-cache
118+
119+
# Scrapy stuff:
120+
.scrapy
121+
122+
# Sphinx documentation
123+
docs/_build/
124+
125+
# PyBuilder
126+
.pybuilder/
127+
target/
128+
129+
# Jupyter Notebook
130+
131+
# IPython
132+
133+
# pyenv
134+
# For a library or package, you might want to ignore these files since the code is
135+
# intended to run in multiple environments; otherwise, check them in:
136+
# .python-version
137+
138+
# pipenv
139+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
140+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
141+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
142+
# install all needed dependencies.
143+
#Pipfile.lock
144+
145+
# poetry
146+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
147+
# This is especially recommended for binary packages to ensure reproducibility, and is more
148+
# commonly ignored for libraries.
149+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
150+
#poetry.lock
151+
152+
# pdm
153+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
154+
#pdm.lock
155+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
156+
# in version control.
157+
# https://pdm.fming.dev/#use-with-ide
158+
.pdm.toml
159+
160+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
161+
__pypackages__/
162+
163+
# Celery stuff
164+
celerybeat-schedule
165+
celerybeat.pid
166+
167+
# SageMath parsed files
168+
*.sage.py
169+
170+
# Environments
171+
.env
172+
.venv
173+
env/
174+
venv/
175+
ENV/
176+
env.bak/
177+
venv.bak/
178+
179+
# Spyder project settings
180+
.spyderproject
181+
.spyproject
182+
183+
# Rope project settings
184+
.ropeproject
185+
186+
# mkdocs documentation
187+
/site
188+
189+
# mypy
190+
.mypy_cache/
191+
.dmypy.json
192+
dmypy.json
193+
194+
# Pyre type checker
195+
.pyre/
196+
197+
# pytype static type analyzer
198+
.pytype/
199+
200+
# Cython debug symbols
201+
cython_debug/
202+
203+
# PyCharm
204+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
205+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
206+
# and can be added to the global gitignore or merged into this file. For a more nuclear
207+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
208+
#.idea/
209+
210+
### Python Patch ###
211+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
212+
poetry.toml
213+
214+
# ruff
215+
.ruff_cache/
216+
217+
# LSP config files
218+
pyrightconfig.json
219+
220+
# End of https://www.toptal.com/developers/gitignore/api/c++,python,jupyternotebooks
221+
222+
# Ignore generate images from datagen tool
223+
modules/unification/*.bitmap
224+
modules/unification/*.gif
225+
modules/unification/*.jpeg
226+
modules/unification/*.jpg
227+
modules/unification/*.png
228+
tools/datagen/src/imgs/*_grayscale_image*
229+
tools/datagen/src/imgs/*_noisy_image*
230+
tools/datagen/src/imgs/*_sobel_*
231+
232+
# Ignore VCD files
233+
*.vcd
234+
test

modules/Makefile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
SYSTEMC?=$(SYSTEMC_HOME)
2+
TARGET?=test
3+
4+
# Compiler
5+
CC=g++
6+
CFLAGS=-Wall -I. -O3 -g -Wextra -Wunused-function
7+
8+
ifdef USE_CPP17
9+
CFLAGS+=-std=c++17
10+
endif
11+
12+
# Target
13+
LD=g++
14+
LFLAGS=-Wall -I. -lm -g
15+
LIBS=-lsystemc -lm
16+
17+
# Source directories
18+
SRCDIR=src
19+
OBJDIR=obj
20+
BINDIR=./
21+
INCDIR=-I. -I./include -I$(SYSTEMC)/include -Ibasic_protocol -I$(SYSTEMC)/include/tlm_core/tlm_2
22+
LIBDIR=-L. -L$(SYSTEMC)/lib-linux64
23+
24+
ifdef INCLUDE_OPENCV
25+
# Target
26+
LIBS+=-lopencv_imgcodecs -lopencv_core -lopencv_highgui -lopencv_imgproc
27+
28+
# Source directories
29+
INCDIR+=-I$(OPENCV_H_DIR)
30+
LIBDIR+=-L$(OPENCV_SO_DIR)
31+
else
32+
ifdef INCLUDE_OPENCV_PKG
33+
CFLAGS += $(shell pkg-config --cflags opencv4)
34+
LFLAGS += $(shell pkg-config --libs opencv4)
35+
endif # INCLUDE_OPENCV_PKG
36+
endif # INCLUDE_OPENCV
37+
38+
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
39+
INCLUDES := $(wildcard $(INCDIR)/*.hpp)
40+
OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
41+
42+
$(BINDIR)/$(TARGET): clean $(OBJECTS)
43+
@$(LD) $(OBJECTS) $(LFLAGS) $(LIBS) $(LIBDIR) -o $@
44+
45+
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
46+
@$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
47+
48+
.PHONY: clean
49+
clean:
50+
@rm -rf obj
51+
@rm -f $(TARGET)
52+
@mkdir -p obj
53+
54+
compile: $(BINDIR)/$(TARGET)
55+
56+
all: compile run

modules/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# **Project Modules**
2+
3+
There is a template Makefile that can be used to compile each module. In order
4+
to compile with the template Makefile, the folder structure for each module
5+
must be like:
6+
7+
.
8+
├── obj # Compiled files
9+
├── docs # Documentation files
10+
├── include # C++ header files
11+
├── src # C++ source files
12+
├── tools # Tools and utilities
13+
└── README.md
14+

modules/communication/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# **Communication Module**
2+
3+
Add compilation instructions

modules/compression/Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Include common Makefile
2+
include ../Makefile
3+
4+
ifdef IPS_JPG_PV_EN
5+
CFLAGS += -DIPS_JPG_PV_EN
6+
LFLAGS += -DIPS_JPG_PV_EN
7+
endif # IPS_JPG_PV_EN
8+
9+
ifdef IPS_JPG_LT_EN
10+
CFLAGS += -DIPS_JPG_LT_EN
11+
LFLAGS += -DIPS_JPG_LT_EN
12+
endif # IPS_JPG_LT_EN
13+
14+
ifdef IPS_JPG_AT_EN
15+
CFLAGS += -DIPS_JPG_AT_EN
16+
LFLAGS += -DIPS_JPG_AT_EN
17+
endif # IPS_JPG_AT_EN
18+
19+
# Run the compiled file
20+
run:
21+
@./$(TARGET)
22+
23+
# Show waveform
24+
waveform:
25+
@gtkwave input_matrix.vcd

modules/compression/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# **Compression Module**
2+
3+
Add compilation instructions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
echo 'Compiling *.c *cpp files'
3+
rm -rf ips_jpg.o
4+
export SYSTEMC_HOME=/usr/local/systemc-2.3.3/
5+
export OPENCV_H_DIR=/usr/local/include/opencv4/
6+
export OPENCV_SO_DIR=/usr/local/lib/
7+
export LD_LIBRARY_PATH=$SYSTEMC_HOME/lib-linux64
8+
g++ -I$SYSTEMC_HOME/include -I$OPENCV_H_DIR -Iinclude/ -L$SYSTEMC_HOME/lib-linux64 -L$OPENCV_SO_DIR src/ips_jpg_at_testbench.cpp include/ips_jpg_at_model.hpp -lsystemc -lm -o ips_jpg.o
9+
echo 'Simulation Started'
10+
./ips_jpg.o
11+
echo 'Simulation Ended'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
echo 'Compiling *.c *cpp files'
3+
rm -rf ips_jpg.o
4+
export SYSTEMC_HOME=/usr/local/systemc-2.3.3/
5+
export OPENCV_H_DIR=/usr/local/include/opencv4/
6+
export OPENCV_SO_DIR=/usr/local/lib/
7+
export LD_LIBRARY_PATH=$SYSTEMC_HOME/lib-linux64
8+
g++ -I$SYSTEMC_HOME/include -I$OPENCV_H_DIR -Iinclude/ -L$SYSTEMC_HOME/lib-linux64 -L$OPENCV_SO_DIR src/ips_jpg_lt_testbench.cpp include/ips_jpg_lt_model.hpp -lsystemc -lm -o ips_jpg.o
9+
echo 'Simulation Started'
10+
./ips_jpg.o
11+
echo 'Simulation Ended'

0 commit comments

Comments
 (0)