initial commit
This commit is contained in:
commit
cc687eaf4b
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1730410661">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.1730410661" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1730410661" name="Debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1730410661.218663890" name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.base.953157788" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1034252621" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
||||
<builder buildPath="/TGFS-VP/build/Debug" id="de.marw.cdt.cmake.core.genscriptbuilder.959296861" keepEnvironmentInBuildfile="false" name="CMake Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="de.marw.cdt.cmake.core.genscriptbuilder"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.519757762" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1878089590" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.705150349" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.415892287" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1806041557" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1121924488" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.149655162" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.471975198" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.base.1494801701" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.605423467" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule buildDir="build/${ConfigName}" moduleId="de.marw.cdt.cmake.core.settings">
|
||||
<options/>
|
||||
<defs>
|
||||
<def name="CMAKE_BUILD_TYPE" type="STRING" val="${ConfigName}"/>
|
||||
<def name="BUILD_SHARED_LIBS" type="STRING" val="ON"/>
|
||||
</defs>
|
||||
</storageModule>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1730410661.719145049">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.1730410661.719145049" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1730410661.719145049" name="Release" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1730410661.719145049." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.base.63768783" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.942580764" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
||||
<builder buildPath="/TGFS-VP/build/Debug" id="de.marw.cdt.cmake.core.genscriptbuilder.1665148758" keepEnvironmentInBuildfile="false" name="CMake Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="de.marw.cdt.cmake.core.genscriptbuilder"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.2063467163" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1534023345" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1510234384" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1971017117" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1521427508" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1619877503" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1947556151" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1339053133" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.base.1109501250" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1429143214" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule buildDir="build/${ConfigName}" moduleId="de.marw.cdt.cmake.core.settings">
|
||||
<options/>
|
||||
<defs>
|
||||
<def name="CMAKE_BUILD_TYPE" type="STRING" val="${ConfigName}"/>
|
||||
<def name="BUILD_SHARED_LIBS" type="STRING" val="ON"/>
|
||||
</defs>
|
||||
</storageModule>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="TGFS-VP.null.771101143" name="TGFS-VP"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Default">
|
||||
<resource resourceType="PROJECT" workspacePath="/TGFS-VP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1730410661;cdt.managedbuild.toolchain.gnu.base.1730410661.218663890;cdt.managedbuild.tool.gnu.c.compiler.base.415892287;cdt.managedbuild.tool.gnu.c.compiler.input.1806041557">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1730410661;cdt.managedbuild.toolchain.gnu.base.1730410661.218663890;cdt.managedbuild.tool.gnu.cpp.compiler.base.1878089590;cdt.managedbuild.tool.gnu.cpp.compiler.input.705150349">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="fw-hello-world" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>CMAKE_BUILD_TOOL</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>fw-hello-world</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="fw-fir" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>gmake</buildCommand>
|
||||
<buildArguments>-C ../../fw/fir</buildArguments>
|
||||
<buildTarget>clean all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="fw-fir ISAX" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>gmake</buildCommand>
|
||||
<buildArguments>-C ../../fw/fir VARIANT=ISAX</buildArguments>
|
||||
<buildTarget>clean all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
</cproject>
|
|
@ -0,0 +1,13 @@
|
|||
/build/
|
||||
/plugins/
|
||||
/.settings/
|
||||
*.o
|
||||
*.a
|
||||
*.lib
|
||||
/*.txlog
|
||||
/*.vcd
|
||||
/.vs
|
||||
/out
|
||||
/coverage.info
|
||||
/output.txt
|
||||
/output.trc
|
|
@ -0,0 +1,12 @@
|
|||
[submodule "scc"]
|
||||
path = scc
|
||||
url = https://github.com/VP-Vibes/SystemC-Components.git
|
||||
[submodule "vpvper"]
|
||||
path = vpvper
|
||||
url = https://github.com/VP-Vibes/VPV-Peripherals.git
|
||||
[submodule "tgc-iss/dbt-rise-core"]
|
||||
path = tgc-iss/dbt-rise-core
|
||||
url = https://github.com/Minres/DBT-RISE-Core.git
|
||||
[submodule "tgc-iss/dbt-rise-tgc"]
|
||||
path = tgc-iss/dbt-rise-tgc
|
||||
url = https://git.minres.com/DBT-RISE/DBT-RISE-TGC.git
|
|
@ -0,0 +1,31 @@
|
|||
FROM gitpod/workspace-full:latest
|
||||
|
||||
|
||||
# Make a working folder and set the necessary environment variables.
|
||||
ENV RISCV /opt/riscv
|
||||
RUN sudo mkdir -p $RISCV
|
||||
RUN sudo touch $RISCV/install.stamp
|
||||
|
||||
# Add the GNU utils bin folder to the path.
|
||||
ENV PATH $RISCV/bin:$PATH
|
||||
MAINTAINER eyck@minres.com
|
||||
|
||||
USER root
|
||||
RUN apt-get install gnupg software-properties-common wget -y
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
|
||||
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
|
||||
|
||||
# Obtain the RISCV-tools repo which consists of a number of submodules
|
||||
# so make sure we get those too.
|
||||
WORKDIR /opt/riscv
|
||||
RUN apt-get update && \
|
||||
apt-get install -y autoconf automake autotools-dev curl python3 python3-pip python3-venv libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev cmake gdb && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
RUN git clone --recursive https://github.com/riscv/riscv-gnu-toolchain && \
|
||||
cd riscv-gnu-toolchain && \
|
||||
./configure --prefix=/opt/riscv --without-system-zlib --enable-multilib --with-arch=rv32gc --with-abi=ilp32d && \
|
||||
make -j newlib && \
|
||||
cd .. && \
|
||||
rm -rf riscv-gnu-toolchain
|
||||
RUN apt-get update && apt install default-jdk -y
|
||||
USER gitpod
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# Commands to start on workspace startup
|
||||
image: stanka/gitpod-riscv-tools:latest
|
||||
# file: .gitpod.Dockerfile
|
||||
tasks:
|
||||
- env:
|
||||
CONAN_USER_HOME: "/workspace/conan"
|
||||
init: |
|
||||
python3 -m venv /workspace/venv
|
||||
python3 -m pip install --upgrade pip
|
||||
source /workspace/venv/bin/activate
|
||||
pip install conan
|
||||
command: |
|
||||
source /workspace/venv/bin/activate
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
|
||||
cmake --build build
|
||||
vscode:
|
||||
extensions:
|
||||
- ms-python.python
|
||||
- webfreak.debug
|
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>TGC-VP</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>0</id>
|
||||
<name></name>
|
||||
<type>22</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.o</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>0</id>
|
||||
<name></name>
|
||||
<type>22</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.a</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
|
||||
</pydev_project>
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++14",
|
||||
"intelliSenseMode": "linux-gcc-x64",
|
||||
"configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "gdb",
|
||||
"request": "attach",
|
||||
"name": "Attach-to-gdbserver",
|
||||
"executable": "./fw/hello-world/hello",
|
||||
"target": ":10000",
|
||||
"remote": true,
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "prettyPrinters",
|
||||
"gdbpath": "/opt/riscv/bin/riscv32-unknown-elf-gdb",
|
||||
"debugger_args": [],
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
"group": "FW Debug",
|
||||
"order": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "gdb",
|
||||
"request": "launch",
|
||||
"name": "Launch-VP-with-gdbserver",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "parseText",
|
||||
"target": "./build/src/tgc-vp",
|
||||
"arguments": "-f fw/hello-world/hello -g 10000",
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
"group": "FW Debug",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "gdb",
|
||||
"request": "launch",
|
||||
"name": "VP-Debug",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "parseText",
|
||||
"target": "./build/src/tgc-vp",
|
||||
"printCalls": false,
|
||||
"arguments": "-f fw/hello-world/hello"
|
||||
},
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "FW-Debug",
|
||||
"configurations": ["Launch-VP-with-gdbserver", "Attach-to-gdbserver"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"platform.h": "c"
|
||||
},
|
||||
"debug.allowBreakpointsEverywhere": true
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "CMake-and-make",
|
||||
"type": "shell",
|
||||
"command": "source /workspace/venv/bin/activate && cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON && cmake --build build",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": true
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Build-FW",
|
||||
"type": "shell",
|
||||
"command": "cd fw/hello-world/ && make",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Execute-VP",
|
||||
"type": "shell",
|
||||
"command": "build/src/tgc-vp -f fw/hello-world/hello -p pctrace=contrib/TGC_C_cycles.json",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "VP-GDB-Server",
|
||||
"type": "shell",
|
||||
"command": "build/src/tgc-vp -f fw/hello-world/hello -g 10000",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": true
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake)
|
||||
|
||||
include(ConanInline)
|
||||
|
||||
project(ecosystem-vp LANGUAGES C CXX VERSION 1.0.0)
|
||||
|
||||
option(ENABLE_SCV "Enable the use of SCV" ON)
|
||||
option(LIBS_ONLY "Just build the shared libraries needed to build the VP" OFF)
|
||||
option(NO_FW_BUILD "Disable the automatic rebuild of firmware running on the VP" OFF)
|
||||
option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF)
|
||||
option(ENABLE_COVERAGE "Enable code coverage" OFF)
|
||||
option(ENABLE_SANITIZER "Enable address sanitizer" OFF)
|
||||
option(ENABLE_CLANGTIDY "Enable static analysis with clang-tidy." OFF)
|
||||
|
||||
set(SCC_LIB_ONLY ON)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# add address sanitizer
|
||||
if(ENABLE_SANITIZER)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
add_compile_options(/vmg /wd26812) # suppress Warnung C26812: "enum class" gegenüber "enum" (Enum.3) bevorzugen
|
||||
endif()
|
||||
set(CONAN_BOOST_OPTIONS
|
||||
boost:header_only=False
|
||||
boost:without_contract=True
|
||||
boost:without_fiber=True
|
||||
boost:without_graph=True
|
||||
boost:without_graph_parallel=True
|
||||
boost:without_iostreams=True
|
||||
boost:without_json=True
|
||||
boost:without_locale=True
|
||||
boost:without_log=True
|
||||
boost:without_math=True
|
||||
boost:without_mpi=True
|
||||
boost:without_nowide=True
|
||||
boost:without_python=True
|
||||
boost:without_random=True
|
||||
boost:without_regex=True
|
||||
boost:without_stacktrace=True
|
||||
boost:without_test=True
|
||||
boost:without_timer=True
|
||||
boost:without_type_erasure=True
|
||||
boost:without_wave=True
|
||||
)
|
||||
if (UNIX)
|
||||
list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True boost:shared=True)
|
||||
endif (UNIX)
|
||||
|
||||
set(CONAN_PACKAGE_LIST fmt/8.0.1 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0 elfio/3.8)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True lua:compile_as_cpp=False)
|
||||
list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27 seasocks/1.4.4 lua/5.4.3)
|
||||
endif()
|
||||
set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS})
|
||||
if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME})
|
||||
set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 systemc-cci/1.0.0)
|
||||
set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} systemc:shared=True systemc-cci:shared=True systemc:disable_virtual_bind=False)
|
||||
endif()
|
||||
|
||||
conan_check()
|
||||
conan_add_remote(NAME minres URL https://artifactory.minres.com/artifactory/api/conan/oss)
|
||||
conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST}
|
||||
GENERATORS cmake_find_package
|
||||
OPTIONS ${CONAN_PACKAGE_OPTIONS}
|
||||
)
|
||||
conan_cmake_autodetect(settings)
|
||||
conan_install()
|
||||
# needed when using CentOS devenv-7 or -8 and boost does not build because of missing GLIBCXX version
|
||||
#conan_install(BUILD b2 missing)
|
||||
find_package(tcc)
|
||||
find_package(elfio)
|
||||
find_package(fmt)
|
||||
find_package(gsl-lite)
|
||||
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
|
||||
#set(Boost_NO_SYSTEM_PATHS ON)
|
||||
#set(Boost_USE_STATIC_LIBS OFF)
|
||||
#set(Boost_USE_MULTITHREADED ON)
|
||||
#set(Boost_USE_STATIC_RUNTIME OFF)
|
||||
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS program_options QUIET)
|
||||
|
||||
set(CLANG_FORMAT_EXCLUDE_PATTERNS "scc")
|
||||
find_package(ClangFormat)
|
||||
|
||||
if(ENABLE_COVERAGE)
|
||||
include(CodeCoverage)
|
||||
append_coverage_compiler_flags()
|
||||
set(COVERAGE_EXCLUDES "${tgfs_verif_SOURCE_DIR}/scc/*" "${tgfs_verif_SOURCE_DIR}/build/*" "$ENV{HOME}/.conan/*" "/opt/*")
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANGTIDY)
|
||||
find_program(CLANG_TIDY_EXE NAMES "clang-tidy")
|
||||
if (CLANG_TIDY_EXE)
|
||||
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
|
||||
set(CLANG_TIDY_CHECKS
|
||||
"-*,modernize-*,-modernize-use-trailing-return-type,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,boost-*,bugprone-*,performance-*,portability-*,readability-*")
|
||||
#set(CLANG_TIDY_CHECKS "*")
|
||||
set(CMAKE_CXX_CLANG_TIDY
|
||||
${CLANG_TIDY_EXE};
|
||||
-header-filter=${tgfs_verif_SOURCE_DIR};
|
||||
-checks=${CLANG_TIDY_CHECKS};)
|
||||
else()
|
||||
message(AUTHOR_WARNING "clang-tidy not found!")
|
||||
set(CMAKE_CXX_CLANG_TIDY "" CACHE STRING "" FORCE) # delete it
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
add_subdirectory(scc)
|
||||
add_subdirectory(tgc-iss/dbt-rise-core)
|
||||
add_subdirectory(tgc-iss/dbt-rise-tgc)
|
||||
if(NOT USE_CWR_SYSTEMC)
|
||||
add_subdirectory(vpvper)
|
||||
endif()
|
||||
if(NOT LIBS_ONLY)
|
||||
add_subdirectory(src)
|
||||
endif()
|
||||
if(IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/plugins)
|
||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/plugins)
|
||||
endif()
|
||||
if(NOT NO_FW_BUILD)
|
||||
add_custom_target(fw-hello-world ALL COMMAND make -C fw/hello-world
|
||||
USES_TERMINAL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
# CTest is a testing tool that can be used to test your project.
|
||||
enable_testing()
|
||||
add_test(NAME tgc-vp-hello-world
|
||||
#WORKING_DIRECTORY ${ecosystem-vp_DIR}/bin
|
||||
COMMAND tgc-vp -f ${CMAKE_CURRENT_LIST_DIR}/fw/hello-world/prebuilt/hello.elf)
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,16 @@
|
|||
#%Module######################################################################
|
||||
##
|
||||
## Project Module
|
||||
##
|
||||
proc ModulesHelp { } {
|
||||
puts stderr "\tThe TGC verification project Module\n"
|
||||
puts stderr "\tThis module loads PATHs and variables for running TGC verification."
|
||||
}
|
||||
|
||||
set distro [exec /usr/bin/lsb_release -i -s]
|
||||
if { $distro == "CentOS" && ![info exists ::env(PROJECT)] && ![info exists ::env(PCP_DIR)] } {
|
||||
puts stderr "Don't forget to execute 'scl enable devtoolset-7 llvm-toolset-7 bash'"
|
||||
}
|
||||
|
||||
module load tools/gcc-riscv32/9.2.0
|
||||
module load tools/cmake
|
|
@ -0,0 +1,126 @@
|
|||
# TGC-VP
|
||||
The Scale4Edge ecosystem VP using VP-VIBES peripherals.
|
||||
|
||||
This VP is based in MINRES TGC series cores and uses CoreDSL to generate the concrete ISS
|
||||
of a particular ISA + extensions. The generator approach makes it very flexible and adaptable.
|
||||
Since the CoreDSL description is used to generate RTL as well as verification artifacts it
|
||||
provides a comprehensive and consistent solution to develop processor cores.
|
||||
|
||||
## Ultra Quick start
|
||||
|
||||
Using gitpod you can run the VP in the cloud. Just visit [Gitpod.io](https://www.gitpod.io/#https://github.com/Minres/TGC-VP/tree/develop)
|
||||
and follow the instructions. After the build finished you can run
|
||||
|
||||
```
|
||||
|
||||
build/src/tgc-vp -f fw/hello-world/prebuilt/hello.elf
|
||||
|
||||
```
|
||||
|
||||
or use ctest:
|
||||
|
||||
```
|
||||
|
||||
cd build
|
||||
ctest
|
||||
|
||||
```
|
||||
|
||||
|
||||
You will see on console the prints of the hello world firmware at fw/hello-world/hello.c
|
||||
|
||||
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Minres/TGC-VP)
|
||||
|
||||
## Quick start
|
||||
|
||||
* you need to have a C++14 capable compiler, make, python, and cmake installed
|
||||
|
||||
* install conan.io (see also http://docs.conan.io/en/latest/installation.html):
|
||||
|
||||
```
|
||||
|
||||
pip3 install --user conan
|
||||
|
||||
```
|
||||
|
||||
It is advised to use conan version 1.36 or newer. In case of an older version please run
|
||||
|
||||
```sh
|
||||
|
||||
pip3 install --user --upgrade conan
|
||||
|
||||
```
|
||||
|
||||
Installing conan for the first time you need to create a profile:
|
||||
|
||||
```
|
||||
|
||||
conan profile create default --detect
|
||||
|
||||
```
|
||||
|
||||
* checkout source from git
|
||||
|
||||
```sh
|
||||
|
||||
git clone --recursive -b develop https://github.com/Minres/TGC-VP.git
|
||||
|
||||
```
|
||||
|
||||
* start an out-of-source build:
|
||||
|
||||
```
|
||||
|
||||
cd TGC-VP
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j tgc-vp
|
||||
|
||||
```
|
||||
|
||||
* run the VP with pre-built firmware
|
||||
|
||||
```
|
||||
|
||||
ctest
|
||||
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
|
||||
src/tgc-vp -f ../fw/hello-world/prebuild/hello.elf
|
||||
|
||||
```
|
||||
|
||||
To rebuild the firmware you need to install a RISC-V toolchain like https://github.com/riscv/riscv-tools.
|
||||
|
||||
# Windows/Visual Studio build
|
||||
|
||||
TGC-VP supports VS2019/MSVC 16 and has been tested only with this version
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You need to have to following installed:
|
||||
|
||||
* Visual Studio 2019 (community edition is sufficient) with C/C++ support
|
||||
* Python 3.6 or newer
|
||||
* SystemC 2.3.3 and SystemC-CCI 1.0.0. Both should be installed into the same location and the
|
||||
environment variable SYSTEMC_HOME should point to it
|
||||
* Conan (https://conan.io/) version 1.36 or newer. If python is installed this can be installed using pip
|
||||
(see above in [Quick start](#quick-start))
|
||||
|
||||
## build step
|
||||
|
||||
Create a project at the location of the git workarea. This can be done
|
||||
|
||||
```
|
||||
|
||||
devenv <path to checkout>
|
||||
|
||||
```
|
||||
|
||||
The build steps are as described in the VS documentation for CMake based projects.
|
||||
|
|
@ -0,0 +1,724 @@
|
|||
{
|
||||
"TGC_C" : [
|
||||
{
|
||||
"name" : "LUI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000110111",
|
||||
"mask": "0b00000000000000000000000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "AUIPC",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000010111",
|
||||
"mask": "0b00000000000000000000000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "JAL",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000001101111",
|
||||
"mask": "0b00000000000000000000000001111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "JALR",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000001100111",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "BEQ",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000001100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : [2,1]
|
||||
},
|
||||
{
|
||||
"name" : "BNE",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000001100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : [2,1]
|
||||
},
|
||||
{
|
||||
"name" : "BLT",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000100000001100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : [2,1]
|
||||
},
|
||||
{
|
||||
"name" : "BGE",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000101000001100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : [2,1]
|
||||
},
|
||||
{
|
||||
"name" : "BLTU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000110000001100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : [2,1]
|
||||
},
|
||||
{
|
||||
"name" : "BGEU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000111000001100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": true,
|
||||
"delay" : [2,1]
|
||||
},
|
||||
{
|
||||
"name" : "LB",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000000011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "LH",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000000000011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "LW",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000010000000000011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "LBU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000100000000000011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "LHU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000101000000000011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SB",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SH",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000000100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SW",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000010000000100011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "ADDI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000010011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SLTI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000010000000010011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SLTIU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000011000000010011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "XORI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000100000000010011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "ORI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000110000000010011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "ANDI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000111000000010011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SLLI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000000010011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SRLI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000101000000010011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SRAI",
|
||||
"size" : 32,
|
||||
"encoding": "0b01000000000000000101000000010011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "ADD",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SUB",
|
||||
"size" : 32,
|
||||
"encoding": "0b01000000000000000000000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SLL",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SLT",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000010000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SLTU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000011000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "XOR",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000100000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SRL",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000101000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "SRA",
|
||||
"size" : 32,
|
||||
"encoding": "0b01000000000000000101000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "OR",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000110000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "AND",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000111000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "FENCE",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000000001111",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "ECALL",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "EBREAK",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000100000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "URET",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000001000000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "SRET",
|
||||
"size" : 32,
|
||||
"encoding": "0b00010000001000000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "MRET",
|
||||
"size" : 32,
|
||||
"encoding": "0b00110000001000000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "WFI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00010000010100000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "DRET",
|
||||
"size" : 32,
|
||||
"encoding": "0b01111011001000000000000001110011",
|
||||
"mask": "0b11111111111111111111111111111111",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "CSRRW",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000001110011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRRS",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000010000001110011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRRC",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000011000001110011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRRWI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000101000001110011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRRSI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000110000001110011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRRCI",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000111000001110011",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "FENCE_I",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000000000000000001000000001111",
|
||||
"mask": "0b00000000000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "MUL",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000000000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "MULH",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000001000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "MULHSU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000010000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "MULHU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000011000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "DIV",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000100000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "DIVU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000101000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "REM",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000110000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "REMU",
|
||||
"size" : 32,
|
||||
"encoding": "0b00000010000000000111000000110011",
|
||||
"mask": "0b11111110000000000111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CADDI4SPN",
|
||||
"size" : 16,
|
||||
"encoding": "0b0000000000000000",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CLW",
|
||||
"size" : 16,
|
||||
"encoding": "0b0100000000000000",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSW",
|
||||
"size" : 16,
|
||||
"encoding": "0b1100000000000000",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CADDI",
|
||||
"size" : 16,
|
||||
"encoding": "0b0000000000000001",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CNOP",
|
||||
"size" : 16,
|
||||
"encoding": "0b0000000000000001",
|
||||
"mask": "0b1110111110000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CJAL",
|
||||
"size" : 16,
|
||||
"encoding": "0b0010000000000001",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "CLI",
|
||||
"size" : 16,
|
||||
"encoding": "0b0100000000000001",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CLUI",
|
||||
"size" : 16,
|
||||
"encoding": "0b0110000000000001",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CADDI16SP",
|
||||
"size" : 16,
|
||||
"encoding": "0b0110000100000001",
|
||||
"mask": "0b1110111110000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "__reserved_clui",
|
||||
"size" : 16,
|
||||
"encoding": "0b0110000000000001",
|
||||
"mask": "0b1111000001111111",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRLI",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000000000000001",
|
||||
"mask": "0b1111110000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSRAI",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000010000000001",
|
||||
"mask": "0b1111110000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CANDI",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000100000000001",
|
||||
"mask": "0b1110110000000011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CSUB",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000110000000001",
|
||||
"mask": "0b1111110001100011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CXOR",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000110000100001",
|
||||
"mask": "0b1111110001100011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "COR",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000110001000001",
|
||||
"mask": "0b1111110001100011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CAND",
|
||||
"size" : 16,
|
||||
"encoding": "0b1000110001100001",
|
||||
"mask": "0b1111110001100011",
|
||||
"branch": false,
|
||||
"delay" : 1
|
||||
},
|
||||
{
|
||||
"name" : "CJ",
|
||||
"size" : 16,
|
||||
"encoding": "0b1010000000000001",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": true,
|
||||
"delay" : 2
|
||||
},
|
||||
{
|
||||
"name" : "CBEQZ",
|
||||
"size" : 16,
|
||||
"encoding": "0b1100000000000001",
|
||||
"mask": "0b1110000000000011",
|
||||
"branch": true,
|
||||