Skip to content

Commit 4843711

Browse files
committed
Add RISCV_TLM and connecting filter
1 parent 313567a commit 4843711

Some content is hidden

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

55 files changed

+17185
-2
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,8 @@ tools/datagen/src/imgs/*_sobel_*
233233
*.vcd
234234
test
235235
*.zst
236-
.vscode
236+
.vscode
237+
VirtualPrototype/Log.txt
238+
VirtualPrototype/log.txt
239+
VirtualPrototype/sw/dump
240+
VirtualPrototype/sw/log.txt

VirtualPrototype/Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM ubuntu:bionic
2+
LABEL maintainer="Màrius Montón"
3+
ENV SYSTEMC_VERSION 2.3.3
4+
5+
RUN apt-get update -q && apt-get install -qy gcc-riscv64-linux-gnu
6+
7+
RUN apt-get update -q && apt-get install -qy --no-install-recommends \
8+
build-essential curl \
9+
cmake \
10+
git \
11+
openssh-client \
12+
wget \
13+
g++-8 \
14+
xterm \
15+
&& apt-get clean \
16+
&& rm -rf /var/lib/apt/lists/*
17+
18+
RUN mkdir -p /usr/src/systemc \
19+
&& wget --no-check-certificate https://accellera.org/images/downloads/standards/systemc/systemc-$SYSTEMC_VERSION.tar.gz \
20+
&& tar fzxC systemc-$SYSTEMC_VERSION.tar.gz /usr/src/systemc \
21+
&& cd /usr/src/systemc/systemc-$SYSTEMC_VERSION \
22+
&& mkdir objs \
23+
&& cd objs \
24+
&& export CXX=g++-8 \
25+
&& mkdir -p /usr/local/systemc-$SYSTEMC_VERSION \
26+
&& ../configure --prefix=/usr/local/systemc-$SYSTEMC_VERSION CXXFLAGS="-DSC_CPLUSPLUS=201103L"\
27+
&& make \
28+
&& make install \
29+
&& cd / \
30+
&& rm -rf /usr/src/systemc
31+
32+
ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/systemc-$SYSTEMC_VERSION/include
33+
ENV LIBRARY_PATH=$LIBRARY_PATH:/usr/local/systemc-$SYSTEMC_VERSION/lib-linux64
34+
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/systemc-$SYSTEMC_VERSION/lib-linux64
35+
ENV SYSTEMC=/usr/local/systemc-$SYSTEMC_VERSION
36+
37+
RUN mkdir -p /root/.ssh
38+
RUN ssh-keyscan github.com > /root/.ssh/known_hosts
39+
40+
41+
42+
RUN rm -fr /usr/src/riscv64 \
43+
&& mkdir -p /usr/src/riscv64 \
44+
&& cd /usr/src/riscv64 \
45+
&& git config --global http.sslVerify false \
46+
&& git clone https://github.com/mariusmm/RISC-V-TLM.git \
47+
&& cd RISC-V-TLM \
48+
&& mkdir obj \
49+
&& make
50+
51+

VirtualPrototype/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

VirtualPrototype/Makefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
TARGET = RISCV_TLM
2+
3+
SYSTEMC ?=/usr/local/systemc-2.3.3
4+
TARGET_ARCH=linux64
5+
6+
CC = g++
7+
# compiling flags here
8+
CFLAGS = -Wall -I. -O3 -g -Wextra -Wunused-function
9+
10+
11+
12+
LINKER = g++
13+
# linking flags here
14+
LFLAGS = -Wall -I. -lm -g
15+
LIBS = -lsystemc -lm $(EXTRA_LIBS)
16+
17+
18+
# change these to proper directories where each file should be
19+
SRCDIR = src
20+
OBJDIR = obj
21+
BINDIR = ./
22+
INCDIR = -I. -I./inc -I$(SYSTEMC)/include
23+
LIBDIR = -L. -L$(SYSTEMC)/lib-$(TARGET_ARCH)
24+
25+
26+
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
27+
INCLUDES := $(wildcard $(INCDIR)/*.hpp)
28+
INCLUDES := $(wildcard $(INCDIR)/*.h)
29+
OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
30+
rm = rm -f
31+
32+
33+
$(BINDIR)/$(TARGET): $(OBJECTS)
34+
@$(LINKER) $(OBJECTS) $(LFLAGS) $(LIBS) $(LIBDIR) -o $@
35+
@echo "Linking complete!"
36+
37+
38+
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
39+
@echo "Compiling "$<" ..."
40+
@$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
41+
@echo "Done!"
42+
43+
.PHONY: clean
44+
clean:
45+
@$(rm) $(OBJECTS)
46+
@echo "Cleanup complete!"
47+
48+
.PHONY: remove
49+
remove: clean
50+
@$(rm) $(BINDIR)/$(TARGET)
51+
@echo "Executable removed!"
52+
53+
all: $(BINDIR)/$(TARGET)

0 commit comments

Comments
 (0)