Browse Source

Initial commit

Eyck Jentzsch 2 years ago
commit
4ee7118b70

+ 546
- 0
.cproject View File

@@ -0,0 +1,546 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
3
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
4
+		<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.119132886">
5
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.119132886" moduleId="org.eclipse.cdt.core.settings" name="Debug">
6
+				<macros>
7
+					<stringMacro name="LLVM_HOME" type="VALUE_TEXT" value="/usr/local"/>
8
+				</macros>
9
+				<externalSettings/>
10
+				<extensions>
11
+					<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
12
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
13
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
14
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
15
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
16
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
17
+				</extensions>
18
+			</storageModule>
19
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
20
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.119132886" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
21
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.119132886." name="/" resourcePath="">
22
+						<toolChain id="cdt.managedbuild.toolchain.gnu.base.575871658" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
23
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.563736074" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
24
+							<builder buildPath="${workspace_loc:/dbt-riscv}/build" id="cdt.managedbuild.target.gnu.builder.base.30687851" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="false" superClass="cdt.managedbuild.target.gnu.builder.base"/>
25
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1385126768" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
26
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1087323960" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
27
+								<option id="gnu.cpp.compiler.option.optimization.level.1489407891" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
28
+								<option id="gnu.cpp.compiler.option.debugging.level.1161461100" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
29
+								<option id="gnu.cpp.compiler.option.dialect.std.689478602" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
30
+								<option id="gnu.cpp.compiler.option.include.paths.842172839" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
31
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/include&quot;"/>
32
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
33
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/elfio}&quot;"/>
34
+									<listOptionValue builtIn="false" value="/usr/include/llvm-4.0"/>
35
+								</option>
36
+								<option id="gnu.cpp.compiler.option.preprocessor.def.625649396" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
37
+									<listOptionValue builtIn="false" value="WITH_SYSTEMC"/>
38
+									<listOptionValue builtIn="false" value="WITH_SCV"/>
39
+								</option>
40
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.839821702" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
41
+							</tool>
42
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.492144561" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
43
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.300036843" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
44
+								<option id="gnu.c.compiler.option.debugging.level.548531378" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
45
+								<option id="gnu.c.compiler.option.dialect.std.707011379" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
46
+								<option id="gnu.c.compiler.option.include.paths.154041334" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
47
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
48
+								</option>
49
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1379562984" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
50
+							</tool>
51
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.base.607720267" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
52
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.136592922" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
53
+								<option id="gnu.cpp.link.option.libs.42043660" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
54
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_thread"/>
55
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_system"/>
56
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_program_options"/>
57
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="ncurses"/>
58
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="dl"/>
59
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="z"/>
60
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pthread"/>
61
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="systemc"/>
62
+								</option>
63
+								<option id="gnu.cpp.link.option.paths.1519975976" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
64
+									<listOptionValue builtIn="false" value="&quot;${LLVM_HOME}/lib&quot;"/>
65
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/lib-linux64&quot;"/>
66
+								</option>
67
+								<option id="gnu.cpp.link.option.flags.873316384" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-rdynamic" valueType="string"/>
68
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.527331017" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
69
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
70
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
71
+								</inputType>
72
+							</tool>
73
+							<tool id="cdt.managedbuild.tool.gnu.assembler.base.1444789864" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
74
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.463921398" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
75
+							</tool>
76
+						</toolChain>
77
+					</folderInfo>
78
+					<sourceEntries>
79
+						<entry excluding="riscv/src-gen|sysc|blink.S|flash.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
80
+					</sourceEntries>
81
+				</configuration>
82
+			</storageModule>
83
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
84
+		</cconfiguration>
85
+		<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.446935686">
86
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.446935686" moduleId="org.eclipse.cdt.core.settings" name="Release">
87
+				<externalSettings/>
88
+				<extensions>
89
+					<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
90
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
91
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
92
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
93
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
94
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
95
+				</extensions>
96
+			</storageModule>
97
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
98
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.446935686" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
99
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.release.446935686." name="/" resourcePath="">
100
+						<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1854263325" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
101
+							<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1319340108" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
102
+							<builder buildPath="${workspace_loc:/dbt-riscv/build}" id="cdt.managedbuild.target.gnu.builder.exe.release.665052517" keepEnvironmentInBuildfile="true" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
103
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.434245429" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
104
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
105
+								<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1155577515" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
106
+								<option id="gnu.cpp.compiler.exe.release.option.debugging.level.435731460" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
107
+								<option id="gnu.cpp.compiler.option.include.paths.992972028" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
108
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/include&quot;"/>
109
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
110
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/elfio}&quot;"/>
111
+									<listOptionValue builtIn="false" value="/usr/include/llvm-4.0"/>
112
+								</option>
113
+								<option id="gnu.cpp.compiler.option.dialect.std.173212804" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
114
+								<option id="gnu.cpp.compiler.option.preprocessor.def.138555707" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
115
+									<listOptionValue builtIn="false" value="WITH_SYSTEMC"/>
116
+								</option>
117
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1842530130" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
118
+							</tool>
119
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.16714666" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
120
+								<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.626698325" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
121
+								<option id="gnu.c.compiler.exe.release.option.debugging.level.319617709" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
122
+								<option id="gnu.c.compiler.option.include.paths.1029843019" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
123
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
124
+								</option>
125
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1516553064" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
126
+							</tool>
127
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.170447641" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
128
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.139426422" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
129
+								<option id="gnu.cpp.link.option.libs.385534670" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
130
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_thread"/>
131
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_system"/>
132
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_program_options"/>
133
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="ncurses"/>
134
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="dl"/>
135
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="z"/>
136
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pthread"/>
137
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="systemc"/>
138
+								</option>
139
+								<option id="gnu.cpp.link.option.paths.1472854176" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
140
+									<listOptionValue builtIn="false" value="&quot;${LLVM_HOME}//lib&quot;"/>
141
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/lib-linux64&quot;"/>
142
+								</option>
143
+								<option id="gnu.cpp.link.option.flags.1324697316" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-rdynamic" valueType="string"/>
144
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.846036999" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
145
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
146
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
147
+								</inputType>
148
+							</tool>
149
+							<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.657363235" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
150
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2125061788" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
151
+							</tool>
152
+						</toolChain>
153
+					</folderInfo>
154
+					<fileInfo id="cdt.managedbuild.config.gnu.exe.release.446935686.748801612" name="vm_riscv.in.cpp" rcbsApplicability="disable" resourcePath="riscv/src/internal/vm_riscv.in.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613.1256835897">
155
+						<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613.1256835897" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613"/>
156
+					</fileInfo>
157
+					<sourceEntries>
158
+						<entry excluding="riscv/src/internal/vm_riscv.in.cpp|riscv/src-gen|blink.S" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
159
+					</sourceEntries>
160
+				</configuration>
161
+			</storageModule>
162
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
163
+		</cconfiguration>
164
+		<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963">
165
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963" moduleId="org.eclipse.cdt.core.settings" name="Debug wo LLVM">
166
+				<externalSettings/>
167
+				<extensions>
168
+					<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
169
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
170
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
171
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
172
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
173
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
174
+				</extensions>
175
+			</storageModule>
176
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
177
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963" name="Debug wo LLVM" parent="cdt.managedbuild.config.gnu.exe.debug">
178
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963." name="/" resourcePath="">
179
+						<toolChain id="cdt.managedbuild.toolchain.gnu.base.1287524113" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
180
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1017393892" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
181
+							<builder buildPath="${workspace_loc:/dbt-riscv}/Debug" id="cdt.managedbuild.target.gnu.builder.base.1683142303" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
182
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1493388072" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
183
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.64491626" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
184
+								<option id="gnu.cpp.compiler.option.optimization.level.403317937" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
185
+								<option id="gnu.cpp.compiler.option.debugging.level.790114950" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
186
+								<option id="gnu.cpp.compiler.option.dialect.std.1520606255" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
187
+								<option id="gnu.cpp.compiler.option.include.paths.636308365" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
188
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/include&quot;"/>
189
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
190
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/elfio}&quot;"/>
191
+								</option>
192
+								<option id="gnu.cpp.compiler.option.preprocessor.def.2129080372" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
193
+									<listOptionValue builtIn="false" value="WITH_SYSTEMC"/>
194
+									<listOptionValue builtIn="false" value="WITHOUT_LLVM=1"/>
195
+								</option>
196
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.550087631" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
197
+							</tool>
198
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1188561719" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
199
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1920085998" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
200
+								<option id="gnu.c.compiler.option.debugging.level.213257208" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
201
+								<option id="gnu.c.compiler.option.dialect.std.22835369" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
202
+								<option id="gnu.c.compiler.option.include.paths.2135657090" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
203
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
204
+								</option>
205
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1094307690" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
206
+							</tool>
207
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.base.939225541" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
208
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.576133550" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
209
+								<option id="gnu.cpp.link.option.libs.197915883" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
210
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_thread"/>
211
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_system"/>
212
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_program_options"/>
213
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="ncurses"/>
214
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="dl"/>
215
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="z"/>
216
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pthread"/>
217
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="systemc"/>
218
+								</option>
219
+								<option id="gnu.cpp.link.option.paths.1771976770" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
220
+									<listOptionValue builtIn="false" value="&quot;${LLVM_HOME}/lib&quot;"/>
221
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/lib-linux64&quot;"/>
222
+								</option>
223
+								<option id="gnu.cpp.link.option.flags.1573212388" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-rdynamic" valueType="string"/>
224
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1150004430" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
225
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
226
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
227
+								</inputType>
228
+							</tool>
229
+							<tool id="cdt.managedbuild.tool.gnu.assembler.base.1240790284" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
230
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.364516505" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
231
+							</tool>
232
+						</toolChain>
233
+					</folderInfo>
234
+					<sourceEntries>
235
+						<entry excluding="riscv/src-gen|src/iss/MCJIThelper.cpp|blink.S|src/iss/MemoryManagerHelper.cpp|flash.s|src/iss/vm.cpp|src/iss/internal/sim-avr.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
236
+					</sourceEntries>
237
+				</configuration>
238
+			</storageModule>
239
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
240
+		</cconfiguration>
241
+		<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931">
242
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931" moduleId="org.eclipse.cdt.core.settings" name="Debug wo SCV">
243
+				<externalSettings/>
244
+				<extensions>
245
+					<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
246
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
247
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
248
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
249
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
250
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
251
+				</extensions>
252
+			</storageModule>
253
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
254
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931" name="Debug wo SCV" parent="cdt.managedbuild.config.gnu.exe.debug">
255
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931." name="/" resourcePath="">
256
+						<toolChain id="cdt.managedbuild.toolchain.gnu.base.310258859" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
257
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1229180626" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
258
+							<builder buildPath="${workspace_loc:/dbt-riscv}/build" id="cdt.managedbuild.target.gnu.builder.base.2140658521" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="false" superClass="cdt.managedbuild.target.gnu.builder.base"/>
259
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1152913874" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
260
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.755134990" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
261
+								<option id="gnu.cpp.compiler.option.optimization.level.1678652367" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
262
+								<option id="gnu.cpp.compiler.option.debugging.level.1451298644" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
263
+								<option id="gnu.cpp.compiler.option.dialect.std.1383431293" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
264
+								<option id="gnu.cpp.compiler.option.include.paths.771672477" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
265
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/include&quot;"/>
266
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
267
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/elfio}&quot;"/>
268
+									<listOptionValue builtIn="false" value="/usr/include/llvm-4.0"/>
269
+								</option>
270
+								<option id="gnu.cpp.compiler.option.preprocessor.def.2076277916" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
271
+									<listOptionValue builtIn="false" value="WITH_SYSTEMC"/>
272
+								</option>
273
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1581589600" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
274
+							</tool>
275
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1252259913" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
276
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1742336828" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
277
+								<option id="gnu.c.compiler.option.debugging.level.1264761105" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
278
+								<option id="gnu.c.compiler.option.dialect.std.1874634535" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
279
+								<option id="gnu.c.compiler.option.include.paths.521439983" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
280
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
281
+								</option>
282
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1578289923" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
283
+							</tool>
284
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1467433413" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
285
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1243674969" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
286
+								<option id="gnu.cpp.link.option.libs.238448823" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
287
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_thread"/>
288
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_system"/>
289
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_program_options"/>
290
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="ncurses"/>
291
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="dl"/>
292
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="z"/>
293
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pthread"/>
294
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="systemc"/>
295
+								</option>
296
+								<option id="gnu.cpp.link.option.paths.1410043838" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
297
+									<listOptionValue builtIn="false" value="&quot;${LLVM_HOME}/lib&quot;"/>
298
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/lib-linux64&quot;"/>
299
+								</option>
300
+								<option id="gnu.cpp.link.option.flags.1839661212" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-rdynamic" valueType="string"/>
301
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1778617829" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
302
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
303
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
304
+								</inputType>
305
+							</tool>
306
+							<tool id="cdt.managedbuild.tool.gnu.assembler.base.827360801" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
307
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1044948795" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
308
+							</tool>
309
+						</toolChain>
310
+					</folderInfo>
311
+					<sourceEntries>
312
+						<entry excluding="riscv/src-gen|sysc|blink.S|flash.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
313
+					</sourceEntries>
314
+				</configuration>
315
+			</storageModule>
316
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
317
+		</cconfiguration>
318
+		<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.119132886.712015637">
319
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.119132886.712015637" moduleId="org.eclipse.cdt.core.settings" name="Debug Verbose">
320
+				<macros>
321
+					<stringMacro name="LLVM_HOME" type="VALUE_TEXT" value="/usr/local"/>
322
+				</macros>
323
+				<externalSettings/>
324
+				<extensions>
325
+					<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
326
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
327
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
328
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
329
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
330
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
331
+				</extensions>
332
+			</storageModule>
333
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
334
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.119132886.712015637" name="Debug Verbose" parent="cdt.managedbuild.config.gnu.exe.debug">
335
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.119132886.712015637." name="/" resourcePath="">
336
+						<toolChain id="cdt.managedbuild.toolchain.gnu.base.400991783" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
337
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1511049300" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
338
+							<builder arguments="VERBOSE=1" buildPath="${workspace_loc:/dbt-riscv}/build" command="make" id="cdt.managedbuild.target.gnu.builder.base.1387203165" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="false" superClass="cdt.managedbuild.target.gnu.builder.base"/>
339
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1624094238" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
340
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1953432059" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
341
+								<option id="gnu.cpp.compiler.option.optimization.level.1765014757" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
342
+								<option id="gnu.cpp.compiler.option.debugging.level.8892293" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
343
+								<option id="gnu.cpp.compiler.option.dialect.std.2015919015" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
344
+								<option id="gnu.cpp.compiler.option.include.paths.1015430957" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
345
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/include&quot;"/>
346
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
347
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/elfio}&quot;"/>
348
+									<listOptionValue builtIn="false" value="/usr/include/llvm-4.0"/>
349
+								</option>
350
+								<option id="gnu.cpp.compiler.option.preprocessor.def.109480760" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
351
+									<listOptionValue builtIn="false" value="WITH_SYSTEMC"/>
352
+									<listOptionValue builtIn="false" value="WITH_SCV"/>
353
+								</option>
354
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.333930787" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
355
+							</tool>
356
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.573692899" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
357
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1540787712" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
358
+								<option id="gnu.c.compiler.option.debugging.level.1186475882" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
359
+								<option id="gnu.c.compiler.option.dialect.std.879897404" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
360
+								<option id="gnu.c.compiler.option.include.paths.1049123784" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
361
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/dbt-riscv/external/libGIS}&quot;"/>
362
+								</option>
363
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2138116778" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
364
+							</tool>
365
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.base.857117925" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
366
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1338505643" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
367
+								<option id="gnu.cpp.link.option.libs.1040972005" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
368
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_thread"/>
369
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_system"/>
370
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="boost_program_options"/>
371
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="ncurses"/>
372
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="dl"/>
373
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="z"/>
374
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="pthread"/>
375
+									<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="systemc"/>
376
+								</option>
377
+								<option id="gnu.cpp.link.option.paths.1512905613" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
378
+									<listOptionValue builtIn="false" value="&quot;${LLVM_HOME}/lib&quot;"/>
379
+									<listOptionValue builtIn="false" value="&quot;${SYSTEMC_HOME}/lib-linux64&quot;"/>
380
+								</option>
381
+								<option id="gnu.cpp.link.option.flags.499154206" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-rdynamic" valueType="string"/>
382
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.751964794" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
383
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
384
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
385
+								</inputType>
386
+							</tool>
387
+							<tool id="cdt.managedbuild.tool.gnu.assembler.base.113451778" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
388
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.597109164" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
389
+							</tool>
390
+						</toolChain>
391
+					</folderInfo>
392
+					<sourceEntries>
393
+						<entry excluding="riscv/src-gen|sysc|blink.S|flash.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
394
+					</sourceEntries>
395
+				</configuration>
396
+			</storageModule>
397
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
398
+		</cconfiguration>
399
+	</storageModule>
400
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
401
+		<project id="dbt-riscv.cdt.managedbuild.target.gnu.exe.2012590583" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
402
+	</storageModule>
403
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
404
+	<storageModule moduleId="refreshScope" versionNumber="2">
405
+		<configuration configurationName="Debug wo SCV">
406
+			<resource resourceType="PROJECT" workspacePath="/dbt-riscv"/>
407
+		</configuration>
408
+		<configuration configurationName="Debug Verbose"/>
409
+		<configuration configurationName="Multiple configurations">
410
+			<resource resourceType="PROJECT" workspacePath="/dbt-riscv"/>
411
+		</configuration>
412
+		<configuration configurationName="Debug wo LLVM"/>
413
+		<configuration configurationName="Debug">
414
+			<resource resourceType="PROJECT" workspacePath="/dbt-riscv"/>
415
+		</configuration>
416
+		<configuration configurationName="Release">
417
+			<resource resourceType="PROJECT" workspacePath="/dbt-riscv"/>
418
+		</configuration>
419
+	</storageModule>
420
+	<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
421
+		<doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
422
+			<path value=""/>
423
+		</doc-comment-owner>
424
+	</storageModule>
425
+	<storageModule moduleId="scannerConfiguration">
426
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
427
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.c.compiler.base.492144561;cdt.managedbuild.tool.gnu.c.compiler.input.1379562984">
428
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
429
+		</scannerConfigBuildInfo>
430
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1087323960;cdt.managedbuild.tool.gnu.cpp.compiler.input.839821702">
431
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
432
+		</scannerConfigBuildInfo>
433
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963;cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963.;cdt.managedbuild.tool.gnu.cpp.compiler.base.64491626;cdt.managedbuild.tool.gnu.cpp.compiler.input.550087631">
434
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
435
+		</scannerConfigBuildInfo>
436
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963;cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963.;cdt.managedbuild.tool.gnu.c.compiler.base.1188561719;cdt.managedbuild.tool.gnu.c.compiler.input.1094307690">
437
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
438
+		</scannerConfigBuildInfo>
439
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1194734114;cdt.managedbuild.tool.gnu.cpp.compiler.input.34242651">
440
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
441
+		</scannerConfigBuildInfo>
442
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.428727540;cdt.managedbuild.tool.gnu.c.compiler.input.543284297">
443
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
444
+		</scannerConfigBuildInfo>
445
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.446935686;cdt.managedbuild.config.gnu.exe.release.446935686.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613;cdt.managedbuild.tool.gnu.cpp.compiler.input.1842530130">
446
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
447
+		</scannerConfigBuildInfo>
448
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.446935686;cdt.managedbuild.config.gnu.exe.release.446935686.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.16714666;cdt.managedbuild.tool.gnu.c.compiler.input.1516553064">
449
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
450
+		</scannerConfigBuildInfo>
451
+	</storageModule>
452
+	<storageModule moduleId="scannerConfiguration">
453
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
454
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.c.compiler.base.492144561;cdt.managedbuild.tool.gnu.c.compiler.input.1379562984">
455
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
456
+		</scannerConfigBuildInfo>
457
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1087323960;cdt.managedbuild.tool.gnu.cpp.compiler.input.839821702">
458
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
459
+		</scannerConfigBuildInfo>
460
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963;cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963.;cdt.managedbuild.tool.gnu.cpp.compiler.base.64491626;cdt.managedbuild.tool.gnu.cpp.compiler.input.550087631">
461
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
462
+		</scannerConfigBuildInfo>
463
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963;cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963.;cdt.managedbuild.tool.gnu.c.compiler.base.1188561719;cdt.managedbuild.tool.gnu.c.compiler.input.1094307690">
464
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
465
+		</scannerConfigBuildInfo>
466
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1194734114;cdt.managedbuild.tool.gnu.cpp.compiler.input.34242651">
467
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
468
+		</scannerConfigBuildInfo>
469
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.428727540;cdt.managedbuild.tool.gnu.c.compiler.input.543284297">
470
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
471
+		</scannerConfigBuildInfo>
472
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.446935686;cdt.managedbuild.config.gnu.exe.release.446935686.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613;cdt.managedbuild.tool.gnu.cpp.compiler.input.1842530130">
473
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
474
+		</scannerConfigBuildInfo>
475
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.446935686;cdt.managedbuild.config.gnu.exe.release.446935686.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.16714666;cdt.managedbuild.tool.gnu.c.compiler.input.1516553064">
476
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
477
+		</scannerConfigBuildInfo>
478
+	</storageModule>
479
+	<storageModule moduleId="scannerConfiguration">
480
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
481
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.c.compiler.base.492144561;cdt.managedbuild.tool.gnu.c.compiler.input.1379562984">
482
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
483
+		</scannerConfigBuildInfo>
484
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1087323960;cdt.managedbuild.tool.gnu.cpp.compiler.input.839821702">
485
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
486
+		</scannerConfigBuildInfo>
487
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963;cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963.;cdt.managedbuild.tool.gnu.c.compiler.base.1188561719;cdt.managedbuild.tool.gnu.c.compiler.input.1094307690">
488
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
489
+		</scannerConfigBuildInfo>
490
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1194734114;cdt.managedbuild.tool.gnu.cpp.compiler.input.34242651">
491
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
492
+		</scannerConfigBuildInfo>
493
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886;cdt.managedbuild.config.gnu.exe.debug.119132886.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.428727540;cdt.managedbuild.tool.gnu.c.compiler.input.543284297">
494
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
495
+		</scannerConfigBuildInfo>
496
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.712015637;cdt.managedbuild.config.gnu.exe.debug.119132886.712015637.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1953432059;cdt.managedbuild.tool.gnu.cpp.compiler.input.333930787">
497
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
498
+		</scannerConfigBuildInfo>
499
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931;cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931.;cdt.managedbuild.tool.gnu.c.compiler.base.1252259913;cdt.managedbuild.tool.gnu.c.compiler.input.1578289923">
500
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
501
+		</scannerConfigBuildInfo>
502
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.712015637;cdt.managedbuild.config.gnu.exe.debug.119132886.712015637.;cdt.managedbuild.tool.gnu.c.compiler.base.573692899;cdt.managedbuild.tool.gnu.c.compiler.input.2138116778">
503
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
504
+		</scannerConfigBuildInfo>
505
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.446935686;cdt.managedbuild.config.gnu.exe.release.446935686.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1265053613;cdt.managedbuild.tool.gnu.cpp.compiler.input.1842530130">
506
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
507
+		</scannerConfigBuildInfo>
508
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931;cdt.managedbuild.config.gnu.exe.debug.119132886.1763523931.;cdt.managedbuild.tool.gnu.cpp.compiler.base.755134990;cdt.managedbuild.tool.gnu.cpp.compiler.input.1581589600">
509
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
510
+		</scannerConfigBuildInfo>
511
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963;cdt.managedbuild.config.gnu.exe.debug.119132886.1995486963.;cdt.managedbuild.tool.gnu.cpp.compiler.base.64491626;cdt.managedbuild.tool.gnu.cpp.compiler.input.550087631">
512
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
513
+		</scannerConfigBuildInfo>
514
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.446935686;cdt.managedbuild.config.gnu.exe.release.446935686.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.16714666;cdt.managedbuild.tool.gnu.c.compiler.input.1516553064">
515
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
516
+		</scannerConfigBuildInfo>
517
+	</storageModule>
518
+	<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
519
+		<buildTargets>
520
+			<target name="all VERBOSE=1" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
521
+				<buildCommand>make</buildCommand>
522
+				<buildArguments/>
523
+				<buildTarget>all VERBOSE=1</buildTarget>
524
+				<stopOnError>true</stopOnError>
525
+				<useDefaultCommand>true</useDefaultCommand>
526
+				<runAllBuilders>true</runAllBuilders>
527
+			</target>
528
+			<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
529
+				<buildCommand>make</buildCommand>
530
+				<buildArguments/>
531
+				<buildTarget>clean</buildTarget>
532
+				<stopOnError>true</stopOnError>
533
+				<useDefaultCommand>true</useDefaultCommand>
534
+				<runAllBuilders>true</runAllBuilders>
535
+			</target>
536
+			<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
537
+				<buildCommand>make</buildCommand>
538
+				<buildArguments/>
539
+				<buildTarget>all</buildTarget>
540
+				<stopOnError>true</stopOnError>
541
+				<useDefaultCommand>true</useDefaultCommand>
542
+				<runAllBuilders>true</runAllBuilders>
543
+			</target>
544
+		</buildTargets>
545
+	</storageModule>
546
+</cproject>

