add script as intermediate for code generation

This commit is contained in:
Eyck Jentzsch 2020-12-29 09:43:01 +00:00
parent 79dabe92c0
commit cfec35900c
3 changed files with 22 additions and 2 deletions

View File

@ -21,7 +21,7 @@ if {![info exists ::env(PROJECT)] && [file exists $::env(HOME)/.sdkman/candidate
} }
if {![info exists ::env(PROJECT)] && [file exists $::env(HOME)/.sdkman/candidates/maven/3.6.3] != 1} { if {![info exists ::env(PROJECT)] && [file exists $::env(HOME)/.sdkman/candidates/maven/3.6.3] != 1} {
puts stderr "Please install sbt via 'sdk install maven 3.6.3'!" puts stderr "Please install mvn via 'sdk install maven 3.6.3'!"
prereq maven/3.6.3 prereq maven/3.6.3
} else { } else {
prepend-path PATH $::env(HOME)/.sdkman/candidates/sbt/1.4.4/bin prepend-path PATH $::env(HOME)/.sdkman/candidates/sbt/1.4.4/bin

@ -1 +1 @@
Subproject commit 303d3d4b0466cc0df278684100dfdc5567a87c51 Subproject commit 516ff37f81ff201f00715b077cede2ba87b3bafb

20
generate.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/nash
##
export JAVA_OPTS="--add-modules ALL-SYSTEM --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED"
GENERATOR="java $JAVA_OPTS -jar coredsl/plugins/com.minres.coredsl.generator.standalone/target/com.minres.coredsl.generator-1.0.0-SNAPSHOT.jar"
CORE_NAME='-c TGF_C'
REPO_DIR=tgfs/gen_input/CoreDSL-Instruction-Set-Description
TMPL_DIR=tgfs/gen_input/templates/interp
INPUT_FILE=tgfs/gen_input/TGFS.core_desc
MAPPING=""
MAPPING="$MAPPING -m ${TMPL_DIR}/incl-CORENAME.h.gtl->tgfs/incl/iss/arch/tgf_c.h"
MAPPING="$MAPPING -m ${TMPL_DIR}/src-CORENAME.cpp.gtl->tgfs/src/iss/tgf_c.cpp"
MAPPING="$MAPPING -m ${TMPL_DIR}/vm-vm_CORENAME.cpp.gtl->tgfs/src/vm/interp/vm_tgf_c.cpp"
[ -f coredsl/plugins/com.minres.coredsl.generator.standalone/target/com.minres.coredsl.generator-1.0.0-SNAPSHOT.jar ] || (cd coredsl; mvn package)
$GENERATOR $CORE_NAME -r $REPO_DIR $MAPPING $INPUT_FILE