Compare commits
12 Commits
982e5e9a13
...
develop
Author | SHA1 | Date | |
---|---|---|---|
3dfe84edf5 | |||
715b8349d6 | |||
3688bbd170 | |||
871f346870 | |||
bee577fb9f | |||
438619e93f | |||
61d8d3c661 | |||
f122b0ae4e | |||
a6176232c5 | |||
25b1be719e | |||
722b015f82 | |||
8abf623c63 |
@@ -12,7 +12,7 @@
|
||||
</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.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<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"/>
|
||||
|
6
.envrc
6
.envrc
@@ -3,7 +3,11 @@ if [ $distro == "CentOS" ]; then
|
||||
. /opt/rh/devtoolset-8/enable
|
||||
. /opt/rh/llvm-toolset-7/enable
|
||||
. /opt/rh/rh-python38/enable
|
||||
elif [ $distro == "Rocky" ]; then
|
||||
. /opt/rh/gcc-toolset-11/enable
|
||||
fi
|
||||
if has module; then
|
||||
module load ./Modulefile
|
||||
fi
|
||||
module load ./Modulefile
|
||||
layout python3
|
||||
[ -f .envrc.$USER ] && . .envrc.$USER
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -19,5 +19,5 @@ CMakeSettings.json
|
||||
/src-gen/
|
||||
/*.json
|
||||
/cfg.yaml
|
||||
/.direnv
|
||||
/.cache
|
||||
/.direnv/
|
||||
/.envrc.eyck
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.mode" value="run"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="TGC-VP-GDBServer"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="TGC-VP-GDBServer (Firmware)"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.mode" value="debug"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.name" value="TGC-VP-FW-Debug"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.name" value="TGC-VP-FW-Debug (Firmware)"/>
|
||||
</launchConfiguration>
|
13
.launch/FW-Debug prebuild FW.launch
Normal file
13
.launch/FW-Debug prebuild FW.launch
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.debug.core.groups.GroupLaunchConfigurationType">
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.mode" value="inherit"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="TGC-VP-GDBServer prebuilt FW"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.mode" value="debug"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.name" value="TGC-VP-FW-Debug prebuild FW"/>
|
||||
</launchConfiguration>
|
13
.launch/FW-VP HW Debug GDB loading.launch
Normal file
13
.launch/FW-VP HW Debug GDB loading.launch
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.debug.core.groups.GroupLaunchConfigurationType">
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.mode" value="inherit"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="TGC-VP-GDBServer wo FW"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.mode" value="debug"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.name" value="FW Debug HW GDB loading (Firmware)"/>
|
||||
</launchConfiguration>
|
13
.launch/FW-VP HW Debug preloaded.launch
Normal file
13
.launch/FW-VP HW Debug preloaded.launch
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.debug.core.groups.GroupLaunchConfigurationType">
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.0.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.mode" value="inherit"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.0.name" value="TGC-VP-GDBServer (Firmware)"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.action" value="NONE"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.adoptIfRunning" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.launchGroup.1.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.mode" value="debug"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.launchGroup.1.name" value="FW Debug HW GDB (Firmware)"/>
|
||||
</launchConfiguration>
|
@@ -18,7 +18,7 @@
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/hello -p ${workspace_loc:TGC-VP}/build/${config_name:TGC-VP}/tgc-iss/dbt-rise-plugins/pctrace/pctrace.so=tgc-iss/dbt-rise-tgc/contrib/instr/TGC5C_instr.yaml --backend=asmjit"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/prebuilt/hello.elf -p ${workspace_loc:TGC-VP}/build/${config_name:TGC-VP}/tgc-iss/dbt-rise-plugins/pctrace/pctrace.so=tgc-iss/dbt-rise-tgc/contrib/instr/TGC5C_instr.yaml --backend=asmjit"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/${config_name:TGC-VP}/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
|
35
.launch/TGC-VP interp hello (Firmware).launch
Normal file
35
.launch/TGC-VP interp hello (Firmware).launch
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE_MODE" value="UseSoftTrace"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="1"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f build/riscvfw-src/hello-world/hello.elf --dump-structure=tgc_vp.json --config cfg.yaml -t 3"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/${config_name:TGC-VP}/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"/>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE_MODE" value="UseSoftTrace"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="1"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f build/riscvfw-src/hello-world/hello.elf -p ce=tgc-iss/dbt-rise-tgc/contrib/instr/TGC5C_slow.yaml --dump-structure=tgc_vp.json --config cfg.yaml -t 3"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/${config_name:TGC-VP}/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"/>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
@@ -18,11 +18,11 @@
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/hello --dump-structure=tgc_vp.json --config cfg.yaml -t 3"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/prebuilt/hello.elf --dump-structure=tgc_vp.json --config cfg.yaml -t 3"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/${config_name:TGC-VP}/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.base.1730410661.719145049"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.remoteApplicationLaunchType">
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="/usr/local/bin/riscv32-unknown-elf-gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="riscv64-unknown-elf-gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEV" value="/dev/ttyS0"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEV_SPEED" value="115200"/>
|
||||
@@ -25,10 +25,10 @@
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="fw/hello-world/hello"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="fw/hello-world/prebuilt/hello.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.base.1730410661.719145049"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.remote.RemoteCDSFDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_COMMAND" value="gdbserver"/>
|
||||
@@ -36,7 +36,7 @@
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_PORT" value="2345"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_PRERUN_CMDS" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_SKIP_DOWNLOAD_TO_TARGET" value="false"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_TARGET_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_TARGET_PATH" value="/scratch/eyck/workarea/RISC-V/TGC-VP/fw/hello-world/prebuilt/hello.elf"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
52
.launch/TGC-VP-FW-Debug (Firmware).launch
Normal file
52
.launch/TGC-VP-FW-Debug (Firmware).launch
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.remoteApplicationLaunchType">
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="riscv64-unknown-elf-gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEV" value="/dev/ttyS0"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEV_SPEED" value="115200"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.HOST" value="localhost"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.PORT" value="10000"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REMOTE_TCP" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REMOTE_TIMEOUT_ENABLED" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.REMOTE_TIMEOUT_VALUE" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE_MODE" value="UseSoftTrace"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.RemoteApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdbserver"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/riscvfw-src/hello-world/hello.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.remote.RemoteCDSFDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_COMMAND" value="gdbserver"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_OPTIONS" value=""/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_PORT" value="2345"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_PRERUN_CMDS" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_SKIP_DOWNLOAD_TO_TARGET" value="false"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_TARGET_PATH" value="/scratch/eyck/workarea/RISC-V/TGC-VP/build/riscvfw-src/hello-world/hello.elf"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.debug.core.REMOTE_TCP" value="Local"/>
|
||||
<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
|
||||
<mapEntry key="[debug]" value="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"/>
|
||||
</mapAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"/>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
35
.launch/TGC-VP-GDBServer (Firmware).launch
Normal file
35
.launch/TGC-VP-GDBServer (Firmware).launch
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE_MODE" value="UseSoftTrace"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="1"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f build/riscvfw-src/hello-world/hello.elf -g 10000 -v INFO"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/Debug/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.base.1730410661"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"/>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
@@ -17,12 +17,13 @@
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/hello -g 10000"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/prebuilt/hello.elf -g 10000"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/Debug/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.base.1730410661"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
35
.launch/TGC-VP-GDBServer wo FW.launch
Normal file
35
.launch/TGC-VP-GDBServer wo FW.launch
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE_MODE" value="UseSoftTrace"/>
|
||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="1"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-g 10000 -v DEBUG"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/Debug/src/tgc-vp"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.base.1730410661"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/TGC-VP"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"/>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
10
.vscode/extensions.json
vendored
Normal file
10
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"eclipse-cdt.cdt-gdb-vscode",
|
||||
"eclipse-cdt.memory-inspector",
|
||||
"eclipse-cdt.peripheral-inspector",
|
||||
|
||||
]
|
||||
}
|
28
.vscode/launch.json
vendored
28
.vscode/launch.json
vendored
@@ -5,16 +5,18 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "gdb",
|
||||
"type": "gdbtarget",
|
||||
"request": "attach",
|
||||
"name": "Attach-to-gdbserver",
|
||||
"executable": "./fw/hello-world/hello",
|
||||
"target": ":10000",
|
||||
"remote": true,
|
||||
"program": "fw/hello-world/prebuilt/hello.elf",
|
||||
"imageAndSymbols": {
|
||||
"symbolFileName": "fw/hello-world/prebuilt/hello.elf"
|
||||
},
|
||||
"target": {
|
||||
"port": "10000"
|
||||
},
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "prettyPrinters",
|
||||
"gdbpath": "/opt/riscv/bin/riscv32-unknown-elf-gdb",
|
||||
"debugger_args": [],
|
||||
"gdb": "riscv64-unknown-elf-gdb",
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
"group": "FW Debug",
|
||||
@@ -26,9 +28,8 @@
|
||||
"request": "launch",
|
||||
"name": "Launch-VP-with-gdbserver",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "parseText",
|
||||
"target": "./build/src/tgc-vp",
|
||||
"arguments": "-f fw/hello-world/hello -g 10000",
|
||||
"program": "${workspaceFolder}/build/Debug/src/tgc-vp",
|
||||
"arguments": "-f fw/hello-world/prebuilt/hello.elf -g 10000",
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
"group": "FW Debug",
|
||||
@@ -40,10 +41,9 @@
|
||||
"request": "launch",
|
||||
"name": "VP-Debug",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"valuesFormatting": "parseText",
|
||||
"target": "./build/src/tgc-vp",
|
||||
"printCalls": false,
|
||||
"arguments": "-f fw/hello-world/hello"
|
||||
"program": "${workspaceFolder}/build/Debug/src/tgc-vp",
|
||||
"arguments": "-f fw/hello-world/prebuilt/hello.elf",
|
||||
"openGdbConsole": true
|
||||
},
|
||||
],
|
||||
"compounds": [
|
||||
|
19
.vscode/settings.json
vendored
19
.vscode/settings.json
vendored
@@ -2,5 +2,20 @@
|
||||
"files.associations": {
|
||||
"platform.h": "c"
|
||||
},
|
||||
"debug.allowBreakpointsEverywhere": true
|
||||
}
|
||||
"debug.allowBreakpointsEverywhere": true,
|
||||
"chat.sendElementsToChat.attachCSS": false,
|
||||
"chat.sendElementsToChat.attachImages": false,
|
||||
"chat.sendElementsToChat.enabled": false,
|
||||
"editor.rulers": [
|
||||
{
|
||||
"column": 140,
|
||||
"comment": "clang-format"
|
||||
}
|
||||
],
|
||||
"clangd.arguments": [
|
||||
"--pretty",
|
||||
"--background-index",
|
||||
"--compile-commands-dir=${workspaceFolder}/build"
|
||||
],
|
||||
"cmake.copyCompileCommands": "${workspaceFolder}/build/compile_commands.json"
|
||||
}
|
||||
|
106
CMakeLists.txt
106
CMakeLists.txt
@@ -16,7 +16,6 @@ option(WITH_LLVM "Build LLVM backend" OFF)
|
||||
option(WITH_ASMJIT "Build ASMJIT backend" ON)
|
||||
|
||||
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)
|
||||
@@ -34,121 +33,22 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
add_compile_options(/vmg /wd26812) # suppress Warnung C26812: "enum class" gegenüber "enum" (Enum.3) bevorzugen
|
||||
endif()
|
||||
|
||||
include(ConanInline)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(SHARED_FLAG "True")
|
||||
else()
|
||||
set(SHARED_FLAG "False")
|
||||
endif()
|
||||
|
||||
set(CONAN_BOOST_OPTIONS
|
||||
boost:fPIC=True
|
||||
boost:shared=${SHARED_FLAG}
|
||||
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
|
||||
)
|
||||
|
||||
set(CONAN_PACKAGE_LIST
|
||||
fmt/8.0.1
|
||||
spdlog/1.9.2
|
||||
boost/1.75.0
|
||||
gsl-lite/0.37.0
|
||||
elfio/3.8
|
||||
lz4/1.9.3
|
||||
yaml-cpp/0.7.0
|
||||
jsoncpp/1.9.5
|
||||
zlib/1.2.13
|
||||
)
|
||||
set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS})
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND WITH_TCC)
|
||||
list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4)
|
||||
if(WITH_TCC)
|
||||
list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27)
|
||||
endif()
|
||||
list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False )
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0)
|
||||
list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=False)
|
||||
endif()
|
||||
if(WITH_ASMJIT)
|
||||
list(APPEND CONAN_PACKAGE_LIST asmjit/cci.20230325)
|
||||
list(APPEND CONAN_PACKAGE_OPTIONS asmjit:shared=False)
|
||||
endif()
|
||||
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tgc-iss/dbt-rise-plugins)
|
||||
list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False)
|
||||
list(APPEND CONAN_PACKAGE_LIST lua/5.4.3)
|
||||
endif()
|
||||
|
||||
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=${SHARED_FLAG}
|
||||
systemc-cci:shared=${SHARED_FLAG}
|
||||
systemc:disable_virtual_bind=False)
|
||||
endif()
|
||||
|
||||
conan_check()
|
||||
conan_add_remote(NAME minres URL https://git.minres.com/api/packages/Tooling/conan)
|
||||
# Boost on CentOS 7 quirks: the b2 of conan-center is build against a newer libstdc++ and therefore does not run
|
||||
# with the oooooold libs on CentOS 7. Therefore we build our own version of b2 if it is not there
|
||||
execute_process(COMMAND bash -c "conan search -r all b2 | tail -1" OUTPUT_VARIABLE B2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(B2_META $ENV{HOME}/.conan/data/${B2_VERSION}/_/_/metadata.json)
|
||||
if(DEFINED ENV{CONAN_USER_HOME})
|
||||
set(B2_META $ENV{CONAN_USER_HOME}/.conan/data/${B2_VERSION}/_/_/metadata.json)
|
||||
endif()
|
||||
if(NOT EXISTS ${B2_META})
|
||||
conan_configure(REQUIRES ${B2_VERSION})
|
||||
conan_cmake_autodetect(settings)
|
||||
conan_cmake_install(PATH_OR_REFERENCE . BUILD b2 SETTINGS ${settings})
|
||||
endif()
|
||||
# Boost on CentOS 7 quirks end
|
||||
conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST}
|
||||
GENERATORS cmake_find_package
|
||||
OPTIONS ${CONAN_PACKAGE_OPTIONS}
|
||||
)
|
||||
conan_cmake_autodetect(settings)
|
||||
conan_install()
|
||||
|
||||
set(CONAN_CMAKE_SILENT_OUTPUT ON)
|
||||
find_package(tcc QUIET)
|
||||
find_package(elfio)
|
||||
find_package(fmt)
|
||||
find_package(spdlog)
|
||||
find_package(gsl-lite)
|
||||
find_package(yaml-cpp)
|
||||
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
|
||||
find_package(Boost REQUIRED COMPONENTS program_options QUIET)
|
||||
include(SystemCPackage)
|
||||
|
||||
set(CLANG_FORMAT_EXCLUDE_PATTERNS "scc")
|
||||
set(CLANG_FORMAT_EXCLUDE_PATTERNS scc build .direnv)
|
||||
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/*")
|
||||
set(COVERAGE_EXCLUDES "${tgfs_verif_SOURCE_DIR}/scc/*" "${tgfs_verif_SOURCE_DIR}/build/*" "$ENV{HOME}/.conan2/*" "/opt/*")
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANGTIDY)
|
||||
@@ -195,7 +95,7 @@ if(FW_BUILD)
|
||||
if(NOT riscvfw_POPULATED)
|
||||
FetchContent_Populate(riscvfw)
|
||||
endif()
|
||||
set(BOARD tgc-vp)
|
||||
set(BOARD tgc_vp)
|
||||
add_subdirectory(${riscvfw_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
|
@@ -14,4 +14,5 @@ if { $distro == "CentOS" && ![info exists ::env(PROJECT)] && :
|
||||
|
||||
```
|
||||
|
||||
pip3 install --user conan
|
||||
|
||||
pip3 install --user 'conan<2.0'
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
cmake -S . -B build
|
||||
cmake --build build -j tgc-vp
|
||||
```
|
||||
|
||||
* run the VP with pre-built firmware
|
||||
|
||||
```
|
||||
|
||||
ctest
|
||||
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
|
||||
src/tgc-vp -f ../fw/hello-world/prebuild/hello.elf
|
||||
|
||||
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.
|
||||
@@ -107,8 +83,6 @@ 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))
|
||||
|
||||
@@ -117,9 +91,7 @@ You need to have to following installed:
|
||||
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.
|
||||
|
63
conanfile.py
Normal file
63
conanfile.py
Normal file
@@ -0,0 +1,63 @@
|
||||
import os
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import cmake_layout
|
||||
|
||||
|
||||
class Pkg(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = (
|
||||
"CMakeDeps",
|
||||
"CMakeToolchain",
|
||||
)
|
||||
default_options = {
|
||||
"llvm-core/*:targets": "X86",
|
||||
"boost/*:fPIC": "True",
|
||||
"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",
|
||||
"systemc/*:shared": "True",
|
||||
"lua/*:compile_as_cpp": "False",
|
||||
"asmjit/*:shared": "False"
|
||||
}
|
||||
|
||||
def requirements(self):
|
||||
self.requires("systemc/2.3.4")
|
||||
self.requires("fmt/8.0.1")
|
||||
self.requires("spdlog/1.9.2")
|
||||
self.requires("boost/1.85.0")
|
||||
self.requires("abseil/20250127.0")
|
||||
self.requires("elfio/3.12")
|
||||
self.requires("lz4/1.9.3")
|
||||
self.requires("yaml-cpp/0.8.0")
|
||||
self.requires("jsoncpp/1.9.5")
|
||||
self.requires("zlib/1.2.12")
|
||||
self.requires("seasocks/1.4.4")
|
||||
self.requires("asmjit/cci.20240531")
|
||||
if "WITH_LLVM" in os.environ:
|
||||
self.requires("llvm-core/19.1.7")
|
||||
if os.path.isdir("dbt-rise-plugins"):
|
||||
self.requires("lua/5.4.3")
|
||||
|
||||
def build_requirements(self):
|
||||
pass
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
1
fw/bsp
1
fw/bsp
Submodule fw/bsp deleted from 71c7fd6981
@@ -1 +1,3 @@
|
||||
conan<2.0
|
||||
conan
|
||||
cmake
|
||||
clang-format
|
2
scc
2
scc
Submodule scc updated: aa3769fd5b...374d481d71
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "CLIParser.h"
|
||||
#include <scc/report.h>
|
||||
#include <iostream>
|
||||
#include <iss/log_categories.h>
|
||||
#include <scc/report.h>
|
||||
@@ -20,31 +19,34 @@ using namespace sc_core;
|
||||
namespace {
|
||||
std::unordered_set<std::string> backend_opts = {"interp", "tcc", "llvm", "asmjit"};
|
||||
}
|
||||
CLIParser::CLIParser(int argc, char *argv[])
|
||||
CLIParser::CLIParser(int argc, char* argv[])
|
||||
: desc("Options")
|
||||
, valid(false) {
|
||||
build();
|
||||
try {
|
||||
po::store(po::parse_command_line(argc, argv, desc), vm_); // can throw
|
||||
// --help option
|
||||
if (vm_.count("help")) {
|
||||
if(vm_.count("help")) {
|
||||
std::cout << "DBT-RISE-TGC based virtual platform of TGC cores" << std::endl << desc << std::endl;
|
||||
}
|
||||
po::notify(vm_); // throws on error, so do after help in case there are any problems
|
||||
valid = true;
|
||||
if(backend_opts.find(vm_["backend"].as<std::string>())== std::end(backend_opts))
|
||||
if(backend_opts.find(vm_["backend"].as<std::string>()) == std::end(backend_opts))
|
||||
throw po::error("Illegal value for switch backend");
|
||||
} catch (po::error &e) {
|
||||
} catch(po::error& e) {
|
||||
std::cerr << "ERROR: " << e.what() << std::endl << std::endl;
|
||||
std::cerr << desc << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
auto log_level = vm_["verbose"].as<scc::log>();
|
||||
auto log_level_num = static_cast<unsigned>(log_level);
|
||||
LOGGER(DEFAULT)::reporting_level() = logging::as_log_level(log_level_num > 6 ? 6 : log_level_num);;
|
||||
LOGGER(DEFAULT)::reporting_level() = logging::as_log_level(log_level_num > 6 ? 6 : log_level_num);
|
||||
;
|
||||
LOGGER(DEFAULT)::print_time() = false;
|
||||
LOG_OUTPUT(DEFAULT)::ostream() = &std::cout;
|
||||
LOGGER(connection)::reporting_level() = logging::as_log_level(log_level_num > 4 ? log_level_num-1 : log_level_num);;
|
||||
LOGGER(connection)::reporting_level() =
|
||||
logging::as_log_level(log_level_num > 4 ? log_level_num - 1 : log_level_num);
|
||||
;
|
||||
LOGGER(connection)::print_time() = false;
|
||||
LOG_OUTPUT(connection)::ostream() = &std::cout;
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -55,11 +57,10 @@ CLIParser::CLIParser(int argc, char *argv[])
|
||||
.logLevel(vm_["verbose"].as<scc::log>())
|
||||
.logFilterRegex(vm_["log-filter"].as<std::string>())
|
||||
.logAsync(!vm_["log-sync"].as<bool>()));
|
||||
scc::stream_redirection cout_redir(std::cout, scc::log::DEBUG);
|
||||
scc::stream_redirection cerr_redir(std::cerr, scc::log::ERROR);
|
||||
sc_core::sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", sc_core::SC_DO_NOTHING);
|
||||
sc_core::sc_report_handler::set_actions(sc_core::SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, sc_core::SC_DO_NOTHING);
|
||||
sc_core::sc_report_handler::set_actions(sc_core::SC_ERROR, sc_core::SC_LOG | sc_core::SC_CACHE_REPORT | sc_core::SC_DISPLAY | sc_core::SC_STOP);
|
||||
sc_core::sc_report_handler::set_actions(sc_core::SC_ERROR, sc_core::SC_LOG | sc_core::SC_CACHE_REPORT |
|
||||
sc_core::SC_DISPLAY | sc_core::SC_STOP);
|
||||
}
|
||||
|
||||
void CLIParser::build() {
|
||||
|
@@ -8,22 +8,22 @@
|
||||
#define PLATFORM_SRC_CLIPARSER_H_
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
#include <scc/report.h>
|
||||
#include <memory>
|
||||
#include <scc/report.h>
|
||||
|
||||
class CLIParser {
|
||||
public:
|
||||
CLIParser(int argc, char *argv[]);
|
||||
CLIParser(int argc, char* argv[]);
|
||||
|
||||
virtual ~CLIParser();
|
||||
|
||||
bool is_valid() { return valid; }
|
||||
|
||||
const boost::program_options::variables_map &vm() { return vm_; }
|
||||
const boost::program_options::variables_map& vm() { return vm_; }
|
||||
|
||||
bool is_set(const char *option) { return vm_.count(option) != 0; }
|
||||
bool is_set(const char* option) { return vm_.count(option) != 0; }
|
||||
|
||||
template <typename T> const T &get(const char *option) { return vm_[option].as<T>(); }
|
||||
template <typename T> const T& get(const char* option) { return vm_[option].as<T>(); }
|
||||
|
||||
private:
|
||||
void build();
|
||||
|
@@ -10,19 +10,18 @@
|
||||
#include <scc/configurable_tracer.h>
|
||||
#include <scc/configurer.h>
|
||||
#include <scc/hierarchy_dumper.h>
|
||||
#include <scc/perf_estimator.h>
|
||||
#include <scc/report.h>
|
||||
#include <scc/scv/scv_tr_db.h>
|
||||
#include <scc/tracer.h>
|
||||
#include <scc/perf_estimator.h>
|
||||
#ifdef WITH_LLVM
|
||||
#include <iss/llvm/jit_helper.h>
|
||||
#endif
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
#include <tgc_vp/tb.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <tgc_vp/tb.h>
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
@@ -31,14 +30,13 @@ const std::string core_path{"tb.top.core_complex"};
|
||||
|
||||
using namespace sysc;
|
||||
using namespace sc_core;
|
||||
namespace po = boost::program_options;
|
||||
|
||||
namespace {
|
||||
const size_t ERRORR_IN_COMMAND_LINE = 1;
|
||||
const size_t SUCCESS = 0;
|
||||
} // namespace
|
||||
|
||||
int sc_main(int argc, char *argv[]) {
|
||||
int sc_main(int argc, char* argv[]) {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// SystemC >=2.2 got picky about multiple drivers so disable check
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -47,7 +45,8 @@ int sc_main(int argc, char *argv[]) {
|
||||
// CLI argument parsing & logging setup
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
CLIParser parser(argc, argv);
|
||||
if (!parser.is_valid()) return ERRORR_IN_COMMAND_LINE;
|
||||
if(!parser.is_valid())
|
||||
return ERRORR_IN_COMMAND_LINE;
|
||||
scc::stream_redirection cout_redir(std::cout, scc::log::INFO);
|
||||
scc::stream_redirection cerr_redir(std::cerr, scc::log::ERROR);
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -69,14 +68,15 @@ int sc_main(int argc, char *argv[]) {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::unique_ptr<scc::configurable_tracer> tracer;
|
||||
if( auto trace_level = parser.get<unsigned>("trace-level")) {
|
||||
if(auto trace_level = parser.get<unsigned>("trace-level")) {
|
||||
auto file_name = parser.get<std::string>("trace-file");
|
||||
auto enable_sig_trace = (trace_level&0x1) != 0;// bit0 enables sig trace
|
||||
auto tx_trace_type = static_cast<scc::tracer::file_type>(trace_level >> 1); // bit3-bit1 define the kind of transaction trace
|
||||
auto enable_sig_trace = (trace_level & 0x1) != 0; // bit0 enables sig trace
|
||||
auto tx_trace_type =
|
||||
static_cast<scc::tracer::file_type>(trace_level >> 1); // bit3-bit1 define the kind of transaction trace
|
||||
auto trace_default_on = parser.is_set("trace-default-on");
|
||||
cfg.set_value("$$$scc_tracer$$$.tx_trace_type", static_cast<unsigned>(scc::tracer::file_type::FTR));
|
||||
cfg.set_value("$$$scc_tracer$$$.sig_trace_type", static_cast<unsigned>(scc::tracer::file_type::SC_VCD));
|
||||
tracer = scc::make_unique<scc::configurable_tracer>(file_name, tx_trace_type, enable_sig_trace, trace_default_on);
|
||||
cfg.set_value("scc_tracer.tx_trace_type", static_cast<unsigned>(scc::tracer::file_type::FTR));
|
||||
cfg.set_value("scc_tracer.sig_trace_type", static_cast<unsigned>(scc::tracer::file_type::FST));
|
||||
tracer = scc::make_unique<scc::configurable_tracer>(file_name, tx_trace_type, enable_sig_trace);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// instantiate top level
|
||||
@@ -85,18 +85,21 @@ int sc_main(int argc, char *argv[]) {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// add non-implemented 'enableTracing' properties
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
if(tracer) tracer->add_control();
|
||||
if(tracer)
|
||||
tracer->add_control();
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// dump configuration if requested
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
if (parser.get<std::string>("dump-config").size() > 0) {
|
||||
if(parser.get<std::string>("dump-config").size() > 0) {
|
||||
std::ofstream of{parser.get<std::string>("dump-config")};
|
||||
if (of.is_open()) cfg.dump_configuration(of, true);
|
||||
if(of.is_open())
|
||||
cfg.dump_configuration(of, true);
|
||||
}
|
||||
cfg.configure();
|
||||
std::unique_ptr<scc::hierarchy_dumper> dumper;
|
||||
if(parser.is_set("dump-structure"))
|
||||
dumper.reset(new scc::hierarchy_dumper(parser.get<std::string>("dump-structure"), scc::hierarchy_dumper::D3JSON));
|
||||
dumper.reset(
|
||||
new scc::hierarchy_dumper(parser.get<std::string>("dump-structure"), scc::hierarchy_dumper::D3JSON));
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// overwrite config with command line settings
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -104,23 +107,25 @@ int sc_main(int argc, char *argv[]) {
|
||||
cfg.set_value(core_path + ".dump_ir", parser.is_set("dump-ir"));
|
||||
cfg.set_value(core_path + ".backend", parser.get<std::string>("backend"));
|
||||
cfg.set_value(core_path + ".core_type", parser.get<std::string>("isa"));
|
||||
if(parser.is_set("plugin")){
|
||||
auto plugins = util::join(parser.get<std::vector<std::string>>("plugin"),",");
|
||||
if(parser.is_set("plugin")) {
|
||||
auto plugins = util::join(parser.get<std::vector<std::string>>("plugin"), ",");
|
||||
cfg.set_value(core_path + ".plugins", plugins);
|
||||
}
|
||||
if (parser.is_set("elf")) cfg.set_value(core_path + ".elf_file", parser.get<std::string>("elf"));
|
||||
if (parser.is_set("quantum"))
|
||||
if(parser.is_set("elf"))
|
||||
cfg.set_value(core_path + ".elf_file", parser.get<std::string>("elf"));
|
||||
if(parser.is_set("quantum"))
|
||||
tlm::tlm_global_quantum::instance().set(sc_core::sc_time(parser.get<unsigned>("quantum"), sc_core::SC_NS));
|
||||
if (parser.is_set("reset")) {
|
||||
if(parser.is_set("reset")) {
|
||||
auto str = parser.get<std::string>("reset");
|
||||
uint64_t start_address = str.find("0x") == 0 ? std::stoull(str.substr(2), nullptr, 16) : std::stoull(str, nullptr, 10);
|
||||
uint64_t start_address =
|
||||
str.find("0x") == 0 ? std::stoull(str.substr(2), nullptr, 16) : std::stoull(str, nullptr, 10);
|
||||
cfg.set_value(core_path + ".reset_address", start_address);
|
||||
}
|
||||
if (parser.is_set("disass")) {
|
||||
if(parser.is_set("disass")) {
|
||||
cfg.set_value(core_path + ".enable_disass", true);
|
||||
LOGGER(disass)::reporting_level() = logging::INFO;
|
||||
auto file_name = parser.get<std::string>("disass");
|
||||
if (file_name.length() > 0) {
|
||||
if(file_name.length() > 0) {
|
||||
LOG_OUTPUT(disass)::stream() = fopen(file_name.c_str(), "w");
|
||||
LOGGER(disass)::print_time() = false;
|
||||
LOGGER(disass)::print_severity() = false;
|
||||
@@ -130,12 +135,13 @@ int sc_main(int argc, char *argv[]) {
|
||||
// run simulation
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
try {
|
||||
if (parser.is_set("max_time")) {
|
||||
if(parser.is_set("max_time")) {
|
||||
sc_core::sc_start(scc::parse_from_string(parser.get<std::string>("max_time")));
|
||||
} else
|
||||
sc_core::sc_start();
|
||||
if (!sc_core::sc_end_of_simulation_invoked()) sc_core::sc_stop();
|
||||
} catch (sc_core::sc_report &rep) {
|
||||
if(!sc_core::sc_end_of_simulation_invoked())
|
||||
sc_core::sc_stop();
|
||||
} catch(sc_core::sc_report& rep) {
|
||||
sc_core::sc_report_handler::get_handler()(rep, sc_core::SC_DISPLAY | sc_core::SC_STOP);
|
||||
}
|
||||
return 0;
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Generated at 2024-02-08 14:41:56 UTC
|
||||
* by peakrdl_mnrs version 1.2.2
|
||||
*/
|
||||
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Generated at 2024-02-08 14:41:56 UTC
|
||||
* by peakrdl_mnrs version 1.2.2
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// need double braces, see https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191
|
||||
const std::array<scc::target_memory_map_entry<scc::LT>, 6> PipelinedMemoryBusToApbBridge_map = {{
|
||||
{ gpio0.socket, 0x0, 0xc },
|
||||
{ uart0.socket, 0x1000, 0x14 },
|
||||
{ timer0.socket, 0x20000, 0x1c },
|
||||
{ aclint.socket, 0x30000, 0xc000 },
|
||||
{ irq_ctrl.socket, 0x40000, 0x8 },
|
||||
{ qspi.socket, 0x50000, 0x5c },
|
||||
//{ bootloader.socket, 0x80000, 0x400 },
|
||||
}} ;
|
||||
// need double braces, see
|
||||
// https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191
|
||||
const std::array<scc::target_memory_map_entry<scc::LT>, 7> PipelinedMemoryBusToApbBridge_map = {
|
||||
{{gpio0.socket, 0x0, 0xc},
|
||||
{uart0.socket, 0x1000, 0x14},
|
||||
{timer0.socket, 0x20000, 0x1c},
|
||||
{aclint.socket, 0x30000, 0xc000},
|
||||
{irq_ctrl.socket, 0x40000, 0x8},
|
||||
{qspi.socket, 0x50000, 0x5c},
|
||||
{boot_rom.target, 0x80000, 0x5c}}};
|
||||
|
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2019 -2021 MINRES Technolgies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _PLATFORM_MMAP_H_
|
||||
#define _PLATFORM_MMAP_H_
|
||||
// need double braces, see
|
||||
// https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191
|
||||
const std::array<scc::target_memory_map_entry<scc::LT>, 13> platfrom_mmap = {{
|
||||
{clint.socket, 0x2000000, 0xc000},
|
||||
{plic.socket, 0xc000000, 0x200008},
|
||||
{aon.socket, 0x10000000, 0x150},
|
||||
{prci.socket, 0x10008000, 0x14},
|
||||
{gpio0.socket, 0x10012000, 0x44},
|
||||
{uart0.socket, 0x10013000, 0x1c},
|
||||
{qspi0.socket, 0x10014000, 0x78},
|
||||
{pwm0.socket, 0x10015000, 0x30},
|
||||
{uart1.socket, 0x10023000, 0x1c},
|
||||
{qspi1.socket, 0x10024000, 0x78},
|
||||
{pwm1.socket, 0x10025000, 0x30},
|
||||
{qspi2.socket, 0x10034000, 0x78},
|
||||
{pwm2.socket, 0x10035000, 0x30},
|
||||
}};
|
||||
|
||||
#endif /* _PLATFORM_MMAP_H_ */
|
@@ -11,13 +11,13 @@ namespace tgc_vp {
|
||||
|
||||
class rst_gen : public sc_core::sc_module {
|
||||
SC_HAS_PROCESS(rst_gen);
|
||||
|
||||
public:
|
||||
rst_gen(sc_core::sc_module_name const& nm) {
|
||||
SC_THREAD(run);
|
||||
}
|
||||
rst_gen(sc_core::sc_module_name const& nm) { SC_THREAD(run); }
|
||||
sc_core::sc_out<bool> rst_n{"rst_n"};
|
||||
|
||||
private:
|
||||
void run(){
|
||||
void run() {
|
||||
rst_n.write(false);
|
||||
wait(100_ns);
|
||||
rst_n.write(true);
|
||||
|
@@ -17,19 +17,19 @@ using namespace sysc::tgfs;
|
||||
system::system(sc_core::sc_module_name nm)
|
||||
: sc_core::sc_module(nm)
|
||||
, NAMED(ahb_router, 3, 2)
|
||||
, NAMED(apbBridge, PipelinedMemoryBusToApbBridge_map.size(), 1){
|
||||
, NAMED(apbBridge, PipelinedMemoryBusToApbBridge_map.size(), 1) {
|
||||
core_complex.ibus(ahb_router.target[0]);
|
||||
core_complex.dbus(ahb_router.target[1]);
|
||||
|
||||
ahb_router.initiator.at(0)(qspi.xip_sck);
|
||||
ahb_router.set_target_range(0, 0xE0000000, 16_MB);
|
||||
ahb_router.initiator.at(1)(mem_ram.target);
|
||||
ahb_router.initiator.at(1)(main_ram.target);
|
||||
ahb_router.set_target_range(1, 0x80000000, 32_kB);
|
||||
ahb_router.initiator.at(2)(apbBridge.target[0]);
|
||||
ahb_router.set_target_range(2, 0xF0000000, 256_MB);
|
||||
|
||||
size_t i = 0;
|
||||
for (const auto &e : PipelinedMemoryBusToApbBridge_map) {
|
||||
for(const auto& e : PipelinedMemoryBusToApbBridge_map) {
|
||||
apbBridge.initiator.at(i)(e.target);
|
||||
apbBridge.set_target_range(i, e.start, e.size);
|
||||
i++;
|
||||
@@ -41,8 +41,9 @@ system::system(sc_core::sc_module_name nm)
|
||||
aclint.clk_i(clk_i);
|
||||
irq_ctrl.clk_i(clk_i);
|
||||
qspi.clk_i(clk_i);
|
||||
boot_rom.clk_i(clk_i);
|
||||
core_complex.clk_i(clk_i);
|
||||
//mem_ram.clk_i(clk_i);
|
||||
main_ram.clk_i(clk_i);
|
||||
|
||||
gpio0.rst_i(rst_s);
|
||||
uart0.rst_i(rst_s);
|
||||
@@ -77,19 +78,11 @@ system::system(sc_core::sc_module_name nm)
|
||||
timer0.clear_i(t0_clear_i);
|
||||
timer0.tick_i(t0_tick_i);
|
||||
|
||||
qspi.ssclk_o(ssclk_o);
|
||||
qspi.dq_o(dq_o);
|
||||
qspi.dq_i(dq_i);
|
||||
qspi.oe_o(dq_oe_o);
|
||||
qspi.spi_i(mspi0);
|
||||
|
||||
SC_METHOD(gen_reset);
|
||||
sensitive << erst_n;
|
||||
}
|
||||
void system::gen_reset(){
|
||||
if(erst_n.read())
|
||||
rst_s = 0;
|
||||
else rst_s = 1;
|
||||
}
|
||||
void system::gen_reset() { rst_s = !erst_n.read(); }
|
||||
|
||||
|
||||
} /* namespace sysc */
|
||||
} // namespace tgc_vp
|
||||
|
@@ -9,42 +9,39 @@
|
||||
|
||||
#include "minres/irq.h"
|
||||
#include "minres/timer.h"
|
||||
#include <array>
|
||||
#include <cci_configuration>
|
||||
#include <memory>
|
||||
#include <minres/aclint.h>
|
||||
#include <minres/gpio.h>
|
||||
#include <minres/qspi.h>
|
||||
#include <sysc/communication/sc_clock.h>
|
||||
#include <sysc/communication/sc_signal_ports.h>
|
||||
#include <sysc/core_complex.h>
|
||||
#include <minres/uart.h>
|
||||
#include <cci_configuration>
|
||||
#include <scc/memory.h>
|
||||
#include <scc/router.h>
|
||||
#include <scc/utilities.h>
|
||||
#include <sysc/communication/sc_clock.h>
|
||||
#include <sysc/communication/sc_signal_ports.h>
|
||||
#include <sysc/core_complex.h>
|
||||
#include <sysc/kernel/sc_module.h>
|
||||
#include <sysc/kernel/sc_time.h>
|
||||
#include <sysc/utils/sc_vector.h>
|
||||
#include <tlm/scc/tlm_signal_sockets.h>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <sysc/kernel/sc_module.h>
|
||||
|
||||
namespace tgc_vp {
|
||||
|
||||
class system : public sc_core::sc_module {
|
||||
public:
|
||||
SC_HAS_PROCESS(system);// NOLINT
|
||||
SC_HAS_PROCESS(system); // NOLINT
|
||||
|
||||
sc_core::sc_vector<sc_core::sc_out<bool>> pins_o{"pins_o",32};
|
||||
sc_core::sc_vector<sc_core::sc_out<bool>> pins_o{"pins_o", 32};
|
||||
sc_core::sc_vector<sc_core::sc_out<bool>> pins_oe_o{"pins_oe_o", 32};
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> pins_i{"pins_i", 32};
|
||||
sc_core::sc_out<bool> uart0_tx_o {"uart0_tx_o"};
|
||||
sc_core::sc_in<bool> uart0_rx_i {"uart0_rx_i"};
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> t0_clear_i {"t0_clear_i", vpvper::minres::timer::CLEAR_CNT};
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> t0_tick_i {"t0_tick_i", vpvper::minres::timer::TICK_CNT-1};
|
||||
sc_core::sc_out<bool> ssclk_o{"ssclk_o"};
|
||||
sc_core::sc_vector<sc_core::sc_out<bool>> dq_o{"dq_o", 4};
|
||||
sc_core::sc_vector<sc_core::sc_out<bool>> dq_oe_o{"dq_oe_o", 4};
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> dq_i{"dq_i", 4};
|
||||
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> pins_i{"pins_i", 32};
|
||||
sc_core::sc_out<bool> uart0_tx_o{"uart0_tx_o"};
|
||||
sc_core::sc_in<bool> uart0_rx_i{"uart0_rx_i"};
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> t0_clear_i{"t0_clear_i", vpvper::minres::timer::CLEAR_CNT};
|
||||
sc_core::sc_vector<sc_core::sc_in<bool>> t0_tick_i{"t0_tick_i", vpvper::minres::timer::TICK_CNT - 1};
|
||||
spi::spi_pkt_initiator_socket<> mspi0{"mspi0"};
|
||||
|
||||
sc_core::sc_in<sc_core::sc_time> clk_i{"clk_i"};
|
||||
|
||||
sc_core::sc_in<bool> erst_n{"erst_n"};
|
||||
@@ -52,7 +49,7 @@ public:
|
||||
system(sc_core::sc_module_name nm);
|
||||
|
||||
private:
|
||||
sysc::tgfs::core_complex core_complex{"core_complex"};
|
||||
sysc::tgfs::core_complex<> core_complex{"core_complex"};
|
||||
scc::router<> ahb_router, apbBridge;
|
||||
vpvper::minres::gpio_tl gpio0{"gpio0"};
|
||||
vpvper::minres::uart_tl uart0{"uart0"};
|
||||
@@ -61,18 +58,20 @@ private:
|
||||
vpvper::minres::irq_tl irq_ctrl{"irq_ctrl"};
|
||||
vpvper::minres::qspi_tl qspi{"qspi"};
|
||||
|
||||
//scc::memory<1_kB, scc::LT> bootloader{"bootloader"};
|
||||
scc::memory<32_kB, scc::LT> mem_ram {"mem_ram"};
|
||||
|
||||
sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS> rst_s{"rst_s"}, mtime_int_s{"mtime_int_s"}, msip_int_s{"msip_int_s"};
|
||||
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS>> irq_int_s{"irq_int_s", 32}, local_int_s{"local_int_s", 16};
|
||||
scc::memory_tl<1_kB, scc::LT> boot_rom{"boot_rom"};
|
||||
scc::memory_tl<32_kB, scc::LT> main_ram{"main_ram"};
|
||||
|
||||
sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS> rst_s{"rst_s"}, mtime_int_s{"mtime_int_s"},
|
||||
msip_int_s{"msip_int_s"};
|
||||
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS>> irq_int_s{"irq_int_s", 32},
|
||||
local_int_s{"local_int_s", 16};
|
||||
sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS> core_int_s{"core_int_s"};
|
||||
|
||||
|
||||
void gen_reset();
|
||||
#include "tgc_vp/gen/PipelinedMemoryBusToApbBridge.h"
|
||||
};
|
||||
|
||||
} /* namespace sysc */
|
||||
} // namespace tgc_vp
|
||||
|
||||
#endif /* _PLATFORM_H_ */
|
||||
|
@@ -9,7 +9,9 @@
|
||||
namespace tgc_vp {
|
||||
|
||||
SC_HAS_PROCESS(tb);
|
||||
tb::tb(const sc_core::sc_module_name &nm): sc_core::sc_module(nm) {
|
||||
tb::tb(const sc_core::sc_module_name& nm)
|
||||
: sc_core::sc_module(nm) {
|
||||
top.clk_i(clk_i);
|
||||
top.erst_n(rst_n);
|
||||
rst_gen.rst_n(rst_n);
|
||||
top.pins_o(pins_o);
|
||||
@@ -19,11 +21,9 @@ tb::tb(const sc_core::sc_module_name &nm): sc_core::sc_module(nm) {
|
||||
top.uart0_tx_o(uart0_tx_o);
|
||||
top.t0_clear_i(t0_clear_i);
|
||||
top.t0_tick_i(t0_tick_i);
|
||||
top.ssclk_o(ssclk_o);
|
||||
top.dq_o(dq_o);
|
||||
top.dq_i(dq_i);
|
||||
top.dq_oe_o(dq_oe_o);
|
||||
top.clk_i(clk_i);
|
||||
top.mspi0(spi());
|
||||
spi(0)(qspi_mem.spi_t);
|
||||
|
||||
clk_i = 10_ns;
|
||||
}
|
||||
}
|
||||
} // namespace tgc_vp
|
||||
|
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "tgc_vp/rst_gen.h"
|
||||
#include "tgc_vp/system.h"
|
||||
#include <generic/spi_mem.h>
|
||||
|
||||
namespace tgc_vp {
|
||||
|
||||
class tb : public sc_core::sc_module {
|
||||
@@ -19,19 +21,17 @@ public:
|
||||
tb(sc_core::sc_module_name const& nm);
|
||||
tgc_vp::system top{"top"};
|
||||
tgc_vp::rst_gen rst_gen{"rst_gen"};
|
||||
sc_core::sc_signal<bool> rst_n{"rst_n"};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> pins_o{"pins_o",32};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> pins_oe_o{"pins_oe_o", 32};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> pins_i{"pins_i", 32};
|
||||
sc_core::sc_signal<bool> uart0_tx_o {"uart0_tx_o"};
|
||||
sc_core::sc_signal<bool> uart0_rx_i {"uart0_rx_i"};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> t0_clear_i {"t0_clear_i", vpvper::minres::timer::CLEAR_CNT};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> t0_tick_i {"t0_tick_i", vpvper::minres::timer::TICK_CNT-1};
|
||||
sc_core::sc_signal<bool> ssclk_o{"ssclk_o"};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> dq_o{"dq_o", 4};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> dq_oe_o{"dq_oe_o", 4};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> dq_i{"dq_i", 4};
|
||||
sc_core::sc_signal<sc_core::sc_time> clk_i{"clk_i"};
|
||||
sc_core::sc_signal<bool> rst_n{"rst_n"};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> pins_o{"pins_o", 32};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> pins_oe_o{"pins_oe_o", 32};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> pins_i{"pins_i", 32};
|
||||
sc_core::sc_signal<bool> uart0_tx_o{"uart0_tx_o"};
|
||||
sc_core::sc_signal<bool> uart0_rx_i{"uart0_rx_i"};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> t0_clear_i{"t0_clear_i", vpvper::minres::timer::CLEAR_CNT};
|
||||
sc_core::sc_vector<sc_core::sc_signal<bool>> t0_tick_i{"t0_tick_i", vpvper::minres::timer::TICK_CNT - 1};
|
||||
spi::spi_channel spi{"spi", 1};
|
||||
vpvper::generic::spi_mem qspi_mem{"qspi_mem"};
|
||||
};
|
||||
|
||||
} /* namespace tgc_vp */
|
||||
|
Submodule tgc-iss/dbt-rise-core updated: 039aad4693...b0fd6762be
Submodule tgc-iss/dbt-rise-tgc updated: f4f90c5e65...6f08f4010c
2
vpvper
2
vpvper
Submodule vpvper updated: 899316db7e...77b5ffa40d
Reference in New Issue
Block a user