+ 32
- 0
.gitignore View File

@@ -0,0 +1,32 @@
1
+.DS_Store
2
+/*.il
3
+/avr-instr.html
4
+/blink.S
5
+/flash.*
6
+/avr-gdb.cmd
7
+/main.cpp
8
+/Debug/
9
+/Reelease/
10
+/core
11
+/*.launch
12
+/*.csv
13
+/Release/
14
+/*.vcd
15
+/*.ods
16
+/build/
17
+/*.logs
18
+language.settings.xml
19
+/*.gtkw
20
+/Debug wo LLVM/
21
+/atmega.txdb
22
+/atmega.txlgz
23
+/atmega.txlog
24
+/.??*bdb.d.0
25
+/.??*bdb.i.0
26
+/.??*bdb.t
27
+/tmp/
28
+/test1.elf
29
+/logs/
30
+/*.log
31
+/.gdbinit
32
+/*.out

+ 15
- 0
.gitmodules View File

@@ -0,0 +1,15 @@
1
+[submodule "dbt-core"]
2
+	path = dbt-core
3
+	url = https://minres.com/git/SystemC/DBT-Core.git
4
+[submodule "sc-components"]
5
+	path = sc-components
6
+	url = https://minres.com/git/SystemC/SystemC-Components.git
7
+[submodule "external/easyloggingpp"]
8
+	path = external/easyloggingpp
9
+	url = https://github.com/muflihun/easyloggingpp.git
10
+[submodule "external/elfio"]
11
+	path = external/elfio
12
+	url = http://git.code.sf.net/p/elfio/code
13
+[submodule "external/libGIS"]
14
+	path = external/libGIS
15
+	url = https://github.com/vsergeev/libGIS.git

+ 27
- 0
.project View File

@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<projectDescription>
3
+	<name>dbt-riscv</name>
4
+	<comment></comment>
5
+	<projects>
6
+	</projects>
7
+	<buildSpec>
8
+		<buildCommand>
9
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10
+			<triggers>clean,full,incremental,</triggers>
11
+			<arguments>
12
+			</arguments>
13
+		</buildCommand>
14
+		<buildCommand>
15
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16
+			<triggers>full,incremental,</triggers>
17
+			<arguments>
18
+			</arguments>
19
+		</buildCommand>
20
+	</buildSpec>
21
+	<natures>
22
+		<nature>org.eclipse.cdt.core.cnature</nature>
23
+		<nature>org.eclipse.cdt.core.ccnature</nature>
24
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26
+	</natures>
27
+</projectDescription>

+ 32
- 0
CMakeLists.txt View File

@@ -0,0 +1,32 @@
1
+cmake_minimum_required(VERSION 2.8.12)
2
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
3
+
4
+### set the directory names of the submodules
5
+set(GIT_SUBMODULES elfio libGIS sc-components)
6
+set(GIT_SUBMODULE_DIR_sc-components .)
7
+set(GIT_SUBMODULE_DIR_dbt-core .)
8
+### set each submodules's commit or tag that is to be checked out
9
+### (leave empty if you want master)
10
+#set(GIT_SUBMODULE_VERSION_sc-comp 3af6b9836589b082c19d9131c5d0b7afa8ddd7cd)
11
+
12
+include(GNUInstallDirs)
13
+include(cmake/Submodules.cmake)
14
+
15
+#enable_testing() 
16
+
17
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
18
+    set(warnings "-Wall -Wextra -Werror")
19
+    set(CMAKE_CXX_FLAG_RELEASE "-O2 -DNDEBUG")
20
+    set(CMAKE_C_FLAG_RELEASE "-O2 -DNDEBUG")
21
+    set(CMAKE_CXX_FLAG_DEBUG "-Og")
22
+    set(CMAKE_C_FLAG_DEBUG "-Og")
23
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
24
+    set(warnings "/W4 /WX /EHsc")
25
+endif()
26
+
27
+FIND_PACKAGE(Threads)
28
+
29
+add_subdirectory(external)
30
+add_subdirectory(dbt-core)
31
+add_subdirectory(sc-components)
32
+add_subdirectory(riscv)

+ 29
- 0
LICENSE View File

@@ -0,0 +1,29 @@
1
+BSD 3-Clause License
2
+
3
+Copyright (c) 2016, MINRES Technologies GmbH
4
+All rights reserved.
5
+
6
+Redistribution and use in source and binary forms, with or without
7
+modification, are permitted provided that the following conditions are met:
8
+
9
+* Redistributions of source code must retain the above copyright notice, this
10
+  list of conditions and the following disclaimer.
11
+
12
+* Redistributions in binary form must reproduce the above copyright notice,
13
+  this list of conditions and the following disclaimer in the documentation
14
+  and/or other materials provided with the distribution.
15
+
16
+* Neither the name of the copyright holder nor the names of its
17
+  contributors may be used to endorse or promote products derived from
18
+  this software without specific prior written permission.
19
+
20
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 42
- 0
README.md View File

@@ -0,0 +1,42 @@
1
+# JIT-ISS
2
+A versatile Just-in-time (JIT) compiling instruction set simulator (ISS)
3
+
4
+**JIT-ISS README**
5
+
6
+This is currently a proof of concept and work in progress, so use at your own risk. It is currently set-up as an Eclipse CDT project and based on LLVM. To build it you need latest LLVM and Eclipse CDT version 4.6 aka Neon.
7
+
8
+To build with SystemC the define WITH_SYSTEMC needs to be set. Then a simple proof-of-concept system is created. Mainly missing are platform peripherals and interrupt handling. It reaches about 5 MIPS in lock-step mode on a MacBook Pro (Core i7-4870HQ@2.5GHz) running in a Docker container.
9
+
10
+JIT-ISS uses libGIS (https://github.com/vsergeev/libGIS) as well as ELFIO (http://elfio.sourceforge.net/), both under MIT license 
11
+
12
+**What's missing**
13
+
14
+* only AVR instruction set implemented but not verified
15
+
16
+**Planned features**
17
+
18
+* add platform peripherals
19
+  * timers
20
+  * gpio
21
+  * ext interrupt registers and functionality
22
+* and more
23
+
24
+**Quick start**
25
+
26
+* you need to have a decent compiler, make and cmake installed
27
+* install LLVM 3.9 or 4.0 according to http://apt.llvm.org/
28
+* download and install SystemC from http://accellera.org/downloads/standards/systemc
29
+  * optionally download and install SystemC Verification Library (SCV) from Accelera into the same location
30
+* checkout source from git
31
+* start an out-of-source build like so (e.g. when using LLVM 3.9 and bash)
32
+```    
33
+    cd JIT-ISS
34
+    mkdir build
35
+    cd build
36
+    LLVM_HOME=/usr/lib/llvm-3.9 cmake ..
37
+    make
38
+```
39
+* if the SystemC installation is not to be found be cmake you can optionally specify the location by either setting the following environment variables pointing to the installation
40
+  - SYSTEMC_HOME
41
+  - SYSTEMC_PREFIX
42
+  

+ 20
- 0
cmake/Common.cmake View File

@@ -0,0 +1,20 @@
1
+# Function to link between sub-projects
2
+function(add_dependent_subproject subproject_name)
3
+    #if (NOT TARGET ${subproject_name}) # target unknown
4
+    if(NOT PROJECT_${subproject_name}) # var unknown because we build only this subproject
5
+        find_package(${subproject_name} CONFIG REQUIRED)
6
+    else () # we know the target thus we are doing a build from the top directory
7
+        include_directories(../${subproject_name}/incl)
8
+    endif ()
9
+endfunction(add_dependent_subproject)
10
+
11
+# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
12
+get_directory_property(hasParent PARENT_DIRECTORY)
13
+if(hasParent)
14
+    set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
15
+endif()
16
+
17
+# Function to link between sub-projects
18
+function(add_dependent_header subproject_name)
19
+    include_directories(../${subproject_name}/incl)
20
+endfunction(add_dependent_header)

+ 24
- 0
cmake/DoxygenTarget.cmake View File

@@ -0,0 +1,24 @@
1
+function(PrepareDocTarget)
2
+
3
+  # Configure the doxygen config file with current settings:
4
+  configure_file(documentation-config.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/documentation-config.doxygen @ONLY)
5
+
6
+  # Set the name of the target : "doc" if it doesn't already exist and "doc<projectname>" if it does.
7
+  # This way we make sure to have a single "doc" target. Either it is the one of the top directory or
8
+  # it is the one of the subproject that we are compiling alone.
9
+  set(DOC_TARGET_NAME "doc")
10
+  if(TARGET doc)
11
+    set(DOC_TARGET_NAME "doc${PROJECT_NAME}")
12
+  endif()
13
+
14
+  add_custom_target(${DOC_TARGET_NAME} ${TARGET_ALL}
15
+      ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/documentation-config.doxygen
16
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
17
+      COMMENT "Generating API documentation using doxygen for ${PROJECT_NAME}" VERBATIM)
18
+
19
+  set(INSTALL_DOC_DIR ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME}/html)
20
+  file(MAKE_DIRECTORY ${INSTALL_DOC_DIR}) # needed for install
21
+
22
+  install(DIRECTORY ${INSTALL_DOC_DIR} DESTINATION share/${PROJECT_NAME}-${VERSION_MAJOR} COMPONENT doc)
23
+
24
+endfunction()

+ 91
- 0
cmake/FindSystemC.cmake View File

@@ -0,0 +1,91 @@
1
+SET(_SYSTEMC_HINTS
2
+  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SystemC\\2.2;SystemcHome]/include"
3
+  ${SYSTEMC_PREFIX}/include
4
+  ${SYSTEMC_PREFIX}/lib
5
+  ${SYSTEMC_PREFIX}/lib-linux
6
+  ${SYSTEMC_PREFIX}/lib-linux64
7
+  ${SYSTEMC_PREFIX}/lib-macos
8
+  $ENV{SYSTEMC_PREFIX}/include
9
+  $ENV{SYSTEMC_PREFIX}/lib
10
+  $ENV{SYSTEMC_PREFIX}/lib-linux
11
+  $ENV{SYSTEMC_PREFIX}/lib-linux64
12
+  $ENV{SYSTEMC_PREFIX}/lib-macos
13
+  $ENV{SYSTEMC_HOME}/include
14
+  $ENV{SYSTEMC_HOME}/lib
15
+  $ENV{SYSTEMC_HOME}/lib-linux
16
+  $ENV{SYSTEMC_HOME}/lib-linux64
17
+  $ENV{SYSTEMC_HOME}/lib-macos
18
+  ${CMAKE_INSTALL_PREFIX}/include
19
+  ${CMAKE_INSTALL_PREFIX}/lib
20
+  ${CMAKE_INSTALL_PREFIX}/lib-linux
21
+  ${CMAKE_INSTALL_PREFIX}/lib-linux64
22
+  ${CMAKE_INSTALL_PREFIX}/lib-macos
23
+  )
24
+SET(_SYSTEMC_PATHS
25
+  /usr/include/systemc
26
+  /usr/lib
27
+  /usr/lib-linux
28
+  /usr/lib-linux64
29
+  /usr/lib-macos
30
+  /usr/local/include/sysc
31
+  /usr/local/lib
32
+  /usr/local/lib-linux
33
+  /usr/local/lib-linux64
34
+  /usr/local/lib-macos
35
+  )
36
+FIND_FILE(_SYSTEMC_HEADER_FILE
37
+  NAMES systemc
38
+  HINTS ${_SYSTEMC_HINTS}
39
+  PATHS ${_SYSTEMC_PATHS}
40
+  PATH_SUFFIXES sysc/kernel
41
+)
42
+
43
+FIND_FILE(_SCV_HEADER_FILE
44
+  NAMES scv.h
45
+  HINTS ${_SYSTEMC_HINTS}
46
+  PATHS ${_SYSTEMC_PATHS}
47
+  PATH_SUFFIXES sysc/kernel
48
+)
49
+
50
+if(NOT _SYSTEMC_HEADER_FILE STREQUAL _SYSTEMC_HEADER_FILE-NOTFOUND)
51
+  set(SystemC_FOUND TRUE)
52
+endif(NOT _SYSTEMC_HEADER_FILE STREQUAL _SYSTEMC_HEADER_FILE-NOTFOUND)
53
+
54
+if(NOT _SCV_HEADER_FILE STREQUAL _SCV_HEADER_FILE-NOTFOUND)
55
+  set(SCV_FOUND TRUE)
56
+endif(NOT _SCV_HEADER_FILE STREQUAL _SCV_HEADER_FILE-NOTFOUND)
57
+
58
+FIND_PATH(SystemC_INCLUDE_DIRS
59
+  NAMES systemc.h
60
+  HINTS ${_SYSTEMC_HINTS}
61
+  PATHS ${_SYSTEMC_PATHS}
62
+)
63
+
64
+FIND_PATH(SystemC_LIBRARY_DIR
65
+  NAMES libsystemc.a
66
+  HINTS ${_SYSTEMC_HINTS}
67
+  PATHS ${_SYSTEMC_PATHS}
68
+)
69
+
70
+FIND_PATH(SCV_INCLUDE_DIRS
71
+  NAMES scv.h
72
+  HINTS ${_SYSTEMC_HINTS}
73
+  PATHS ${_SYSTEMC_PATHS}
74
+)
75
+
76
+FIND_PATH(SCV_LIBRARY_DIRS
77
+  NAMES libscv.a
78
+  HINTS ${_SYSTEMC_HINTS}
79
+  PATHS ${_SYSTEMC_PATHS}
80
+)
81
+
82
+if(SystemC_FOUND)
83
+        set(SystemC_LIBRARIES systemc)
84
+        message(STATUS "SystemC header files are taken from ${SystemC_INCLUDE_DIRS}")
85
+        message(STATUS "SystemC library is taken from ${SystemC_LIBRARY_DIR}")
86
+        if(SCV_FOUND)
87
+            set(SCV_LIBRARIES scv)
88
+            message(STATUS "SCV header files are taken from ${SCV_INCLUDE_DIRS}")
89
+            message(STATUS "SCV library is taken from ${SCV_LIBRARY_DIRS}")
90
+        endif(SCV_FOUND)
91
+endif(SystemC_FOUND)

+ 130
- 0
cmake/GetGitRevisionDescription.cmake View File

@@ -0,0 +1,130 @@
1
+# - Returns a version string from Git
2
+#
3
+# These functions force a re-configure on each git commit so that you can
4
+# trust the values of the variables in your build system.
5
+#
6
+#  get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
7
+#
8
+# Returns the refspec and sha hash of the current head revision
9
+#
10
+#  git_describe(<var> [<additional arguments to git describe> ...])
11
+#
12
+# Returns the results of git describe on the source tree, and adjusting
13
+# the output so that it tests false if an error occurs.
14
+#
15
+#  git_get_exact_tag(<var> [<additional arguments to git describe> ...])
16
+#
17
+# Returns the results of git describe --exact-match on the source tree,
18
+# and adjusting the output so that it tests false if there was no exact
19
+# matching tag.
20
+#
21
+# Requires CMake 2.6 or newer (uses the 'function' command)
22
+#
23
+# Original Author:
24
+# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
25
+# http://academic.cleardefinition.com
26
+# Iowa State University HCI Graduate Program/VRAC
27
+#
28
+# Copyright Iowa State University 2009-2010.
29
+# Distributed under the Boost Software License, Version 1.0.
30
+# (See accompanying file LICENSE_1_0.txt or copy at
31
+# http://www.boost.org/LICENSE_1_0.txt)
32
+
33
+if(__get_git_revision_description)
34
+	return()
35
+endif()
36
+set(__get_git_revision_description YES)
37
+
38
+# We must run the following at "include" time, not at function call time,
39
+# to find the path to this module rather than the path to a calling list file
40
+get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
41
+
42
+function(get_git_head_revision _refspecvar _hashvar)
43
+	set(GIT_PARENT_DIR "${CMAKE_CURRENT_LIST_DIR}")
44
+	set(GIT_DIR "${GIT_PARENT_DIR}/.git")
45
+	while(NOT EXISTS "${GIT_DIR}")	# .git dir not found, search parent directories
46
+		set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
47
+		get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
48
+		if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
49
+			# We have reached the root directory, we are not in git
50
+			set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
51
+			set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
52
+			return()
53
+		endif()
54
+		set(GIT_DIR "${GIT_PARENT_DIR}/.git")
55
+	endwhile()
56
+	# check if this is a submodule
57
+	if(NOT IS_DIRECTORY ${GIT_DIR})
58
+		file(READ ${GIT_DIR} submodule)
59
+		string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
60
+		get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
61
+		get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
62
+	endif()
63
+	set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
64
+	if(NOT EXISTS "${GIT_DATA}")
65
+		file(MAKE_DIRECTORY "${GIT_DATA}")
66
+	endif()
67
+
68
+	if(NOT EXISTS "${GIT_DIR}/HEAD")
69
+		return()
70
+	endif()
71
+	set(HEAD_FILE "${GIT_DATA}/HEAD")
72
+	configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
73
+
74
+	configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
75
+		"${GIT_DATA}/grabRef.cmake"
76
+		@ONLY)
77
+	include("${GIT_DATA}/grabRef.cmake")
78
+
79
+	set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
80
+	set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
81
+endfunction()
82
+
83
+function(git_describe _var)
84
+	if(NOT GIT_FOUND)
85
+		find_package(Git QUIET)
86
+	endif()
87
+	get_git_head_revision(refspec hash)
88
+	if(NOT GIT_FOUND)
89
+		set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
90
+		return()
91
+	endif()
92
+	if(NOT hash)
93
+		set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
94
+		return()
95
+	endif()
96
+
97
+	# TODO sanitize
98
+	#if((${ARGN}" MATCHES "&&") OR
99
+	#	(ARGN MATCHES "||") OR
100
+	#	(ARGN MATCHES "\\;"))
101
+	#	message("Please report the following error to the project!")
102
+	#	message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
103
+	#endif()
104
+
105
+	#message(STATUS "Arguments to execute_process: ${ARGN}")
106
+
107
+	execute_process(COMMAND
108
+		"${GIT_EXECUTABLE}"
109
+		describe
110
+		${hash}
111
+		${ARGN}
112
+		WORKING_DIRECTORY
113
+		"${CMAKE_SOURCE_DIR}"
114
+		RESULT_VARIABLE
115
+		res
116
+		OUTPUT_VARIABLE
117
+		out
118
+		ERROR_QUIET
119
+		OUTPUT_STRIP_TRAILING_WHITESPACE)
120
+	if(NOT res EQUAL 0)
121
+		set(out "${out}-${res}-NOTFOUND")
122
+	endif()
123
+
124
+	set(${_var} "${out}" PARENT_SCOPE)
125
+endfunction()
126
+
127
+function(git_get_exact_tag _var)
128
+	git_describe(out --exact-match ${ARGN})
129
+	set(${_var} "${out}" PARENT_SCOPE)
130
+endfunction()

+ 41
- 0
cmake/GetGitRevisionDescription.cmake.in View File

@@ -0,0 +1,41 @@
1
+#
2
+# Internal file for GetGitRevisionDescription.cmake
3
+#
4
+# Requires CMake 2.6 or newer (uses the 'function' command)
5
+#
6
+# Original Author:
7
+# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
8
+# http://academic.cleardefinition.com
9
+# Iowa State University HCI Graduate Program/VRAC
10
+#
11
+# Copyright Iowa State University 2009-2010.
12
+# Distributed under the Boost Software License, Version 1.0.
13
+# (See accompanying file LICENSE_1_0.txt or copy at
14
+# http://www.boost.org/LICENSE_1_0.txt)
15
+
16
+set(HEAD_HASH)
17
+
18
+file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
19
+
20
+string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
21
+if(HEAD_CONTENTS MATCHES "ref")
22
+	# named branch
23
+	string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
24
+	if(EXISTS "@GIT_DIR@/${HEAD_REF}")
25
+		configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
26
+	else()
27
+		configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
28
+		file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
29
+		if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
30
+			set(HEAD_HASH "${CMAKE_MATCH_1}")
31
+		endif()
32
+	endif()
33
+else()
34
+	# detached HEAD
35
+	configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
36
+endif()
37
+
38
+if(NOT HEAD_HASH)
39
+	file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
40
+	string(STRIP "${HEAD_HASH}" HEAD_HASH)
41
+endif()

+ 44
- 0
cmake/PackageConfigurator.cmake View File

@@ -0,0 +1,44 @@
1
+# Create package-config files :
2
+#  - <projectname>ConfigVersion.cmake
3
+#  - <projectname>Config.cmake
4
+# They are installed in lib/cmake/<projectname>.
5
+#
6
+# Required variables :
7
+#  - VERSION
8
+#  - PROJECT_NAME
9
+#
10
+
11
+# Include needed for 'write_basic_package_version_file'
12
+include(CMakePackageConfigHelpers)
13
+
14
+write_basic_package_version_file(
15
+  "${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
16
+  VERSION ${VERSION}
17
+  COMPATIBILITY AnyNewerVersion
18
+)
19
+
20
+configure_file(cmake/${PROJECT_NAME}Config.cmake
21
+  "${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake"
22
+  COPYONLY
23
+)
24
+
25
+# Destination
26
+set(config_install_dir lib/cmake/${PROJECT_NAME})
27
+
28
+# Config installation
29
+#   * <prefix>/lib/cmake/<project>/<project>Targets.cmake
30
+install(
31
+  EXPORT ${PROJECT_NAME}Targets
32
+  DESTINATION ${config_install_dir}
33
+)
34
+
35
+# Config installation
36
+#   * <prefix>/lib/cmake/<project>/<project>Config.cmake
37
+#   * <prefix>/lib/cmake/<project>/<project>ConfigVersion.cmake
38
+install(
39
+  FILES
40
+    cmake/${PROJECT_NAME}Config.cmake
41
+    "${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
42
+  DESTINATION ${config_install_dir}
43
+  COMPONENT devel
44
+)

+ 53
- 0
cmake/Submodules.cmake View File

@@ -0,0 +1,53 @@
1
+if(EXISTS "${PROJECT_SOURCE_DIR}/.gitmodules")
2
+message(STATUS "Updating submodules to their latest/fixed versions")
3
+message(STATUS "(this can take a while, please be patient)")
4
+
5
+### First, get all submodules in
6
+if(${GIT_SUBMODULES_CHECKOUT_QUIET})
7
+    execute_process(
8
+        COMMAND             git submodule update --init --recursive
9
+        WORKING_DIRECTORY   ${PROJECT_SOURCE_DIR}
10
+        OUTPUT_QUIET
11
+        ERROR_QUIET
12
+    )
13
+else()
14
+    execute_process(
15
+        COMMAND             git submodule update --init --recursive
16
+        WORKING_DIRECTORY   ${PROJECT_SOURCE_DIR}
17
+    )
18
+endif()
19
+
20
+### Then, checkout each submodule to the specified commit
21
+# Note: Execute separate processes here, to make sure each one is run,
22
+# should one crash (because of branch not existing, this, that ... whatever)
23
+foreach(GIT_SUBMODULE ${GIT_SUBMODULES})
24
+
25
+    if( "${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}" STREQUAL "" )
26
+        message(STATUS "no specific version given for submodule ${GIT_SUBMODULE}, checking out master")
27
+        set(GIT_SUBMODULE_VERSION_${GIT_SUBMODULE} "master")
28
+    endif()
29
+
30
+    if( "${GIT_SUBMODULE_DIR_${GIT_SUBMODULE}}" STREQUAL "" )
31
+        set(GIT_SUBMODULES_DIRECTORY external)
32
+    else()
33
+        set(GIT_SUBMODULES_DIRECTORY ${GIT_SUBMODULE_DIR_${GIT_SUBMODULE}})
34
+    endif()
35
+
36
+    if(${GIT_SUBMODULES_CHECKOUT_QUIET})
37
+        execute_process(
38
+            COMMAND             git checkout ${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}
39
+            WORKING_DIRECTORY   ${PROJECT_SOURCE_DIR}/${GIT_SUBMODULES_DIRECTORY}/${GIT_SUBMODULE}
40
+            OUTPUT_QUIET
41
+            ERROR_QUIET
42
+        )
43
+    else()
44
+        message(STATUS "checking out ${GIT_SUBMODULE}'s commit/tag ${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}")
45
+        execute_process(
46
+            COMMAND             git checkout ${GIT_SUBMODULE_VERSION_${GIT_SUBMODULE}}
47
+            WORKING_DIRECTORY   ${PROJECT_SOURCE_DIR}/${GIT_SUBMODULES_DIRECTORY}/${GIT_SUBMODULE}
48
+        )
49
+    endif()
50
+
51
+endforeach(${GIT_SUBMODULE})
52
+
53
+endif()

+ 1
- 0
dbt-core

@@ -0,0 +1 @@
1
+Subproject commit 8bdb487d2e635db487c81ad745f49edf871369d3

+ 31
- 0
external/CMakeLists.txt View File

@@ -0,0 +1,31 @@
1
+cmake_minimum_required(VERSION 2.8)
2
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
3
+set(CMAKE_CXX_STANDARD 14)
4
+
5
+# Set the name of your project here
6
+project("external")
7
+
8
+include(Common)
9
+
10
+
11
+include_directories( ${PROJECT_SOURCE_DIR}/external/libGIS ${PROJECT_SOURCE_DIR}/external/easyloggingpp/src )
12
+
13
+FILE(GLOB ElfioHeaders elfio *.hpp)
14
+FILE(GLOB GISHeaders libGis *.h)
15
+FILE(GLOB LogHeaders easyloggingpp/src *.h)
16
+
17
+set(LIB_HEADERS ${ElfioHeaders} ${GISHeaders} ${LogHeaders})
18
+set(LIB_SOURCES
19
+    libGIS/atmel_generic.c
20
+    libGIS/ihex.c
21
+    libGIS/srecord.c
22
+    easyloggingpp/src/easylogging++.cc
23
+)
24
+
25
+# Define two variables in order not to repeat ourselves.
26
+set(LIBRARY_NAME external)
27
+
28
+# Define the library
29
+add_library(${LIBRARY_NAME} ${LIB_SOURCES})
30
+
31
+

+ 1
- 0
external/easyloggingpp

@@ -0,0 +1 @@
1
+Subproject commit 850ea2a9f151ed648a989dda1cf44e503e45831f

+ 1
- 0
external/elfio

@@ -0,0 +1 @@
1
+Subproject commit fbf8eafc2dab3ac441bc5221d967e23a2e6fdc46

+ 1
- 0
external/libGIS

@@ -0,0 +1 @@
1
+Subproject commit f82b9dd3018d479230ad68a02da41fa95cad9123

+ 1
- 0
riscv/.gitignore View File

@@ -0,0 +1 @@
1
+/src-gen/

+ 17
- 0
riscv/.project View File

@@ -0,0 +1,17 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<projectDescription>
3
+	<name>riscv</name>
4
+	<comment></comment>
5
+	<projects>
6
+	</projects>
7
+	<buildSpec>
8
+		<buildCommand>
9
+			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10
+			<arguments>
11
+			</arguments>
12
+		</buildCommand>
13
+	</buildSpec>
14
+	<natures>
15
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
16
+	</natures>
17
+</projectDescription>

+ 1
- 0
riscv/.settings/.gitignore View File

@@ -0,0 +1 @@
1
+/com.minres.coredsl.CoreDsl.prefs

+ 95
- 0
riscv/CMakeLists.txt View File

@@ -0,0 +1,95 @@
1
+cmake_minimum_required(VERSION 2.8)
2
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) # main (top) cmake dir
3
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # project specific cmake dir
4
+set(CMAKE_CXX_STANDARD 14) # tODO move up to a general cmake config for all sub projects ?
5
+
6
+# CMake useful variables
7
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
8
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") 
9
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
10
+
11
+# Set the name of your project here
12
+project("riscv")
13
+
14
+# Set the version number of your project here (format is MAJOR.MINOR.PATCHLEVEL - e.g. 1.0.0)
15
+set(VERSION_MAJOR "0")
16
+set(VERSION_MINOR "0")
17
+set(VERSION_PATCH "1")
18
+set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
19
+
20
+include(Common)
21
+
22
+## Git (and its revision)
23
+find_package(Git QUIET) # if we don't find git or FindGit.cmake is not on the system we ignore it.
24
+## The Git module will trigger a reconfiguration for each pull that will bring a new revision on the local repository
25
+set (VCS_REVISION "-1")
26
+if(GIT_FOUND)
27
+    include(GetGitRevisionDescription)
28
+    get_git_head_revision(GIT_REFSPEC GIT_SHA1)
29
+    message(STATUS "GIT branch ${GIT_REFSPEC}")
30
+    message(STATUS "GIT revision ${GIT_SHA1}")
31
+    set (VCS_REVISION ${GIT_SHA1})
32
+endif()
33
+
34
+# This line finds the boost lib and headers. 
35
+set(Boost_NO_BOOST_CMAKE ON) #  Don't do a find_package in config mode before searching for a regular boost install.
36
+find_package(Boost COMPONENTS program_options system thread REQUIRED)
37
+
38
+find_package(LLVM REQUIRED CONFIG)
39
+message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
40
+message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
41
+llvm_map_components_to_libnames(llvm_libs support core mcjit x86codegen x86asmparser)
42
+
43
+find_package(SystemC)
44
+if(SystemC_FOUND)
45
+    add_definitions(-DWITH_SYSTEMC)
46
+    include_directories(${SystemC_INCLUDE_DIRS})
47
+    link_directories(${SystemC_LIBRARY_DIRS})
48
+else(SystemC_FOUND)
49
+    message( FATAL_ERROR "SystemC library not found." )
50
+endif(SystemC_FOUND)
51
+
52
+if(SCV_FOUND)   
53
+    add_definitions(-DWITH_SCV)
54
+    link_directories(${SCV_LIBRARY_DIRS})
55
+endif(SCV_FOUND)
56
+
57
+# This sets the include directory for the reference project. This is the -I flag in gcc.
58
+include_directories(
59
+    ${PROJECT_SOURCE_DIR}/incl
60
+    ${LLVM_INCLUDE_DIRS}
61
+)
62
+
63
+add_dependent_subproject(dbt-core)
64
+add_dependent_subproject(sc-components)
65
+add_dependent_header(util)
66
+
67
+include_directories(
68
+    ${PROJECT_SOURCE_DIR}/incl
69
+    ${PROJECT_SOURCE_DIR}/../external/elfio
70
+    ${PROJECT_SOURCE_DIR}/../external/libGIS
71
+    ${PROJECT_SOURCE_DIR}/../external/easyloggingpp/src
72
+    ${Boost_INCLUDE_DIRS}
73
+)
74
+
75
+
76
+# Mac needed variables (adapt for your needs - http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH)
77
+set(CMAKE_MACOSX_RPATH ON)
78
+set(CMAKE_SKIP_BUILD_RPATH FALSE)
79
+set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
80
+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
81
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
82
+
83
+add_subdirectory(src)
84
+
85
+#
86
+# SYSTEM PACKAGING (RPM, TGZ, ...)
87
+# _____________________________________________________________________________
88
+
89
+#include(CPackConfig)
90
+
91
+#
92
+# CMAKE PACKAGING (for other CMake projects to use this one easily)
93
+# _____________________________________________________________________________
94
+
95
+#include(PackageConfigurator)

+ 168
- 0
riscv/incl/cli_options.h View File

@@ -0,0 +1,168 @@
1
+/*******************************************************************************
2
+ * Copyright (C) 2017, MINRES Technologies GmbH
3
+ * All rights reserved.
4
+ * 
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions are met:
7
+ * 
8
+ * 1. Redistributions of source code must retain the above copyright notice,
9
+ *    this list of conditions and the following disclaimer.
10
+ * 
11
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ *    this list of conditions and the following disclaimer in the documentation
13
+ *    and/or other materials provided with the distribution.
14
+ * 
15
+ * 3. Neither the name of the copyright holder nor the names of its contributors
16
+ *    may be used to endorse or promote products derived from this software
17
+ *    without specific prior written permission.
18
+ * 
19
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ * POSSIBILITY OF SUCH DAMAGE.
30
+ * 
31
+ * Contributors:
32
+ *       eyck@minres.com - initial API and implementation
33
+ ******************************************************************************/
34
+
35
+#ifndef _CLI_OPTIONS_H_
36
+#define _CLI_OPTIONS_H_
37
+#include <boost/program_options.hpp>
38
+#include <easylogging++.h>
39
+
40
+namespace {
41
+const size_t ERROR_IN_COMMAND_LINE = 1;
42
+const size_t SUCCESS = 0;
43
+const size_t ERROR_UNHANDLED_EXCEPTION = 2;
44
+
45
+
46
+inline void enable_log_level(el::Configurations& conf, int level){
47
+	switch(level){
48
+	case 0:
49
+		conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "false");
50
+		/* no break */
51
+	case 1:
52
+		conf.set(el::Level::Error, el::ConfigurationType::Enabled, "false");
53
+		/* no break */
54
+	case 2:
55
+		conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "false");
56
+		/* no break */
57
+	case 3:
58
+		conf.set(el::Level::Info, el::ConfigurationType::Enabled, "false");
59
+		/* no break */
60
+	case 4:
61
+		conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "false");
62
+		/* no break */
63
+	case 5:
64
+		conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "false");
65
+		/* no break */
66
+	}
67
+}
68
+
69
+inline void configure_default_logger(boost::program_options::variables_map& vm){
70
+	el::Configurations defaultConf;
71
+	defaultConf.setToDefault();
72
+	defaultConf.set(el::Level::Error, el::ConfigurationType::Format,   "%datetime{%H:%m:%s.%g} %level %msg");
73
+	defaultConf.set(el::Level::Warning, el::ConfigurationType::Format, "%datetime{%H:%m:%s.%g} %level %msg");
74
+	defaultConf.set(el::Level::Info, el::ConfigurationType::Format,    "%datetime{%H:%m:%s.%g} %level %msg");
75
+	defaultConf.set(el::Level::Debug, el::ConfigurationType::Format,   "%datetime{%H:%m:%s.%g} %level %msg");
76
+	defaultConf.set(el::Level::Trace, el::ConfigurationType::Format,   "%datetime{%H:%m:%s.%g} %level %msg");
77
+    if(vm.count("verbose"))
78
+    	enable_log_level(defaultConf, vm["verbose"].as<int>());
79
+	if(vm.count("log-file"))
80
+		defaultConf.set(el::Level::Global,el::ConfigurationType::Filename, vm["log-file"].as<std::string>());
81
+	// default logger uses default configurations
82
+	el::Loggers::reconfigureLogger("default", defaultConf);
83
+}
84
+
85
+inline void configure_debugger_logger() {
86
+	// configure the connection logger
87
+	el::Logger* gdbServerLogger = el::Loggers::getLogger("connection");
88
+	el::Configurations gdbServerConf;
89
+	gdbServerConf.setToDefault();
90
+	gdbServerConf.set(el::Level::Error, el::ConfigurationType::Format,
91
+			"%datetime{%H:%m:%s.%g} %level [%logger] %msg");
92
+	gdbServerConf.set(el::Level::Warning, el::ConfigurationType::Format,
93
+			"%datetime{%H:%m:%s.%g} %level [%logger] %msg");
94
+	gdbServerConf.set(el::Level::Info, el::ConfigurationType::Format,
95
+			"%datetime{%H:%m:%s.%g} %level [%logger] %msg");
96
+	gdbServerConf.set(el::Level::Debug, el::ConfigurationType::Format,
97
+			"%datetime{%H:%m:%s.%g} %level [%logger] %msg");
98
+	gdbServerConf.set(el::Level::Trace, el::ConfigurationType::Format,
99
+			"%datetime{%H:%m:%s.%g} %level [%logger] %msg");
100
+	enable_log_level(gdbServerConf, 5);
101
+	gdbServerLogger->configure(gdbServerConf);
102
+}
103
+
104
+inline void configure_disass_logger(boost::program_options::variables_map& vm) {
105
+    el::Logger* disassLogger = el::Loggers::getLogger("disass");
106
+    el::Configurations disassConf;
107
+    if(vm.count("disass")){
108
+        auto file_name=vm["disass"].as<std::string>();
109
+        disassConf.setToDefault();
110
+        if (file_name.length() > 0) {
111
+            disassConf.set(el::Level::Global, el::ConfigurationType::ToFile,
112
+                    std::string("true"));
113
+            disassConf.set(el::Level::Global,
114
+                    el::ConfigurationType::ToStandardOutput, std::string("false"));
115
+            disassConf.set(el::Level::Global, el::ConfigurationType::Format,
116
+                    std::string("%msg"));
117
+            disassConf.set(el::Level::Global, el::ConfigurationType::Filename,
118
+                    file_name);
119
+            std::ofstream str(file_name); // just to clear the file
120
+        } else {
121
+            disassConf.set(el::Level::Global, el::ConfigurationType::Format,
122
+                    "%datetime{%H:%m:%s.%g} [%logger] %msg");
123
+        }
124
+    } else {
125
+        enable_log_level(disassConf, 0);
126
+    }
127
+	disassLogger->configure(disassConf);
128
+}
129
+
130
+} // namespace
131
+
132
+inline int parse_cli_options(boost::program_options::variables_map& vm, int argc, char *argv[]){
133
+    namespace po = boost::program_options;
134
+    po::options_description desc("Options");
135
+    desc.add_options()
136
+        ("help,h", "Print help message")
137
+		("verbose,v", po::value<int>()->implicit_value(0), "Sets logging verbosity")
138
+		("vmodule", po::value<std::string>(),"Defines the module(s) to be logged")
139
+		("logging-flags", po::value<int>(),"Sets logging flag(s).")
140
+		("log-file", po::value<std::string>(),"Sets default log file.")
141
+		("disass,d", po::value<std::string>()->implicit_value(""),"Enables disassembly")
142
+        ("elf,l", po::value< std::vector<std::string> >(), "ELF file(s) to load")
143
+        ("gdb-port,g", po::value<unsigned>(), "enable gdb server and specify port to use")
144
+        ("input,i", po::value<std::string>(), "the elf file to load (instead of hex files)")
145
+        ("dump-ir", "dump the intermediate representation")
146
+        ("cycles,c", po::value<int64_t>()->default_value(-1), "number of cycles to run")
147
+        ("systemc,s", "Run as SystemC simulation")
148
+        ("time", po::value<int>(), "SystemC siimulation time in ms")
149
+        ("reset,r", po::value<std::string>(), "reset address")
150
+        ("trace", po::value<uint8_t>(),  "enable tracing, or cmbintation of 1=signals and 2=TX text, 4=TX compressed text, 6=TX in SQLite")\
151
+        ("mem,m", po::value<std::string>(), "the memory input file");
152
+    try {
153
+        po::store(po::parse_command_line(argc, argv, desc), vm); // can throw
154
+        // --help option
155
+        if ( vm.count("help")  ){
156
+            std::cout << "JIT-ISS simulator for AVR" << std::endl << desc << std::endl;
157
+            return SUCCESS;
158
+        }
159
+        po::notify(vm); // throws on error, so do after help in case
160
+    } catch(po::error& e){
161
+    	// there are problems
162
+    	std::cerr << "ERROR: " << e.what() << std::endl << std::endl;
163
+        std::cerr << desc << std::endl;
164
+        return ERROR_IN_COMMAND_LINE;
165
+    }
166
+	return SUCCESS;
167
+}
168
+#endif /* _CLI_OPTIONS_H_ */

