Commit a09dbe89 authored by Jens Korinth's avatar Jens Korinth
Browse files

Release 2017.2

Merge remote-tracking branch 'origin/2017.2'
parents 48b243c4 35e3bcc8
Pipeline #70 passed with stage
in 3 minutes and 2 seconds
...@@ -39,3 +39,7 @@ boot/zedboard ...@@ -39,3 +39,7 @@ boot/zedboard
boot/rootfs.img boot/rootfs.img
boot/uenv/uEnv-pynq.txt boot/uenv/uEnv-pynq.txt
project/build.properties project/build.properties
bin/itapasco
bin/tapasco
bin/tapasco-logviewer
bin/tapasco-reportviewer
# This file is a template, and might need editing before it works on your project.
# Official Java image. Look for the different tagged releases at
# https://hub.docker.com/r/library/java/tags/ . A Java image is not required
# but an image with a JVM speeds up the build a bit.
image: java:8
before_script:
# Enable the usage of sources over https
- apt-get update -yqq
- apt-get install apt-transport-https zip -yqq
# Add keyserver for SBT
- echo "deb http://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
# Install SBT
- curl -s "https://get.sdkman.io" | bash
- source "/root/.sdkman/bin/sdkman-init.sh"
- sdk install sbt
# Log the sbt version
- sbt version
test:
script:
# Execute your project's tests
- source setup.sh
- sbt clean test
...@@ -16,7 +16,7 @@ Prerequisites ...@@ -16,7 +16,7 @@ Prerequisites
------------- -------------
To use TaPaSCo, you'll need working installations of To use TaPaSCo, you'll need working installations of
* Vivado Design Suite 2016.2 or newer * Vivado Design Suite 2016.3 or newer
* Java SDK 7+ * Java SDK 7+
* sbt 0.13.x * sbt 0.13.x
* git * git
...@@ -24,7 +24,7 @@ To use TaPaSCo, you'll need working installations of ...@@ -24,7 +24,7 @@ To use TaPaSCo, you'll need working installations of
If you want to use the High-Level Synthesis flow for generating custom IP If you want to use the High-Level Synthesis flow for generating custom IP
cores, you'll also need: cores, you'll also need:
* Vivado HLS 2016.2+ * Vivado HLS 2016.3+
Check that at least the following are in your `$PATH`: Check that at least the following are in your `$PATH`:
......
...@@ -117,6 +117,13 @@ namespace eval arch { ...@@ -117,6 +117,13 @@ namespace eval arch {
return $insts return $insts
} }
# Retrieve AXI-MM interfaces of given instance of kernel kind and mode.
proc get_aximm_interfaces {kind inst {mode "Master"}} {
set name [format "target_ip_%02d_%03d" $kind $inst]
puts "Retrieving list of slave interfaces for $name ..."
return [tapasco::get_aximm_interfaces [get_bd_cell -hier -filter "NAME == $name"] $mode]
}
# Instantiates the memory interconnect hierarchy. # Instantiates the memory interconnect hierarchy.
proc arch_create_mem_interconnects {composition outs} { proc arch_create_mem_interconnects {composition outs} {
variable arch_mem_ports variable arch_mem_ports
...@@ -132,8 +139,22 @@ namespace eval arch { ...@@ -132,8 +139,22 @@ namespace eval arch {
set masters [tapasco::get_aximm_interfaces $example] set masters [tapasco::get_aximm_interfaces $example]
set ic_m [expr "$ic_m + [llength $masters] * $no_inst"] set ic_m [expr "$ic_m + [llength $masters] * $no_inst"]
set masters_32b [get_bd_intf_pins -of_objects $example -filter { MODE == "Master" && VLNV == "xilinx.com:interface:aximm_rtl:1.0" && CONFIG.DATA_WIDTH == 32 }] set masters_32b {}
set masters_64b [get_bd_intf_pins -of_objects $example -filter { MODE == "Master" && VLNV == "xilinx.com:interface:aximm_rtl:1.0" && CONFIG.DATA_WIDTH == 64 }] set masters_64b {}
set masters_oth {}
foreach m $masters {
set dw [tapasco::get_aximm_property CONFIG.DATA_WIDTH $m]
if {$dw == 64} {
lappend masters_64b $m
} else {
if {$dw == 32} {
lappend masters_32b $m
} else {
lappend masters_oth $m
}
}
}
set m32 [expr "$m32 + [llength $masters_32b] * $no_inst"] set m32 [expr "$m32 + [llength $masters_32b] * $no_inst"]
set m64 [expr "$m64 + [llength $masters_64b] * $no_inst"] set m64 [expr "$m64 + [llength $masters_64b] * $no_inst"]
} }
......
#
# Copyright (C) 2017 Jens Korinth, TU Darmstadt
#
# This file is part of Tapasco (TPC).
#
# Tapasco is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Tapasco is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Tapasco. If not, see <http://www.gnu.org/licenses/>.
#
# @file mb_shifter.tcl
# @brief Plugin to insert the MicroBlaze Debug Module (MDM) for all DEBUG ports
# found in the Architecture.
# @author J. Korinth, TU Darmstadt (jk@esa.cs.tu-darmstadt.de)
#
namespace eval debug {
proc debug_feature {args} {
if {[tapasco::is_feature_enabled "Debug"]} {
# set defaults
set depth 1024
set stages 0
set interfaces {}
set debug [tapasco::get_feature "Debug"]
dict with debug {
set num_ifs [llength $interfaces]
if {$num_ifs > 0} {
set i 0
foreach ifs $interfaces {
if {[llength $ifs] == 3} {
set s_ila [tapasco::createSystemILA "SILA_$i" $num_ifs $depth $stages]
puts " ifs = $ifs"
set intf [get_bd_intf_pins [lindex $ifs 0]]
set clk [get_bd_pins [lindex $ifs 1]]
set rst [get_bd_pins [lindex $ifs 2]]
puts " connecting $intf to port #$i, clock to $clk, reset to $rst ..."
connect_bd_intf_net $intf [get_bd_intf_pins "$s_ila/SLOT_${i}_AXI"]
connect_bd_net $clk [get_bd_pins -of_objects $s_ila -filter {TYPE == clk && DIR == I}]
connect_bd_net $rst [get_bd_pins -of_objects $s_ila -filter {TYPE == rst && DIR == I}]
incr i
} else {
error "expected three elements for debugging interface: interface, clock and reset; found: $ifs"
}
}
}
}
}
}
}
tapasco::register_plugin "arch::debug::debug_feature" "post-bd"
...@@ -26,7 +26,7 @@ namespace eval full_axi_wrapper { ...@@ -26,7 +26,7 @@ namespace eval full_axi_wrapper {
# check interfaces: AXI3/AXI4 slaves will be wrappped # check interfaces: AXI3/AXI4 slaves will be wrappped
set inst [get_bd_cells $inst] set inst [get_bd_cells $inst]
set full_slave_ifs [get_bd_intf_pins -of_objects $inst -filter {MODE == Slave && (CONFIG.PROTOCOL == AXI3 || CONFIG.PROTOCOL == AXI4)}] set full_slave_ifs [get_bd_intf_pins -of_objects $inst -filter {MODE == Slave && (CONFIG.PROTOCOL == AXI3 || CONFIG.PROTOCOL == AXI4)}]
if {[llength $full_slave_ifs] > 1} { error "full_axi_wrapper plugin: Found [llength $full_slave_ifs] full slave interfaces, this is not supported at the moment" } # if {[llength $full_slave_ifs] > 1} { error "full_axi_wrapper plugin: Found [llength $full_slave_ifs] full slave interfaces, this is not supported at the moment" }
if {[llength $full_slave_ifs] > 0} { if {[llength $full_slave_ifs] > 0} {
puts " IP has full slaves, will add protocol converter" puts " IP has full slaves, will add protocol converter"
puts " found full slave interfaces: $full_slave_ifs" puts " found full slave interfaces: $full_slave_ifs"
...@@ -39,12 +39,27 @@ namespace eval full_axi_wrapper { ...@@ -39,12 +39,27 @@ namespace eval full_axi_wrapper {
move_bd_cells $group $inst move_bd_cells $group $inst
set ninst [get_bd_cells $group/internal_$name] set ninst [get_bd_cells $group/internal_$name]
current_bd_instance $group current_bd_instance $group
# create slave ports # rewire full slaves
set saxi_port [create_bd_intf_pin -vlnv "xilinx.com:interface:aximm_rtl:1.0" -mode Slave "S_AXI_LITE"] set si 0
set conv [tapasco::createProtocolConverter "conv" "AXI4LITE" [get_property CONFIG.PROTOCOL $full_slave_ifs]] foreach fs $full_slave_ifs {
connect_bd_intf_net $saxi_port [get_bd_intf_pins -of_objects $conv -filter {MODE == Slave}] # create slave port
connect_bd_intf_net [get_bd_intf_pins -filter {MODE == Master} -of_objects $conv] $full_slave_ifs set saxi_port [create_bd_intf_pin -vlnv "xilinx.com:interface:aximm_rtl:1.0" -mode Slave "S_AXI_LITE_$si"]
set conv [tapasco::createProtocolConverter "conv_$si" "AXI4LITE" [get_property CONFIG.PROTOCOL $fs]]
connect_bd_intf_net $saxi_port [get_bd_intf_pins -of_objects $conv -filter {MODE == Slave}]
connect_bd_intf_net [get_bd_intf_pins -filter {MODE == Master} -of_objects $conv] $fs
incr si
}
# bypass existing AXI4Lite slaves
set lite_ports [list]
set lites [get_bd_intf_pins -of_objects $inst -filter {MODE == Slave && CONFIG.PROTOCOL == AXI4LITE}]
foreach ls $lites {
set op [create_bd_intf_pin -vlnv "xilinx.com:interface:aximm_rtl:1.0" -mode Slave [get_property NAME $ls]]
connect_bd_intf_net $op $ls
lappend lite_ports $ls
}
puts "lite_ports = $lite_ports"
# create master ports # create master ports
set maxi_ports [list] set maxi_ports [list]
...@@ -57,7 +72,7 @@ namespace eval full_axi_wrapper { ...@@ -57,7 +72,7 @@ namespace eval full_axi_wrapper {
# create clock and reset ports # create clock and reset ports
set clks [get_bd_pins -filter {DIR == I && TYPE == clk} -of_objects [get_bd_cells $group/*]] set clks [get_bd_pins -filter {DIR == I && TYPE == clk} -of_objects [get_bd_cells $group/*]]
set rsts [get_bd_pins -filter {DIR == I && TYPE == rst} -of_objects [get_bd_cells $group/*]] set rsts [get_bd_pins -filter {DIR == I && TYPE == rst && CONFIG.POLARITY == ACTIVE_LOW} -of_objects [get_bd_cells $group/*]]
set clk [create_bd_pin -type clk -dir I "aclk"] set clk [create_bd_pin -type clk -dir I "aclk"]
set rst [create_bd_pin -type rst -dir I "aresetn"] set rst [create_bd_pin -type rst -dir I "aresetn"]
...@@ -72,6 +87,11 @@ namespace eval full_axi_wrapper { ...@@ -72,6 +87,11 @@ namespace eval full_axi_wrapper {
} }
return [list $inst $args] return [list $inst $args]
} }
proc fix_address_map {} {
assign_bd_address
}
} }
tapasco::register_plugin "arch::full_axi_wrapper::wrap_full_axi_interfaces" "post-pe-create" tapasco::register_plugin "arch::full_axi_wrapper::wrap_full_axi_interfaces" "post-pe-create"
tapasco::register_plugin "arch::full_axi_wrapper::fix_address_map" "pre-platform"
...@@ -100,6 +100,31 @@ tapasco_res_t tapasco_scheduler_launch( ...@@ -100,6 +100,31 @@ tapasco_res_t tapasco_scheduler_launch(
LOG(LALL_SCHEDULER, "job %lu: read result value 0x%08lx", LOG(LALL_SCHEDULER, "job %lu: read result value 0x%08lx",
(unsigned long)j_id, (unsigned long)ret); (unsigned long)j_id, (unsigned long)ret);
// Read back values from all argument registers
for (uint32_t a = 0; a < num_args; ++a) {
tapasco_handle_t h = tapasco_address_map_func_arg_register(
dev_ctx,
slot_id,
a);
int const is64 = tapasco_jobs_is_arg_64bit(jobs, j_id, a);
if (is64) {
uint64_t v = 0;
if (platform_read_ctl(h, sizeof(v), &v, PLATFORM_CTL_FLAGS_NONE) != PLATFORM_SUCCESS)
return TAPASCO_FAILURE;
LOG(LALL_SCHEDULER, "job %lu: reading 64b arg #%u = 0x%08lx from 0x%08x",
(unsigned long)j_id, a, (unsigned long)v, (unsigned)h);
tapasco_jobs_set_arg(jobs, j_id, a, sizeof(v), &v);
} else {
uint32_t v = 0;
if (platform_read_ctl(h, sizeof(v), &v, PLATFORM_CTL_FLAGS_NONE) != PLATFORM_SUCCESS)
return TAPASCO_FAILURE;
LOG(LALL_SCHEDULER, "job %lu: reading 32b arg #%u = 0x%08lx from 0x%08x",
(unsigned long)j_id, a, (unsigned long)v, (unsigned)h);
tapasco_jobs_set_arg(jobs, j_id, a, sizeof(v), &v);
}
}
// ack the interrupt // ack the interrupt
if (platform_write_ctl(tapasco_address_map_func_reg(dev_ctx, slot_id, if (platform_write_ctl(tapasco_address_map_func_reg(dev_ctx, slot_id,
TAPASCO_FUNC_REG_IAR), sizeof(start_cmd), &start_cmd, TAPASCO_FUNC_REG_IAR), sizeof(start_cmd), &start_cmd,
......
//
// Copyright (C) 2017 Jens Korinth, TU Darmstadt
//
// This file is part of Tapasco (TPC).
//
// Tapasco is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tapasco is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with Tapasco. If not, see <http://www.gnu.org/licenses/>.
//
/** /**
* @file tapasco_benchmark.cpp * @file tapasco_benchmark.cpp
* @brief Benchmark application that generates a JSON file containing * @brief Benchmark application that generates a JSON file containing
......
//
// Copyright (C) 2017 Jens Korinth, TU Darmstadt
//
// This file is part of Tapasco (TPC).
//
// Tapasco is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tapasco is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with Tapasco. If not, see <http://www.gnu.org/licenses/>.
//
/** /**
* @file tapasco_debug.cpp * @file tapasco_debug.cpp
* @brief A TPC Debugging application. * @brief A TPC Debugging application.
......
#!/bin/bash
java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -splash:$TAPASCO_HOME/icon/tapasco_icon.png -jar $TAPASCO_HOME/target/scala-2.12/Tapasco-2017.1.jar itapasco $*
#!/bin/bash
java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -jar $TAPASCO_HOME/target/scala-2.12/Tapasco-2017.1.jar $*
...@@ -12,7 +12,7 @@ parser.add_argument('--verbose', help='verbose output (default: %(default)s)', a ...@@ -12,7 +12,7 @@ parser.add_argument('--verbose', help='verbose output (default: %(default)s)', a
args = parser.parse_args() args = parser.parse_args()
if not os.path.exists(args.bitstream): if not os.path.exists(args.bitstream):
sys.exit('ERROR: {0} does could not be opened'.format(args.bitstream)) sys.exit('ERROR: {0} could not be opened'.format(args.bitstream))
if not 'TAPASCO_PLATFORM' in os.environ: if not 'TAPASCO_PLATFORM' in os.environ:
print('Environment variable TAPASCO_PLATFORM is not set, guessing Platform ...') print('Environment variable TAPASCO_PLATFORM is not set, guessing Platform ...')
......
#!/bin/bash
JAVA_OPT="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
cd $TAPASCO_HOME && sbt "logviewer $*"
#!/bin/bash
JAVA_OPT="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
cd $TAPASCO_HOME && sbt "reportviewer $*"
#!/bin/bash #!/bin/bash -x
BOARD=${1:-zedboard} BOARD=${1:-zedboard}
VERSION=${2:-2016.4} VERSION=${2:-2016.4}
IMGSIZE=${3:-8192} IMGSIZE=${3:-8192}
...@@ -387,9 +387,11 @@ EOF ...@@ -387,9 +387,11 @@ EOF
fi fi
echo "Unmounting image in $LOOPDEV ..." echo "Unmounting image in $LOOPDEV ..."
dusudo losetup -d $LOOPDEV dusudo losetup -d $LOOPDEV
dusudo sync
echo "Mounting partitions in $OUTPUT_IMAGE ..." echo "Mounting partitions in $OUTPUT_IMAGE ..."
dusudo kpartx -a $OUTPUT_IMAGE || dusudo kpartx -av $OUTPUT_IMAGE ||
return $(error_ret "$LINENO: could not kpartx -a $OUTPUT_IMAGE") return $(error_ret "$LINENO: could not kpartx -a $OUTPUT_IMAGE")
sleep 3
LD=`basename $LOOPDEV` LD=`basename $LOOPDEV`
LD1=${LD}p1 LD1=${LD}p1
LD2=${LD}p2 LD2=${LD}p2
...@@ -468,7 +470,7 @@ copy_files_to_root () { ...@@ -468,7 +470,7 @@ copy_files_to_root () {
dusudo sh -c "echo $BOARD > $TO/etc/hostname" || dusudo sh -c "echo $BOARD > $TO/etc/hostname" ||
echo >&2 "$LINENO: WARNING: could not set hostname" echo >&2 "$LINENO: WARNING: could not set hostname"
echo "Updating /etc/hosts ..." echo "Updating /etc/hosts ..."
dusudo sed -i "s/pynq/$BOARD/g" $TO/etc/hosts || dusudo sh -c "sed -i "s/pynq/$BOARD/g" $TO/etc/hosts" ||
echo >&2 "$LINENO: WARNING: could not update /etc/hosts" echo >&2 "$LINENO: WARNING: could not update /etc/hosts"
echo "Setting env vars ... " echo "Setting env vars ... "
dusudo sh -c "echo export LINUX_HOME=/linux-xlnx >> $TO/home/xilinx/.bashrc" || dusudo sh -c "echo export LINUX_HOME=/linux-xlnx >> $TO/home/xilinx/.bashrc" ||
...@@ -513,6 +515,7 @@ check_image_tools ...@@ -513,6 +515,7 @@ check_image_tools
check_sdcard check_sdcard
read -p "Enter sudo password: " -s SUDOPW read -p "Enter sudo password: " -s SUDOPW
[[ -n $SUDOPW ]] || error_exit "dusudo password may not be empty" [[ -n $SUDOPW ]] || error_exit "dusudo password may not be empty"
dusudo true || error_exit "sudo password seems to be wrong?"
mkdir -p $LOGDIR 2> /dev/null mkdir -p $LOGDIR 2> /dev/null
mkdir -p `dirname $PYNQ_IMAGE` 2> /dev/null mkdir -p `dirname $PYNQ_IMAGE` 2> /dev/null
echo "And so it begins ..." echo "And so it begins ..."
...@@ -587,7 +590,7 @@ extract_pynq_rootfs &> $EXTRACT_RFS_LOG ...@@ -587,7 +590,7 @@ extract_pynq_rootfs &> $EXTRACT_RFS_LOG
echo "Building image in $OUTPUT_IMAGE (output in $BUILD_OUTPUT_IMAGE_LOG) ..." echo "Building image in $OUTPUT_IMAGE (output in $BUILD_OUTPUT_IMAGE_LOG) ..."
build_output_image $IMGSIZE &> $BUILD_OUTPUT_IMAGE_LOG build_output_image $IMGSIZE &> $BUILD_OUTPUT_IMAGE_LOG
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
# rm -f $OUTPUT_IMAGE &> /dev/null rm -f $OUTPUT_IMAGE &> /dev/null
error_exit "Building output image failed, check log: $BUILD_OUTPUT_IMAGE_LOG" error_exit "Building output image failed, check log: $BUILD_OUTPUT_IMAGE_LOG"
fi fi
echo "SD card image ready: $OUTPUT_IMAGE" echo "SD card image ready: $OUTPUT_IMAGE"
......
val tapascoVersion = "2017.1" val tapascoVersion = "2017.2"
organization := "de.tu_darmstadt.esa.cs" organization := "de.tu_darmstadt.esa.cs"
...@@ -6,25 +6,24 @@ version := tapascoVersion ...@@ -6,25 +6,24 @@ version := tapascoVersion
name := "Tapasco" name := "Tapasco"
scalaVersion := "2.12.1" scalaVersion := "2.12.4"
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value, "org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value, "org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang.modules" % "scala-swing_2.12" % "2.0.0", "org.scala-lang.modules" % "scala-swing_2.12" % "2.0.1",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4", "com.typesafe.play" %% "play-json" % "2.6.7" exclude ("ch.qos.logback", "logback-classic"),
"com.typesafe.play" %% "play-json" % "2.6.0-M3" exclude ("ch.qos.logback", "logback-classic"),
"org.jfree" % "jfreechart" % "1.0.19", "org.jfree" % "jfreechart" % "1.0.19",
"org.slf4j" % "slf4j-api" % "1.7.22", "org.slf4j" % "slf4j-api" % "1.7.25",
"ch.qos.logback" % "logback-classic" % "1.2.1", "ch.qos.logback" % "logback-classic" % "1.2.3",
"net.sf.jung" % "jung-api" % "2.1.1", "net.sf.jung" % "jung-api" % "2.1.1",
"net.sf.jung" % "jung-visualization" % "2.1.1", "net.sf.jung" % "jung-visualization" % "2.1.1",
"net.sf.jung" % "jung-graph-impl" % "2.1.1", "net.sf.jung" % "jung-graph-impl" % "2.1.1",
"com.google.guava" % "guava" % "19.0", "com.google.guava" % "guava" % "19.0",
"com.google.code.findbugs" % "jsr305" % "3.0.1", "com.google.code.findbugs" % "jsr305" % "3.0.1",
"org.scalatest" %% "scalatest" % "3.0.3" % "test", "org.scalatest" %% "scalatest" % "3.0.4" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.5" % "test", "org.scalacheck" %% "scalacheck" % "1.13.5" % "test",
"com.lihaoyi" %% "fastparse" % "0.4.3" "com.lihaoyi" %% "fastparse" % "1.0.0"
) )
scalacOptions ++= Seq( scalacOptions ++= Seq(
...@@ -37,6 +36,9 @@ scalacOptions ++= Seq( ...@@ -37,6 +36,9 @@ scalacOptions ++= Seq(
) )
scalacOptions in Compile ++= Seq( scalacOptions in Compile ++= Seq(
"-opt:inline",
"-opt:l:inline",
"-opt-inline-from",
"-opt:unreachable-code", "-opt:unreachable-code",
"-opt:simplify-jumps", "-opt:simplify-jumps",
"-opt:compact-locals", "-opt:compact-locals",
...@@ -44,8 +46,7 @@ scalacOptions in Compile ++= Seq( ...@@ -44,8 +46,7 @@ scalacOptions in Compile ++= Seq(
"-opt:redundant-casts", "-opt:redundant-casts",
"-opt:box-unbox", "-opt:box-unbox",
"-opt:nullness-tracking", "-opt:nullness-tracking",
"-opt:closure-invocations", "-opt:closure-invocations"/*,
"-opt:l:classpath"/*,
"-Xelide-below", "3000", "-Xelide-below", "3000",
"-Xdisable-assertions"*/ "-Xdisable-assertions"*/
) )
...@@ -60,37 +61,93 @@ fork in run := true ...@@ -60,37 +61,93 @@ fork in run := true
val tapasco = inputKey[Unit]("Run Tapasco command.") val tapasco = inputKey[Unit]("Run Tapasco command.")
tapasco := (runMain in Compile).partialInput (" de.tu_darmstadt.cs.esa.tapasco.Tapasco ").evaluated
val itapasco = InputKey[Unit]("itapasco", "Run interactive Tapasco GUI.") val itapasco = InputKey[Unit]("itapasco", "Run interactive Tapasco GUI.")
fullRunInputTask(itapasco, Compile, "de.tu_darmstadt.cs.esa.tapasco.Tapasco", "itapasco") val logviewer = inputKey[Unit]("Run interactive DSE log viewer.")
fork in itapasco := true val reportviewer = inputKey[Unit]("Run interactive report viewer.")
javaOptions in itapasco += "-splash:icon/tapasco_icon.png" tapasco := (runMain in Compile).partialInput (" de.tu_darmstadt.cs.esa.tapasco.Tapasco ").evaluated
val logviewer = inputKey[Unit]("Run interactive DSE log viewer.") fullRunInputTask(itapasco, Compile, "de.tu_darmstadt.cs.esa.tapasco.Tapasco", "itapasco")
fullRunInputTask(logviewer, Compile, "de.tu_darmstadt.cs.esa.tapasco.itapasco.executables.LogViewer") fullRunInputTask(logviewer, Compile, "de.tu_darmstadt.cs.esa.tapasco.itapasco.executables.LogViewer")
javaOptions in logviewer += "-splash:icon/tapasco_icon.png"
val reportviewer = inputKey[Unit]("Run interactive report viewer.")
fullRunInputTask(reportviewer, Compile, "de.tu_darmstadt.cs.esa.tapasco.itapasco.executables.ReportViewer") fullRunInputTask(reportviewer, Compile, "de.tu_darmstadt.cs.esa.tapasco.itapasco.executables.ReportViewer")
javaOptions in reportviewer += "-splash:icon/tapasco_icon.png"
fork := true fork := true
test in assembly := {} fork in itapasco := true
assemblyJarName := "Tapasco-" + tapascoVersion + ".jar" fork in Test := false
parallelExecution in Test := false parallelExecution in Test := false
fork in Test := false javaOptions in itapasco += "-splash:icon/tapasco_icon.png"
javaOptions in logviewer += "-splash:icon/tapasco_icon.png"
javaOptions in reportviewer += "-splash:icon/tapasco_icon.png"
test in assembly := {}
assemblyJarName := "Tapasco-" + tapascoVersion + ".jar"
mainClass in assembly := Some("de.tu_darmstadt.cs.esa.tapasco.Tapasco") mainClass in assembly := Some("de.tu_darmstadt.cs.esa.tapasco.Tapasco")
def writeScripts(jar: String, base: String) {
val N = scala.util.Properties.lineSeparator
val basePath = java.nio.file.Paths.get(base)
val binPath = basePath.resolve("bin")
val iconPath = basePath.resolve("icon").resolve("tapasco_icon.png")
val tapasco = binPath.resolve("tapasco")
val itapasco = binPath.resolve("itapasco")
val logviewer= binPath.resolve("tapasco-logviewer")
val rptviewer= binPath.resolve("tapasco-reportviewer")
var f = new java.io.FileWriter(tapasco.toString)
f.append("#!/bin/bash").append(N)
.append("java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -jar %s $*".format(jar)).append(N)
f.close()
tapasco.toFile.setExecutable(true)
f = new java.io.FileWriter(itapasco.toString)
f.append("#!/bin/bash").append(N)
.append("java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled ")
.append("-splash:%s ".format(iconPath.toString))
.append("-jar %s ".format(jar))
.append("itapasco $*").append(N)
f.close()
itapasco.toFile.setExecutable(true)
f = new java.io.FileWriter(logviewer.toString)
f.append("#!/bin/bash").append(N)
.append("cd $TAPASCO_HOME && sbt logviewer $*")
f.close()
logviewer.toFile.setExecutable(true)