Commit a09dbe89 authored by Jens Korinth's avatar Jens Korinth

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
boot/rootfs.img
boot/uenv/uEnv-pynq.txt
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
-------------
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+
* sbt 0.13.x
* git
......@@ -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
cores, you'll also need:
* Vivado HLS 2016.2+
* Vivado HLS 2016.3+
Check that at least the following are in your `$PATH`:
......
......@@ -117,6 +117,13 @@ namespace eval arch {
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.
proc arch_create_mem_interconnects {composition outs} {
variable arch_mem_ports
......@@ -132,8 +139,22 @@ namespace eval arch {
set masters [tapasco::get_aximm_interfaces $example]
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_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_32b {}
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 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 {
# check interfaces: AXI3/AXI4 slaves will be wrappped
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)}]
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} {
puts " IP has full slaves, will add protocol converter"
puts " found full slave interfaces: $full_slave_ifs"
......@@ -39,12 +39,27 @@ namespace eval full_axi_wrapper {
move_bd_cells $group $inst
set ninst [get_bd_cells $group/internal_$name]
current_bd_instance $group
# create slave ports
set saxi_port [create_bd_intf_pin -vlnv "xilinx.com:interface:aximm_rtl:1.0" -mode Slave "S_AXI_LITE"]
set conv [tapasco::createProtocolConverter "conv" "AXI4LITE" [get_property CONFIG.PROTOCOL $full_slave_ifs]]
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] $full_slave_ifs
# rewire full slaves
set si 0
foreach fs $full_slave_ifs {
# create slave port
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
set maxi_ports [list]
......@@ -57,7 +72,7 @@ namespace eval full_axi_wrapper {
# create clock and reset ports
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 rst [create_bd_pin -type rst -dir I "aresetn"]
......@@ -72,6 +87,11 @@ namespace eval full_axi_wrapper {
}
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::fix_address_map" "pre-platform"
......@@ -100,6 +100,31 @@ tapasco_res_t tapasco_scheduler_launch(
LOG(LALL_SCHEDULER, "job %lu: read result value 0x%08lx",
(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
if (platform_write_ctl(tapasco_address_map_func_reg(dev_ctx, slot_id,
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
* @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
* @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
args = parser.parse_args()
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:
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}
VERSION=${2:-2016.4}
IMGSIZE=${3:-8192}
......@@ -387,9 +387,11 @@ EOF
fi
echo "Unmounting image in $LOOPDEV ..."
dusudo losetup -d $LOOPDEV
dusudo sync
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")
sleep 3
LD=`basename $LOOPDEV`
LD1=${LD}p1
LD2=${LD}p2
......@@ -468,7 +470,7 @@ copy_files_to_root () {
dusudo sh -c "echo $BOARD > $TO/etc/hostname" ||
echo >&2 "$LINENO: WARNING: could not set hostname"
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 "Setting env vars ... "
dusudo sh -c "echo export LINUX_HOME=/linux-xlnx >> $TO/home/xilinx/.bashrc" ||
......@@ -513,6 +515,7 @@ check_image_tools
check_sdcard
read -p "Enter sudo password: " -s SUDOPW
[[ -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 `dirname $PYNQ_IMAGE` 2> /dev/null
echo "And so it begins ..."
......@@ -587,7 +590,7 @@ extract_pynq_rootfs &> $EXTRACT_RFS_LOG
echo "Building image in $OUTPUT_IMAGE (output in $BUILD_OUTPUT_IMAGE_LOG) ..."
build_output_image $IMGSIZE &> $BUILD_OUTPUT_IMAGE_LOG
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"
fi
echo "SD card image ready: $OUTPUT_IMAGE"
......
val tapascoVersion = "2017.1"
val tapascoVersion = "2017.2"
organization := "de.tu_darmstadt.esa.cs"
......@@ -6,25 +6,24 @@ version := tapascoVersion
name := "Tapasco"
scalaVersion := "2.12.1"
scalaVersion := "2.12.4"
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % 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-parser-combinators" % "1.0.4",
"com.typesafe.play" %% "play-json" % "2.6.0-M3" exclude ("ch.qos.logback", "logback-classic"),
"org.scala-lang.modules" % "scala-swing_2.12" % "2.0.1",
"com.typesafe.play" %% "play-json" % "2.6.7" exclude ("ch.qos.logback", "logback-classic"),
"org.jfree" % "jfreechart" % "1.0.19",
"org.slf4j" % "slf4j-api" % "1.7.22",
"ch.qos.logback" % "logback-classic" % "1.2.1",
"org.slf4j" % "slf4j-api" % "1.7.25",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"net.sf.jung" % "jung-api" % "2.1.1",
"net.sf.jung" % "jung-visualization" % "2.1.1",
"net.sf.jung" % "jung-graph-impl" % "2.1.1",
"com.google.guava" % "guava" % "19.0",
"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",
"com.lihaoyi" %% "fastparse" % "0.4.3"
"com.lihaoyi" %% "fastparse" % "1.0.0"
)
scalacOptions ++= Seq(
......@@ -37,6 +36,9 @@ scalacOptions ++= Seq(
)
scalacOptions in Compile ++= Seq(
"-opt:inline",
"-opt:l:inline",
"-opt-inline-from",
"-opt:unreachable-code",
"-opt:simplify-jumps",
"-opt:compact-locals",
......@@ -44,8 +46,7 @@ scalacOptions in Compile ++= Seq(
"-opt:redundant-casts",
"-opt:box-unbox",
"-opt:nullness-tracking",
"-opt:closure-invocations",
"-opt:l:classpath"/*,
"-opt:closure-invocations"/*,
"-Xelide-below", "3000",
"-Xdisable-assertions"*/
)
......@@ -60,37 +61,93 @@ fork in run := true
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.")
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")
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")
javaOptions in reportviewer += "-splash:icon/tapasco_icon.png"
fork := true
test in assembly := {}
fork in itapasco := true
assemblyJarName := "Tapasco-" + tapascoVersion + ".jar"
fork 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")
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)
f = new java.io.FileWriter(rptviewer.toString)
f.append("#!/bin/bash").append(N)
.append("cd $TAPASCO_HOME && sbt reportviewer $*")
f.close()
rptviewer.toFile.setExecutable(true)
}
cleanFiles ++= Seq(
baseDirectory.value / "bin" / "tapasco",
baseDirectory.value / "bin" / "itapasco",
baseDirectory.value / "bin" / "tapasco-logviewer",
baseDirectory.value / "bin" / "tapasco-reportviewer"
)
lazy val root = (project in file("."))
.settings(
assembly := (Def.taskDyn {
val a = assembly.value
val jar = target(_ / ("scala-" + scalaBinaryVersion.value) / assemblyJarName.value)
Def.task {
writeScripts(jar.value.toString, baseDirectory.value.toString)
a
}
}).value
)
......@@ -66,7 +66,7 @@ namespace eval tapasco {
# Returns the Tapasco version.
proc get_tapasco_version {} {
return "2017.1"
return "2017.2"
}
# Instantiates an AXI4 Interconnect IP.
......@@ -372,6 +372,16 @@ namespace eval tapasco {
}
}
# make map of IDs -> number of slave interfaces
set composition [tapasco::get_composition]
set no_kinds [llength [dict keys $composition]]
set no_slaves [list]
for {set i 0} {$i < $no_kinds} {incr i} {
lappend no_slaves [dict get $composition $i id]
lappend no_slaves [llength [arch::get_aximm_interfaces $i 0 "Slave"]]
}
puts " Slvs: $no_slaves"
# create the IP core
set inst [create_bd_cell -type ip -vlnv [dict get $stdcomps tapasco_status vlnv] $name]
# make properties list
......@@ -382,7 +392,7 @@ namespace eval tapasco {
if {$slot < 128} {
lappend props "[format CONFIG.C_SLOT_KERNEL_ID_%d [expr $slot + 1]]" "$i"
}
incr slot
incr slot [dict get $no_slaves $i]
}
# get version strings
set vversion [split [version -short] {.}]
......@@ -480,6 +490,26 @@ namespace eval tapasco {
return $inst
}
# Instantiates a System ILA core for AXI debugging.
# @param name Name of the instance
# @param ports Number of ports (optional, default: 1)
# @param depth Data depth (optional, default: 1024)
# @param stages Input pipeline stages (optional, default: 0)
# @return block design cell (or error)
proc createSystemILA {name {ports 1} {depth 1024} {stages 0}} {
variable stdcomps
puts "Creating System ILA $name ..."
set vlnv [dict get $stdcomps system_ila vlnv]
puts " VLNV: $vlnv"
set inst [create_bd_cell -type ip -vlnv $vlnv $name]
set_property -dict [list \
CONFIG.C_NUM_MONITOR_SLOTS $ports \
CONFIG.C_DATA_DEPTH $depth \
CONFIG.C_INPUT_PIPE_STAGES $stages \
] $inst
return $inst
}
# Returns the interface pin groups for all AXI MM interfaces on cell.
# @param cell the object whose interfaces shall be returned
# @parma mode filters interfaces by mode (default: Master)
......@@ -488,6 +518,31 @@ namespace eval tapasco {
return [get_bd_intf_pins -of_objects $cell -filter "VLNV =~ xilinx.com:interface:aximm_rtl:* && MODE == $mode"]
}
# Returns the given property of a given AXI MM interface.
# Will raise an error, if none or conflicting values are found.
# @param name of property
# @param intf interface pin to get property for
# @return value of property
proc get_aximm_property {property intf} {
set dw [get_property $property $intf]
if {$dw == {}} {
set nets [get_bd_intf_nets -hierarchical -boundary_type lower -of_objects $intf]
set srcs [get_bd_intf_pins -of_objects $nets -filter "$property != {}"]
if {[llength $srcs] == 0} {
error "could not find a connected interface pin where $property is set"
} else {
set dws {}
foreach s $srcs { lappend dws [get_property $property $s] }
if {[llength $dws] > 1} {
error "found conflicting values for $property @ $intf: $dws"
}
return [lindex $dws 0]
}
} else {
return $dw
}
}
# Returns a key-value list of frequencies in the design.