+ 200
- 0
riscv/incl/iss/arch/minrv_ima.h View File

@@ -0,0 +1,200 @@
1
+/*******************************************************************************
2
+ * Copyright (C) 2017, MINRES Technologies GmbH
3
+ * All rights reserved.
4
+ * 
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions are met:
7
+ * 
8
+ * 1. Redistributions of source code must retain the above copyright notice,
9
+ *    this list of conditions and the following disclaimer.
10
+ * 
11
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ *    this list of conditions and the following disclaimer in the documentation
13
+ *    and/or other materials provided with the distribution.
14
+ * 
15
+ * 3. Neither the name of the copyright holder nor the names of its contributors
16
+ *    may be used to endorse or promote products derived from this software
17
+ *    without specific prior written permission.
18
+ * 
19
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ * POSSIBILITY OF SUCH DAMAGE.
30
+ * 
31
+ * Contributors:
32
+ *       eyck@minres.com - initial API and implementation
33
+ ******************************************************************************/
34
+
35
+#ifndef _MINRV_IMA_H_
36
+#define _MINRV_IMA_H_
37
+
38
+#include <iss/arch_if.h>
39
+#include <iss/vm_if.h>
40
+#include <iss/arch/traits.h>
41
+
42
+namespace iss {
43
+namespace arch {
44
+
45
+struct minrv_ima;
46
+
47
+template<>
48
+struct traits<minrv_ima> {
49
+
50
+    enum constants {XLEN=32,XLEN2=64,XLEN_BIT_MASK=31,PCLEN=32,fence=0,fencei=1,fencevmal=2,fencevmau=3,MISA_VAL=1075056897,PGSIZE=4096,PGMASK=4095};
51
+
52
+    enum reg_e {
53
+        X0,
54
+        X1,
55
+        X2,
56
+        X3,
57
+        X4,
58
+        X5,
59
+        X6,
60
+        X7,
61
+        X8,
62
+        X9,
63
+        X10,
64
+        X11,
65
+        X12,
66
+        X13,
67
+        X14,
68
+        X15,
69
+        X16,
70
+        X17,
71
+        X18,
72
+        X19,
73
+        X20,
74
+        X21,
75
+        X22,
76
+        X23,
77
+        X24,
78
+        X25,
79
+        X26,
80
+        X27,
81
+        X28,
82
+        X29,
83
+        X30,
84
+        X31,
85
+        PC,
86
+        NUM_REGS,
87
+        NEXT_PC=NUM_REGS,
88
+        TRAP_STATE,
89
+        PENDING_TRAP,
90
+        MACHINE_STATE,
91
+        ICOUNT
92
+    };
93
+
94
+    typedef uint32_t reg_t;
95
+
96
+    typedef uint32_t addr_t;
97
+            
98
+    typedef uint32_t code_word_t; //TODO: check removal
99
+            
100
+    typedef iss::typed_addr_t<iss::VIRTUAL>  virt_addr_t;
101
+
102
+    typedef iss::typed_addr_t<iss::PHYSICAL> phys_addr_t;
103
+
104
+    constexpr static unsigned reg_bit_width(unsigned r) {
105
+        const uint32_t MinRV_IMA_reg_size[] = {32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,64};
106
+        return MinRV_IMA_reg_size[r];
107
+    }
108
+
109
+    constexpr static unsigned reg_byte_offset(unsigned r) {
110
+        const uint32_t MinRV_IMA_reg_byte_offset[] = {0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,152,160};
111
+        return MinRV_IMA_reg_byte_offset[r];
112
+    }
113
+
114
+    enum sreg_flag_e {FLAGS};
115
+
116
+    enum mem_type_e {MEM,CSR,FENCE,RES};
117
+
118
+};
119
+
120
+struct minrv_ima: public arch_if {
121
+
122
+    using virt_addr_t = typename traits<minrv_ima>::virt_addr_t;
123
+    using phys_addr_t = typename traits<minrv_ima>::phys_addr_t;
124
+    using reg_t =  typename traits<minrv_ima>::reg_t;
125
+    using addr_t = typename traits<minrv_ima>::addr_t;
126
+
127
+    minrv_ima();
128
+    ~minrv_ima();
129
+
130
+    void reset(uint64_t address=0);
131
+
132
+//    virtual void loadFile(std::string name, int type=-1);
133
+
134
+    uint8_t* get_regs_base_ptr() override;
135
+
136
+    void get_reg(short idx, std::vector<uint8_t>& value) override;
137
+    void set_reg(short idx, const std::vector<uint8_t>& value) override;
138
+
139
+    bool get_flag(int flag) override;
140
+    void set_flag(int, bool value) override;
141
+
142
+    void update_flags(operations op, uint64_t opr1, uint64_t opr2) override;
143
+
144
+    void notify_phase(exec_phase phase){
145
+        if(phase==ISTART){
146
+            ++reg.icount;
147
+            reg.PC=reg.NEXT_PC;
148
+        }
149
+    }
150
+
151
+    uint64_t get_icount() { return reg.icount;}
152
+
153
+    virtual phys_addr_t v2p(const iss::addr_t& pc);
154
+
155
+    virtual iss::sync_type needed_sync() const { return iss::PRE_SYNC; }
156
+
157
+protected:
158
+    struct MinRV_IMA_regs {
159
+        uint32_t X0;
160
+        uint32_t X1;
161
+        uint32_t X2;
162
+        uint32_t X3;
163
+        uint32_t X4;
164
+        uint32_t X5;
165
+        uint32_t X6;
166
+        uint32_t X7;
167
+        uint32_t X8;
168
+        uint32_t X9;
169
+        uint32_t X10;
170
+        uint32_t X11;
171
+        uint32_t X12;
172
+        uint32_t X13;
173
+        uint32_t X14;
174
+        uint32_t X15;
175
+        uint32_t X16;
176
+        uint32_t X17;
177
+        uint32_t X18;
178
+        uint32_t X19;
179
+        uint32_t X20;
180
+        uint32_t X21;
181
+        uint32_t X22;
182
+        uint32_t X23;
183
+        uint32_t X24;
184
+        uint32_t X25;
185
+        uint32_t X26;
186
+        uint32_t X27;
187
+        uint32_t X28;
188
+        uint32_t X29;
189
+        uint32_t X30;
190
+        uint32_t X31;
191
+        uint32_t PC;
192
+        uint32_t NEXT_PC;
193
+        uint32_t trap_state, pending_trap, machine_state;
194
+        uint64_t icount;
195
+    } reg;
196
+};
197
+
198
+}
199
+}            
200
+#endif /* _MINRV_IMA_H_ */

+ 1249
- 0
riscv/incl/iss/arch/riscv_core.h
File diff suppressed because it is too large
View File


+ 56
- 0
riscv/src/CMakeLists.txt View File

@@ -0,0 +1,56 @@
1
+# library files
2
+FILE(GLOB RiscVHeaders *.h)
3
+set(LIB_HEADERS ${RiscVHeaders} )
4
+set(LIB_SOURCES
5
+    iss/minrv_ima.cpp
6
+    internal/vm_minrv_ima.cpp
7
+)
8
+
9
+set(APP_HEADERS )
10
+
11
+set(APP_SOURCES main.cpp)
12
+
13
+# Define two variables in order not to repeat ourselves.
14
+set(LIBRARY_NAME riscv)
15
+
16
+# Define the library
17
+add_library(${LIBRARY_NAME} ${LIB_SOURCES})
18
+
19
+set_target_properties(${LIBRARY_NAME} PROPERTIES
20
+  VERSION ${VERSION}  # ${VERSION} was defined in the main CMakeLists.
21
+  FRAMEWORK FALSE
22
+  PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
23
+)
24
+
25
+# This is a make target, so you can do a "make riscv-sc"
26
+set(APPLICATION_NAME riscv-sc)
27
+
28
+add_executable(${APPLICATION_NAME} ${APP_SOURCES})
29
+
30
+# Links the target exe against the libraries
31
+target_link_libraries(${APPLICATION_NAME} ${LIBRARY_NAME})
32
+target_link_libraries(${APPLICATION_NAME} dbt-core)
33
+target_link_libraries(${APPLICATION_NAME} sc-components)
34
+target_link_libraries(${APPLICATION_NAME} external)
35
+target_link_libraries(${APPLICATION_NAME} ${llvm_libs})
36
+#target_link_libraries(${APPLICATION_NAME} ${SystemC_LIBRARIES} )
37
+#if(SCV_FOUND)
38
+    #target_link_libraries (${APPLICATION_NAME} ${SCV_LIBRARIES})
39
+#endif(SCV_FOUND)
40
+target_link_libraries(${APPLICATION_NAME} ${Boost_LIBRARIES} )
41
+
42
+# Says how and where to install software
43
+# Targets:
44
+#   * <prefix>/lib/<libraries>
45
+#   * header location after install: <prefix>/include/<project>/*.h
46
+#   * headers can be included by C++ code `#<project>/Bar.hpp>`
47
+install(TARGETS ${LIBRARY_NAME} ${APPLICATION_NAME}
48
+  EXPORT ${PROJECT_NAME}Targets            # for downstream dependencies
49
+  ARCHIVE DESTINATION lib COMPONENT libs   # static lib
50
+  RUNTIME DESTINATION bin COMPONENT libs   # binaries
51
+  LIBRARY DESTINATION lib COMPONENT libs   # shared lib
52
+  FRAMEWORK DESTINATION bin COMPONENT libs # for mac
53
+  PUBLIC_HEADER DESTINATION incl/${PROJECT_NAME} COMPONENT devel   # headers for mac (note the different component -> different package)
54
+  INCLUDES DESTINATION incl             # headers
55
+)
56
+

+ 108
- 0
riscv/src/RV32A.core_desc View File

@@ -0,0 +1,108 @@
1
+import "RV32IBase.core_desc"
2
+
3
+InsructionSet RV32A extends RV32IBase{
4
+	 
5
+	address_spaces { 
6
+		RES[8]
7
+	}
8
+	
9
+	instructions{
10
+		LR.W {
11
+			encoding: b00010 | aq[0:0] | rl[0:0]  | b00000 | rs1[4:0] | b010 | rd[4:0] | b0101111;
12
+			args_disass: "x%rd$d, x%rs1$d";
13
+			if(rd!=0){
14
+				val offs[XLEN] <= X[rs1];
15
+				X[rd]<= sext(MEM[offs]{32}, XLEN);
16
+				RES[offs]{32}<=sext(-1, 32);
17
+			}
18
+		}
19
+		SC.W {
20
+			encoding: b00011 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
21
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d";
22
+			val offs[XLEN] <= X[rs1];
23
+			val res1[32] <= RES[offs]{32};
24
+			if(res1!=0)
25
+				MEM[offs]{32} <= X[rs2];
26
+			if(rd!=0) X[rd]<= choose(res1!=0, 0, 1);
27
+		}
28
+		AMOSWAP.W{
29
+			encoding: b00001 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
30
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
31
+			val offs[XLEN]<=X[rs1];
32
+			if(rd!=0) X[rd]<=sext(MEM[offs]{32});
33
+			MEM[offs]{32}<=X[rs2];
34
+		}
35
+		AMOADD.W{
36
+			encoding: b00000 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
37
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
38
+			val offs[XLEN]<=X[rs1];
39
+			val res1[XLEN] <= sext(MEM[offs]{32});
40
+			if(rd!=0) X[rd]<=res1;
41
+			val res2[XLEN]<=res1 + X[rs2];
42
+			MEM[offs]{32}<=res2;
43
+		}
44
+		AMOXOR.W{
45
+			encoding: b00100 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
46
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
47
+			val offs[XLEN]<=X[rs1];
48
+			val res1[XLEN] <= sext(MEM[offs]{32});
49
+			if(rd!=0) X[rd]<=res1;
50
+			val res2[XLEN]<=res1 ^ X[rs2];
51
+			MEM[offs]{32}<=res2;
52
+		}
53
+		AMOAND.W{
54
+			encoding: b01100 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
55
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
56
+			val offs[XLEN]<=X[rs1];
57
+			val res1[XLEN] <= sext(MEM[offs]{32});
58
+			if(rd!=0) X[rd]<=res1;
59
+			val res2[XLEN] <=res1 & X[rs2];
60
+			MEM[offs]{32}<=res2;
61
+		}
62
+		AMOOR.W {
63
+			encoding: b01000 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
64
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
65
+			val offs[XLEN]<=X[rs1];
66
+			val res1[XLEN] <= sext(MEM[offs]{32});
67
+			if(rd!=0) X[rd]<=res1;
68
+			val res2[XLEN]<=res1 | X[rs2];
69
+			MEM[offs]{32}<=res2;
70
+		}
71
+		AMOMIN.W{
72
+			encoding: b10000 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
73
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
74
+			val offs[XLEN]<=X[rs1];
75
+			val res1[XLEN] <= sext(MEM[offs]{32});
76
+			if(rd!=0) X[rd]<=res1;
77
+			val res2[XLEN]<= choose(res1's>X[rs2]s, X[rs2], res1);
78
+			MEM[offs]{32}<=res2;
79
+		}
80
+		AMOMAX.W{
81
+			encoding: b10100 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
82
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
83
+			val offs[XLEN]<=X[rs1];
84
+			val res1[XLEN] <= sext(MEM[offs]{32});
85
+			if(rd!=0) X[rd]<=res1;
86
+			val res2[XLEN]<= choose(res1's<X[rs2]s, X[rs2], res1);
87
+			MEM[offs]{32}<=res2;
88
+		}
89
+		AMOMINU.W{
90
+			encoding: b11000 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
91
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
92
+			val offs[XLEN]<=X[rs1];
93
+			val res1[XLEN] <= zext(MEM[offs]{32});
94
+			if(rd!=0) X[rd]<=res1;
95
+			val res2[XLEN]<= choose(res1>X[rs2], X[rs2], res1);
96
+			MEM[offs]{32}<=res2;
97
+		}
98
+		AMOMAXU.W{
99
+			encoding: b11100 | aq[0:0] | rl[0:0] | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0101111;
100
+			args_disass: "x%rd$d, x%rs1$d, x%rs2$d (aqu=%aq$d,rel=%rl$d)";
101
+			val offs[XLEN]<=X[rs1];
102
+			val res1[XLEN] <= zext(MEM[offs]{32});
103
+			if(rd!=0) X[rd]<=res1;
104
+			val res2[XLEN]<= choose(res1'u<X[rs2]'u, X[rs2], res1);
105
+			MEM[offs]{32}<=res2;
106
+		}
107
+	}
108
+}

+ 310
- 0
riscv/src/RV32C.core_desc View File

@@ -0,0 +1,310 @@
1
+import "RV32IBase.core_desc"
2
+
3
+InsructionSet RV32CI {
4
+	constants {
5
+		XLEN
6
+	}
7
+	address_spaces { 
8
+		MEM[8]
9
+	}
10
+	registers { 
11
+		[31:0]   X[XLEN],
12
+				PC[XLEN](is_pc)
13
+	}
14
+	instructions{
15
+		C.ADDI4SPN { //(RES, nzuimm=0)
16
+			encoding: b000 | nzuimm[5:4] | nzuimm[9:6] | nzuimm[2:2] | nzuimm[3:3] | rd[2:0] | b00;
17
+			args_disass: "x%rd$d, 0x%nzuimm$05x";
18
+			if(nzuimm == 0)
19
+				raise(0, 2);
20
+			val rd_idx[5] <= rd+8;
21
+			val x2_idx[5] <= 2;
22
+			X[rd_idx] <= X[x2_idx] + nzuimm;
23
+		}
24
+		C.LW { // (RV32)
25
+			encoding: b010 | uimm[5:3] | rs1[2:0] | uimm[2:2] | uimm[6:6] | rd[2:0] | b00;
26
+			args_disass: "x(8+%rd$d), x(8+%rs1$d), 0x%uimm$05x";
27
+			val rs1_idx[5] <= rs1+8;
28
+			val adr[XLEN] <= X[rs1_idx]+uimm;
29
+			val rd_idx[5] <= rd+8;
30
+			X[rd_idx] <= MEM[adr]{32};
31
+		}
32
+		C.SW {//(RV32)
33
+			encoding: b110 | uimm[5:3] | rs1[2:0] | uimm[2:2] | uimm[6:6] | rs2[2:0] | b00;
34
+			args_disass: "x(8+%rs1$d), x(8+%rs2$d), 0x%uimm$05x";
35
+			val rs1_idx[5] <= rs1+8;
36
+			val adr[XLEN] <= X[rs1_idx]+uimm;
37
+			val rs2_idx[5] <= rs2+8;
38
+			MEM[adr]{32} <= X[rs2_idx];
39
+		}
40
+		C.NOP {//(RV32)
41
+			encoding: b000 | b0 | b00000 | b00000 | b01; //TODO
42
+			args_disass: "";
43
+		}
44
+		C.ADDI {//(RV32)
45
+			encoding:b000 | nzimm[5:5]s | rs1[4:0] | nzimm[4:0]s | b01;
46
+			args_disass: "x%rs1$d, 0x%nzimm$05x";
47
+			if(nzimm == 0)
48
+				raise(0, 2);
49
+			X[rs1] <= X[rs1] + nzimm;
50
+			
51
+		}
52
+        // C.JAL will be overwritten by C.ADDIW for RV64/128
53
+		C.JAL(no_cont) {//(RV32)
54
+			encoding: b001 | imm[11:11]s | imm[4:4]s | imm[9:8]s | imm[10:10]s | imm[6:6]s | imm[7:7]s | imm[3:1]s | imm[5:5]s | b01;
55
+			args_disass: "0x%imm$05x";
56
+			val rd[5] <= 1;
57
+			X[rd] <= PC+2;
58
+			PC<=PC+imm;
59
+		}
60
+		C.LI {//(RV32)
61
+			encoding:b010 | imm[5:5]s | rd[4:0] | imm[4:0]s | b01;
62
+			args_disass: "x%rd$d, 0x%imm$05x";
63
+			if(rd == 0)	raise(0, 2);
64
+			X[rd] <= imm;
65
+		}
66
+		// order matters here as C.ADDI16SP overwrites C.LUI vor rd==2
67
+		C.LUI {//(RV32)
68
+			encoding:b011 | nzimm[17:17]s | rd[4:0] | nzimm[16:12]s | b01;
69
+			args_disass: "x%rd$d, 0x%nzimm$05x";
70
+			if(rd == 0) raise(0, 2);
71
+			if(rd == 2) raise(0, 2);
72
+			if(nzimm == 0) raise(0, 2);
73
+			X[rd] <= nzimm;
74
+		}
75
+		C.ADDI16SP {//(RV32)
76
+			encoding:b011 | nzimm[9:9]s | b00010 | nzimm[4:4]s |nzimm[6:6]s | nzimm[8:7]s | nzimm[5:5]s | b01;
77
+			args_disass: "0x%nzimm$05x";
78
+			val x2_idx[5] <= 2;
79
+			X[x2_idx] <= X[x2_idx]s + nzimm;
80
+		}
81
+		C.SRLI {//(RV32 nse)
82
+			encoding:b100 | shamt[5:5] | b00 | rs1[2:0] | shamt[4:0] | b01;
83
+			args_disass: "x(8+%rs1$d), %shamt$d";
84
+            if(shamt > 31) raise(0, 2);
85
+			val rs1_idx[5] <= rs1+8;
86
+			X[rs1_idx] <= shrl(X[rs1_idx], shamt);
87
+		}
88
+		C.SRAI {//(RV32)
89
+			encoding:b100 | shamt[5:5] | b01 | rs1[2:0] | shamt[4:0] | b01;
90
+			args_disass: "x(8+%rs1$d), %shamt$d";
91
+			if(shamt > 31) raise(0, 2);
92
+			val rs1_idx[5] <= rs1+8;
93
+			X[rs1_idx] <= shra(X[rs1_idx], shamt);
94
+		}
95
+		C.ANDI {//(RV32)
96
+			encoding:b100 | imm[5:5]s | b10 | rs1[2:0] | imm[4:0]s | b01;
97
+			args_disass: "x(8+%rs1$d), 0x%imm$05x";
98
+			val rs1_idx[5] <= rs1 + 8;
99
+			X[rs1_idx] <= X[rs1_idx] & imm;
100
+		}
101
+		C.SUB {//(RV32)
102
+			encoding:b100 | b0 | b11 | rd[2:0] | b00 | rs2[2:0] | b01;
103
+			args_disass: "x(8+%rd$d), x(8+%rs2$d)";
104
+			val rd_idx[5] <= rd + 8;
105
+			val rs2_idx[5] <= rs2 + 8;
106
+			X[rd_idx] <= X[rd_idx] - X[rs2_idx];
107
+		}
108
+		C.XOR {//(RV32)
109
+			encoding:b100 | b0 | b11 | rd[2:0] | b01 | rs2[2:0] | b01;
110
+			args_disass: "x(8+%rd$d), x(8+%rs2$d)";
111
+			val rd_idx[5] <= rd + 8;
112
+			val rs2_idx[5] <= rs2 + 8;
113
+			X[rd_idx] <= X[rd_idx] ^ X[rs2_idx];
114
+		}
115
+		C.OR {//(RV32)
116
+			encoding:b100 | b0 | b11 | rd[2:0] | b10 | rs2[2:0] | b01;
117
+			args_disass: "x(8+%rd$d), x(8+%rs2$d)";
118
+			val rd_idx[5] <= rd + 8;
119
+			val rs2_idx[5] <= rs2 + 8;
120
+			X[rd_idx] <= X[rd_idx] | X[rs2_idx];
121
+		}
122
+		C.AND {//(RV32)
123
+			encoding:b100 | b0 | b11 | rd[2:0] | b11 | rs2[2:0] | b01;
124
+			args_disass: "x(8+%rd$d), x(8+%rs2$d)";
125
+			val rd_idx[5] <= rd + 8;
126
+			val rs2_idx[5] <= rs2 + 8;
127
+			X[rd_idx] <= X[rd_idx] & X[rs2_idx];
128
+		}
129
+		C.J(no_cont) {//(RV32)
130
+			encoding:b101 | imm[11:11]s | imm[4:4]s | imm[9:8]s | imm[10:10]s | imm[6:6]s | imm[7:7]s | imm[3:1]s | imm[5:5]s | b01;
131
+			args_disass: "0x%imm$05x";
132
+			PC<=PC+imm;
133
+		}
134
+		C.BEQZ(no_cont) {//(RV32)
135
+			encoding:b110 | imm[8:8]s | imm[4:3]s | rs1d[2:0] | imm[7:6]s |imm[2:1]s | imm[5:5]s | b01;
136
+			args_disass: "x(8+%rs1d$d), 0x%imm$05x";
137
+			val rs1[5] <= rs1d+8;
138
+			PC<=choose(X[rs1]==0, PC+imm, PC+2);
139
+		}
140
+		C.BNEZ(no_cont) {//(RV32)
141
+			encoding:b111 | imm[8:8] | imm[4:3] | rs1d[2:0] | imm[7:6] | imm[2:1] | imm[5:5] | b01;
142
+			args_disass: "x(8+%rs1d$d),, 0x%imm$05x";
143
+            val rs1[5] <= rs1d+8;
144
+			PC<=choose(X[rs1]!=0, PC+imm, PC+2);
145
+		}
146
+		C.SLLI {//(RV32)
147
+			encoding:b000 | shamt[5:5] | rs1[4:0] | shamt[4:0] | b10;
148
+			args_disass: "x%rs1$d, %shamt$d";
149
+			if(rs1 == 0) raise(0, 2);
150
+			if(shamt > 31) raise(0, 2);
151
+			X[rs1] <= shll(X[rs1], shamt);
152
+		}
153
+		C.LQSP {//(RV128)
154
+			encoding:b001 | uimm[5:5] | rd[4:0] | uimm[4:4] | uimm[9:6] | b10;
155
+		}
156
+		C.LWSP {//
157
+			encoding:b010 | uimm[5:5] | rd[4:0] | uimm[4:2] | uimm[7:6] | b10;
158
+			args_disass: "x%rd$d, sp, 0x%uimm$05x";
159
+			val x2_idx[5] <= 2;
160
+			val offs[XLEN] <= X[x2_idx] + uimm;
161
+			X[rd] <= MEM[offs]{32};
162
+		}
163
+		// order matters as C.JR is a special case of C.JR
164
+        C.MV {//(RV32)
165
+            encoding:b100 | b0 | rd[4:0] | rs2[4:0] | b10;
166
+            args_disass: "x%rd$d, x%rs2$d";
167
+            X[rd] <= X[rs2];
168
+        }
169
+		C.JR(no_cont) {//(RV32)
170
+			encoding:b100 | b0 | rs1[4:0] | b00000 | b10;
171
+			args_disass: "x%rs1$d";
172
+			PC <= X[rs1];
173
+		}
174
+		C.EBREAK(no_cont) {//(RV32)
175
+			encoding:b100 | b1 | b00000 | b00000 | b10;
176
+			raise(0, 3);
177
+		}
178
+        // order matters as C.JALR is a special case of C.ADD
179
+        C.ADD {//(RV32)
180
+            encoding:b100 | b1 | rd[4:0] | rs2[4:0] | b10;
181
+            args_disass: "x%rd$d, x%rs2$d";
182
+            X[rd] <= X[rd] + X[rs2];
183
+        }
184
+		C.JALR(no_cont) {//(RV32)
185
+			encoding:b100 | b1 | rs1[4:0] | b00000 | b10;
186
+			args_disass: "x%rs1$d";
187
+			val rd[5] <= 1;
188
+			X[rd] <= PC+2;
189
+			PC<=X[rs1];
190
+		}
191
+		C.SWSP {//
192
+			encoding:b110 | uimm[5:2] | uimm[7:6] | rs2[4:0] | b10;
193
+            args_disass: "x2+0x%uimm$05x, x%rs2$d";
194
+            val x2_idx[5] <= 2;
195
+            val offs[XLEN] <= X[x2_idx] + uimm;
196
+            MEM[offs]{32} <= X[rs2];
197
+		}
198
+	}
199
+}
200
+
201
+InsructionSet RV32CF extends RV32CI {
202
+	constants {
203
+		XLEN, FLEN
204
+	}
205
+	address_spaces { 
206
+		MEM[8]
207
+	}
208
+	registers { 
209
+		[31:0]   X[XLEN],
210
+		[31:0]   F[FLEN]
211
+	}
212
+	instructions{
213
+		C.FLD { //(RV32/64)
214
+			encoding: b001 | uimm[5:3] | rs1[2:0] | uimm[7:6] | rd[2:0] | b00;
215
+	 	}
216
+		C.FLW {//(RV32)
217
+			encoding: b011 | uimm[5:3] | rs1[2:0] | uimm[2:2] | uimm[6:6] | rd[2:0] | b00;
218
+		} 
219
+		C.FSD { //(RV32/64)
220
+			encoding: b101 | uimm[5:3] | rs1[2:0] | uimm[7:6] | rs2[2:0] | b00;
221
+		} 
222
+		C.FSW {//(RV32)
223
+			encoding: b111 | uimm[5:3] | rs1[2:0] | uimm[2:2] | uimm[6:6] | rs2[2:0] | b00;
224
+		}
225
+		C.FLDSP {//(RV32/64)
226
+			encoding:b001 | uimm[5:5] | rd[4:0] | uimm[4:3] | uimm[8:6] | b10;
227
+		}
228
+		C.FLWSP {//RV32
229
+			encoding:b011 | uimm[5:5] | rd[4:0] | uimm[4:2] | uimm[7:6] | b10;
230
+		}
231
+		C.FSDSP {//(RV32/64)
232
+			encoding:b101 | uimm[5:3] | uimm[8:6] | rs2[4:0] | b10;
233
+		}
234
+		C.FSWSP {//(RV32)
235
+			encoding:b111 | uimm[5:2] | uimm[7:6] | rs2[4:0] | b10;
236
+		}		
237
+	}
238
+}
239
+
240
+InsructionSet RV64CI extends RV32CI {
241
+	constants {
242
+		XLEN
243
+	}
244
+	address_spaces { 
245
+		MEM[8]
246
+	}
247
+	registers { 
248
+		[31:0]   X[XLEN],
249
+				PC[XLEN](is_pc)
250
+	}
251
+	instructions{
252
+		C.LD {//(RV64/128) 
253
+			encoding:b011 | uimm[5:3] | rs1[2:0] | uimm[7:6] | rd[2:0] | b00;
254
+		}
255
+		C.SD { //(RV64/128) 
256
+			encoding:b111 | uimm[5:3] | rs1[2:0] | uimm[7:6] | rs2[2:0] | b00;
257
+		}
258
+		C.SUBW {//(RV64/128, RV32 res)
259
+			encoding:b100 | b1 | b11 | rd[2:0] | b00 | rs2[2:0] | b01;
260
+			args_disass: "x%rd$d, sp, 0x%imm$05x";
261
+		}
262
+		C.ADDW {//(RV64/128 RV32 res)
263
+			encoding:b100 | b1 | b11 | rd[2:0] | b01 | rs2[2:0] | b01;
264
+			args_disass: "x%rd$d, sp, 0x%imm$05x";
265
+		}
266
+        C.ADDIW {//(RV64/128)
267
+            encoding:b001 | imm[5:5] | rs1[4:0] | imm[4:0] | b01;
268
+        }
269
+       	C.SRLI64 {//(RV32/64/128)
270
+          	encoding:b100 | b0 | b00 | rs1[2:0] | b00000 | b01;
271
+      	}
272
+		C.SRAI64 {//(RV32/64/128)
273
+			encoding:b100 | b0 | b01 | rs1[2:0] | b00000 | b01;
274
+		}
275
+		C.SLLI64 {//(RV128 RV32/64)
276
+			encoding:b000 | b0 | rs1[4:0] | b00000 | b10;
277
+		}
278
+		C.LDSP {//(RV64/128
279
+			encoding:b011 | uimm[5:5] | rd[4:0] | uimm[4:3] | uimm[8:6] | b10;
280
+			args_disass: "x%rd$d, sp, 0x%imm$05x";
281
+		}
282
+		C.SDSP {//(RV64/128)
283
+			encoding:b111 | uimm[5:3] | uimm[8:6] | rs2[4:0] | b10;
284
+		}
285
+	}
286
+}
287
+
288
+InsructionSet RV128CI extends RV64CI {
289
+	constants {
290
+		XLEN
291
+	}
292
+	address_spaces { 
293
+		MEM[8]
294
+	}
295
+	registers { 
296
+		[31:0]   X[XLEN],
297
+				PC[XLEN](is_pc)
298
+	}
299
+	instructions{
300
+		C.LQ { //(RV128)
301
+			 encoding:b001 | uimm[5:4] | uimm[8:8] | rs1[2:0] | uimm[7:6] | rd[2:0] | b00;
302
+		}
303
+		C.SQ { //(RV128) 
304
+			encoding:b101 | uimm[5:4] | uimm[8:8] | rs1[2:0] | uimm[7:6] | rs2[2:0] | b00;
305
+		}
306
+		C.SQSP {//(RV128)
307
+			encoding:b101 | uimm[5:4] | uimm[9:6] | rs2[4:0] | b10;
308
+		}
309
+	}
310
+}

+ 105
- 0
riscv/src/RV32F.core_desc View File

@@ -0,0 +1,105 @@
1
+import "RV32IBase.core_desc"
2
+
3
+InsructionSet RV32F extends RV32IBase{
4
+	constants {
5
+		FLEN, fcsr
6
+	} 
7
+	registers {
8
+		[31:0]    F[FLEN]
9
+    }	
10
+	instructions{
11
+		FLW {
12
+			encoding: imm[11:0]s | rs1[4:0] | b010 | rd[4:0] | b0000111;
13
+			val offs[XLEN] <= X[rs1]+imm;
14
+			F[rd]<=MEM[offs];
15
+		}
16
+		FSW {
17
+			encoding: imm[11:5]s | rs2[4:0] | rs1[4:0] | b010 | imm[4:0]s | b0100111;
18
+			val offs[XLEN] <= X[rs1]+imm;
19
+			MEM[offs]<=F[rs2];
20
+		}
21
+		FMADD.S {
22
+			encoding: rs3[4:0] | b00 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1000011;
23
+			F[rd]f<= F[rs1]f * F[rs2]f * F[rs3]f;
24
+		}
25
+		FMSUB.S {
26
+			encoding: rs3[4:0] | b00 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1000111;
27
+			F[rd]f<=F[rs1]f * F[rs2]f -F[rs3]f;
28
+		}
29
+		FNMSUB.S {
30
+			encoding: rs3[4:0] | b00 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1001011;
31
+			F[rd]f<=-F[rs1]f * F[rs2]f- F[rs3]f;
32
+		}
33
+		FNMADD.S {
34
+			encoding: rs3[4:0] | b00 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1001111;
35
+			F[rd]f<=-F[rs1]f*F[rs2]f+F[rs3]f;
36
+		}
37
+		FADD.S {
38
+			encoding: b0000000 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
39
+			F[rd]f <= F[rs1]f + F[rs2]f;
40
+		}
41
+		FSUB.S {
42
+			encoding: b0000100 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
43
+			F[rd]f <= F[rs1]f - F[rs2]f;
44
+		}
45
+		FMUL.S {
46
+			encoding: b0001000 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
47
+			F[rd]f <= F[rs1]f * F[rs2];
48
+		}
49
+		FDIV.S {
50
+			encoding: b0001100 | rs2[4:0] | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
51
+			F[rd]f <= F[rs1]f / F[rs2]f;
52
+		}
53
+		FSQRT.S {
54
+			encoding: b0101100 | b00000 | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
55
+			F[rd]f<=sqrt(F[rs1]f);
56
+		}
57
+		FSGNJ.S {
58
+			encoding: b0010000 | rs2[4:0] | rs1[4:0] | b000 | rd[4:0] | b1010011;
59
+		}
60
+		FSGNJN.S {
61
+			encoding: b0010000 | rs2[4:0] | rs1[4:0] | b001 | rd[4:0] | b1010011;
62
+		}
63
+		FSGNJX.S {
64
+			encoding: b0010000 | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b1010011;
65
+		}
66
+		FMIN.S  {
67
+			encoding: b0010100 | rs2[4:0] | rs1[4:0] | b000 | rd[4:0] | b1010011;
68
+			F[rd]f<= choose(F[rs1]f<F[rs2]f, F[rs1]f, F[rs2]f);
69
+		}
70
+		FMAX.S {
71
+			encoding: b0010100 | rs2[4:0] | rs1[4:0] | b001 | rd[4:0] | b1010011;
72
+			F[rd]f<= choose(F[rs1]f>F[rs2]f, F[rs1]f, F[rs2]f);
73
+		}
74
+		FCVT.W.S {
75
+			encoding: b1100000 | b00000 | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
76
+		}
77
+		FCVT.WU.S {
78
+			encoding: b1100000 | b00001 | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
79
+		}
80
+		FMV.X.W {
81
+			encoding: b1110000 | b00000 | rs1[4:0] | b000 | rd[4:0] | b1010011;
82
+		}
83
+		FEQ.S {
84
+			encoding: b1010000 | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b1010011;
85
+		}
86
+		FLT.S {
87
+			encoding: b1010000 | rs2[4:0] | rs1[4:0] | b001 | rd[4:0] | b1010011;
88
+		}
89
+		FLE.S {
90
+			encoding: b1010000 | rs2[4:0] | rs1[4:0] | b000 | rd[4:0] | b1010011;
91
+		}
92
+		FCLASS.S {
93
+			encoding: b1110000 | b00000 | rs1[4:0] | b001 | rd[4:0] | b1010011;
94
+		}
95
+		FCVT.S.W {
96
+			encoding: b1101000 | b00000 | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
97
+		}
98
+		FCVT.S.WU {
99
+			encoding: b1101000 | b00001 | rs1[4:0] | rm[2:0] | rd[4:0] | b1010011;
100
+		}
101
+		FMV.W.X {
102
+			encoding: b1111000 | b00000 | rs1[4:0] | b000 | rd[4:0] | b1010011;
103
+		}
104
+	}
105
+}

+ 308
- 0
riscv/src/RV32IBase.core_desc View File

@@ -0,0 +1,308 @@
1
+InsructionSet RV32IBase {
2
+	constants {
3
+		XLEN,
4
+		XLEN_BIT_MASK,
5
+		PCLEN,
6
+		fence,
7
+		fencei,
8
+		fencevmal,
9
+		fencevmau
10
+	}
11
+	
12
+	address_spaces { 
13
+		MEM[8], CSR[XLEN], FENCE[XLEN]
14
+	}
15
+				
16
+	registers { 
17
+		[31:0]   X[XLEN],
18
+                PC[XLEN](is_pc)
19
+	}
20
+	 
21
+	instructions { 
22
+		LUI{
23
+		    encoding: imm[31:12]s | rd[4:0] | b0110111;
24
+		    args_disass: "x%rd$d, 0x%imm$05x";
25
+		    if(rd!=0) X[rd] <= imm;
26
+		}
27
+		AUIPC{
28
+		    encoding: imm[31:12]s | rd[4:0] | b0010111;
29
+		    args_disass: "x%rd%, 0x%imm$08x";
30
+		    if(rd!=0) X[rd] <= PC+imm;
31
+		}
32
+	    JAL(no_cont){
33
+    		encoding: imm[20:20]s | imm[10:1]s | imm[11:11]s | imm[19:12]s | rd[4:0] | b1101111;
34
+		    args_disass: "x%rd$d, 0x%imm$x";
35
+    		if(rd!=0) X[rd] <= PC+4;
36
+    		PC<=PC+imm;
37
+		}
38
+	    JALR(no_cont){
39
+	    	encoding: imm[11:0]s | rs1[4:0] | b000 | rd[4:0] | b1100111;
40
+		    args_disass: "x%rd$d, x%rs1$d, 0x%imm$x";
41
+    		if(rd!=0) X[rd] <= PC+4;
42
+    		val ret[XLEN] <= X[rs1]+ imm;
43
+    		PC<=ret& ~0x1;
44
+	    }
45
+		BEQ(no_cont){
46
+		    encoding: imm[12:12]s |imm[10:5]s | rs2[4:0] | rs1[4:0] | b000 | imm[4:1]s | imm[11:11]s | b1100011;
47
+		    args_disass:"x%rs1$d, x%rs2$d, 0x%imm$x";
48
+		    PC<=choose(X[rs1]==X[rs2], PC+imm, PC+4);
49
+		}
50
+		BNE(no_cont){
51
+		    encoding: imm[12:12]s |imm[10:5]s | rs2[4:0] | rs1[4:0] | b001 | imm[4:1]s | imm[11:11]s | b1100011;
52
+		    args_disass:"x%rs1$d, x%rs2$d, 0x%imm$x";
53
+	    	PC<=choose(X[rs1]!=X[rs2], PC+imm, PC+4);
54
+		}
55
+		BLT(no_cont){
56
+		    encoding: imm[12:12]s |imm[10:5]s | rs2[4:0] | rs1[4:0] | b100 | imm[4:1]s | imm[11:11]s | b1100011;
57
+		    args_disass:"x%rs1$d, x%rs2$d, 0x%imm$x";
58
+	    	PC<=choose(X[rs1]s<X[rs2]s, PC+imm, PC+4);
59
+		}
60
+		BGE(no_cont) {
61
+		    encoding: imm[12:12]s |imm[10:5]s | rs2[4:0] | rs1[4:0] | b101 | imm[4:1]s | imm[11:11]s | b1100011;
62
+		    args_disass:"x%rs1$d, x%rs2$d, 0x%imm$x";
63
+	    	PC<=choose(X[rs1]s>=X[rs2]s, PC+imm, PC+4);
64
+		}
65
+		BLTU(no_cont) {
66
+		    encoding: imm[12:12]s |imm[10:5]s | rs2[4:0] | rs1[4:0] | b110 | imm[4:1]s | imm[11:11]s | b1100011;
67
+		    args_disass:"x%rs1$d, x%rs2$d, 0x%imm$x";
68
+	    	PC<=choose(X[rs1]<X[rs2],PC+imm, PC+4);
69
+		}
70
+		BGEU(no_cont) {
71
+		    encoding: imm[12:12]s |imm[10:5]s | rs2[4:0] | rs1[4:0] | b111 | imm[4:1]s | imm[11:11]s | b1100011;
72
+		    args_disass:"x%rs1$d, x%rs2$d, 0x%imm$x";
73
+	    	PC<=choose(X[rs1]>=X[rs2], PC+imm, PC+4);
74
+		}
75
+		LB {
76
+		    encoding: imm[11:0]s | rs1[4:0] | b000 | rd[4:0] | b0000011;
77
+		    args_disass:"x%rd$d, %imm%(x%rs1$d)";
78
+		    val offs[XLEN] <= X[rs1]+imm;
79
+		    if(rd!=0) X[rd]<=sext(MEM[offs]);
80
+		}
81
+		LH {
82
+		    encoding: imm[11:0]s | rs1[4:0] | b001 | rd[4:0] | b0000011;
83
+		    args_disass:"x%rd$d, %imm%(x%rs1$d)";
84
+		    val offs[XLEN] <= X[rs1]+imm;
85
+		    if(rd!=0) X[rd]<=sext(MEM[offs]{16});		    
86
+		}
87
+		LW {
88
+		    encoding: imm[11:0]s | rs1[4:0] | b010 | rd[4:0] | b0000011;
89
+		    args_disass:"x%rd$d, %imm%(x%rs1$d)";
90
+		    val offs[XLEN] <= X[rs1]+imm;
91
+		    if(rd!=0) X[rd]<=sext(MEM[offs]{32});
92
+		}
93
+		LBU {
94
+		    encoding: imm[11:0]s | rs1[4:0] | b100 | rd[4:0] | b0000011;
95
+		    args_disass:"x%rd$d, %imm%(x%rs1$d)";
96
+		    val offs[XLEN] <= X[rs1]+imm;
97
+		    if(rd!=0) X[rd]<=zext(MEM[offs]);
98
+		}
99
+		LHU {
100
+		    encoding: imm[11:0]s | rs1[4:0] | b101 | rd[4:0] | b0000011;
101
+		    args_disass:"x%rd$d, %imm%(x%rs1$d)";
102
+		    val offs[XLEN] <= X[rs1]+imm;
103
+		    if(rd!=0) X[rd]<=zext(MEM[offs]{16});		    
104
+		}
105
+		SB {
106
+		    encoding: imm[11:5]s | rs2[4:0] | rs1[4:0] | b000 | imm[4:0]s | b0100011;
107
+		    args_disass:"x%rs2$d, %imm%(x%rs1$d)";
108
+	    	val offs[XLEN] <= X[rs1] + imm;
109
+	    	MEM[offs] <= X[rs2];
110
+		}
111
+		SH {
112
+		    encoding: imm[11:5]s | rs2[4:0] | rs1[4:0] | b001 | imm[4:0]s | b0100011;
113
+		    args_disass:"x%rs2$d, %imm%(x%rs1$d)";
114
+	    	val offs[XLEN] <= X[rs1] + imm;
115
+	    	MEM[offs]{16} <= X[rs2];
116
+		}
117
+	    SW {
118
+	    	encoding: imm[11:5]s | rs2[4:0] | rs1[4:0] | b010 | imm[4:0]s | b0100011;
119
+		    args_disass:"x%rs2$d, %imm%(x%rs1$d)";
120
+	    	val offs[XLEN] <= X[rs1] + imm;
121
+	    	MEM[offs]{32} <= X[rs2];
122
+	    }
123
+		ADDI {
124
+			encoding: imm[11:0]s | rs1[4:0] | b000 | rd[4:0] | b0010011;
125
+		    args_disass:"x%rd$d, x%rs1$d, %imm%";
126
+			if(rd != 0) X[rd] <= X[rs1] + imm;
127
+		}
128
+		SLTI {
129
+			encoding: imm[11:0]s | rs1[4:0] | b010 | rd[4:0] | b0010011;
130
+		    args_disass:"x%rd$d, x%rs1$d, %imm%";
131
+			if (rd != 0) X[rd] <= choose(X[rs1]s < imm's, 1, 0); //TODO: needs fix
132
+		}
133
+	    SLTIU {
134
+	        encoding: imm[11:0]s | rs1[4:0] | b011 | rd[4:0] | b0010011;
135
+		    args_disass:"x%rd$d, x%rs1$d, %imm%";
136
+		    val full_imm[XLEN] <= imm's;
137
+	        if (rd != 0) X[rd] <= choose(X[rs1]'u < full_imm'u, 1, 0);
138
+	    }
139
+		XORI {
140
+			encoding: imm[11:0]s | rs1[4:0] | b100 | rd[4:0] | b0010011;
141
+		    args_disass:"x%rd$d, x%rs1$d, %imm%";
142
+			if(rd != 0) X[rd] <= X[rs1] ^ imm;
143
+		}
144
+		ORI {
145
+			encoding: imm[11:0]s | rs1[4:0] | b110 | rd[4:0] | b0010011;
146
+		    args_disass:"x%rd$d, x%rs1$d, %imm%";
147
+			if(rd != 0) X[rd] <= X[rs1] | imm;
148
+		}
149
+		ANDI {
150
+			encoding: imm[11:0]s | rs1[4:0] | b111 | rd[4:0] | b0010011;
151
+		    args_disass:"x%rd$d, x%rs1$d, %imm%";
152
+			if(rd != 0) X[rd] <= X[rs1] & imm;
153
+		}
154
+		SLLI {
155
+		    encoding: b0000000 | shamt[4:0] | rs1[4:0] | b001 | rd[4:0] | b0010011;
156
+		    args_disass:"x%rd$d, x%rs1$d, %shamt%";
157
+		    if(rd != 0) X[rd] <= shll(X[rs1], shamt);
158
+		}
159
+		SRLI {
160
+		    encoding: b0000000 | shamt[4:0] | rs1[4:0] | b101 | rd[4:0] | b0010011;
161
+		    args_disass:"x%rd$d, x%rs1$d, %shamt%";
162
+		    if(rd != 0) X[rd] <= shrl(X[rs1], shamt);
163
+		}
164
+		SRAI {
165
+		    encoding: b0100000 | shamt[4:0] | rs1[4:0] | b101 | rd[4:0] | b0010011;
166
+		    args_disass:"x%rd$d, x%rs1$d, %shamt%";
167
+		    if(rd != 0) X[rd] <= shra(X[rs1], shamt);
168
+		}
169
+		ADD {
170
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b000 | rd[4:0] | b0110011;
171
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
172
+			if(rd != 0) X[rd] <= X[rs1] + X[rs2];
173
+		}
174
+		SUB {
175
+		    encoding: b0100000 | rs2[4:0] | rs1[4:0] | b000 | rd[4:0] | b0110011;
176
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
177
+			if(rd != 0) X[rd] <= X[rs1] - X[rs2];
178
+		}
179
+		SLL {
180
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b001 | rd[4:0] | b0110011;
181
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
182
+		    if(rd != 0) X[rd] <= shll(X[rs1], X[rs2]&XLEN_BIT_MASK);
183
+		}
184
+		SLT {
185
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b010 | rd[4:0] | b0110011;
186
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
187
+	        if (rd != 0) X[rd] <= choose(X[rs1]s < X[rs2]s, 1, 0);
188
+		}
189
+		SLTU {
190
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b011 | rd[4:0] | b0110011;
191
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
192
+	        if (rd != 0) X[rd] <= choose(zext(X[rs1]) < zext(X[rs2]), 1, 0);
193
+		}
194
+		XOR {
195
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b100 | rd[4:0] | b0110011;
196
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
197
+			if(rd != 0) X[rd] <= X[rs1] ^ X[rs2];
198
+		}
199
+		SRL {
200
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b101 | rd[4:0] | b0110011;
201
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
202
+		    if(rd != 0) X[rd] <= shrl(X[rs1], X[rs2]&XLEN_BIT_MASK);
203
+		}
204
+		SRA {
205
+		    encoding: b0100000 | rs2[4:0] | rs1[4:0] | b101 | rd[4:0] | b0110011;
206
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
207
+		    if(rd != 0) X[rd] <= shra(X[rs1], X[rs2]&XLEN_BIT_MASK);
208
+		}
209
+		OR {
210
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b110 | rd[4:0] | b0110011;
211
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
212
+			if(rd != 0) X[rd] <= X[rs1] | X[rs2];
213
+		}
214
+		AND {
215
+		    encoding: b0000000 | rs2[4:0] | rs1[4:0] | b111 | rd[4:0] | b0110011;
216
+		    args_disass:"x%rd$d, x%rs1$d, x%rs2$d";
217
+			if(rd != 0) X[rd] <= X[rs1] & X[rs2];
218
+		}
219
+		FENCE {
220
+			encoding: b0000 | pred[3:0] | succ[3:0] | rs1[4:0] | b000 | rd[4:0] | b0001111;
221
+		    FENCE[fence] <= pred<<4 | succ;
222
+		}
223
+		FENCE_I(flush) {
224
+		    encoding: imm[11:0] | rs1[4:0] | b001 | rd[4:0] | b0001111 ;
225
+		    FENCE[fencei] <= imm;
226
+		}
227
+		ECALL(no_cont) {
228
+		    encoding: b000000000000 | b00000 | b000 | b00000 | b1110011;
229
+		    raise(0, 11);
230
+		}
231
+		EBREAK(no_cont) {
232
+		    encoding: b000000000001 | b00000 | b000 | b00000 | b1110011;
233
+		    raise(0, 3);