Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
6c41bb6f
Commit
6c41bb6f
authored
May 09, 2017
by
Jens Korinth
Browse files
Rebranding ThreadPoolComposer -> TaPaSCo
parent
7be62ffb
Changes
696
Expand all
Hide whitespace changes
Inline
Side-by-side
GETTINGSTARTED-zynq.md
View file @
6c41bb6f
T
hreadPoolComposer
-- Getting Started Part 2 (Zynq)
T
apasco
-- Getting Started Part 2 (Zynq)
===================================================
This is the second part of the TPC tutorial, concerned with the Zynq platforms
only. In this part we will load the bitstream generated in Part 1 to the FPGA
...
...
@@ -11,59 +11,59 @@ Preparing the system
By default, the TPC linux image has two users:
1.
`root`
(passwd:
`root`
)
2.
`t
pc
`
(passwd:
`t
pctpc
`
)
2.
`t
apasco
`
(passwd:
`t
apascotapasco
`
)
Obviously this is an extremely insecure setup and should be changed immediately.
Login as
`root`
, then use the
`passwd`
program to change the root password.
Repeat for user
`t
pc
`
.
Repeat for user
`t
apasco
`
.
The user
`t
pc
`
is
`sudoer`
, i.e., you can use the
`sudo`
program to temporarily
The user
`t
apasco
`
is
`sudoer`
, i.e., you can use the
`sudo`
program to temporarily
gain root privileges. This is sufficient for TPC, but feel free to configure
the system in any way you like.
Preparing the TPC libaries and driver
-------------------------------------
The T
hreadPoolComposer
software stack consists of three layers:
The T
apasco
software stack consists of three layers:
1.
TPC(++) API (
`libt
pc
.so`
/
`libt
pc
.a`
)
1.
TPC(++) API (
`libt
apasco
.so`
/
`libt
apasco
.a`
)
2.
Platform API (
`libplatform.so`
/
`libplatform.a`
)
3.
Device Driver (
`t
pc
-platform-zynq.ko`
)
3.
Device Driver (
`t
apasco
-platform-zynq.ko`
)
When you are using TPC, you will only need to concern yourself with TPC API,
the other layers will be hidden from the application point of view.
Nevertheless, they need to be available to build and run the application.
To simplify the building of the libraries, there is a script in
`$T
PC
_HOME/bin`
called
`t
pc
-build-libs`
. It will compile all three layers:
To simplify the building of the libraries, there is a script in
`$T
APASCO
_HOME/bin`
called
`t
apasco
-build-libs`
. It will compile all three layers:
[t
pc
@zed] ~ t
pc
-build-libs
[t
apasco
@zed] ~ t
apasco
-build-libs
This will build the libraries for the zedboard in Release mode, you should see
several lines of status logs, e.g.:
Building release mode libraries, pass 'debug' as first argument to build debug libs...
KCPPFLAGS="-DNDEBUG -O3" make -C /home/t
pc
/linux-xlnx M=/home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module modules
make[1]: Entering directory '/home/t
pc
/linux-xlnx'
CC [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/zynq_module.o
CC [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/zynq_device.o
CC [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/zynq_dmamgmt.o
CC [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/zynq_irq.o
CC [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/zynq_ioctl.o
LD [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/t
pc
-platform-zynq.o
KCPPFLAGS="-DNDEBUG -O3" make -C /home/t
apasco
/linux-xlnx M=/home/t
apasco/tapasco
/2016.03/platform/zynq/module modules
make[1]: Entering directory '/home/t
apasco
/linux-xlnx'
CC [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/zynq_module.o
CC [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/zynq_device.o
CC [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/zynq_dmamgmt.o
CC [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/zynq_irq.o
CC [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/zynq_ioctl.o
LD [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/t
apasco
-platform-zynq.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/t
pc
-platform-zynq.mod.o
LD [M] /home/t
pc/threadpoolcomposer
/2016.03/platform/zynq/module/t
pc
-platform-zynq.ko
make[1]: Leaving directory '/home/t
pc
/linux-xlnx'
CC /home/t
apasco/tapasco
/2016.03/platform/zynq/module/t
apasco
-platform-zynq.mod.o
LD [M] /home/t
apasco/tapasco
/2016.03/platform/zynq/module/t
apasco
-platform-zynq.ko
make[1]: Leaving directory '/home/t
apasco
/linux-xlnx'
...
TPC is now ready! By default, the script will build the libraries in release
mode, but you can switch to debug mode easily:
[t
pc
@zed] ~ t
pc
-build-libs --mode debug
[t
apasco
@zed] ~ t
apasco
-build-libs --mode debug
Logging features are enabled in debug mode only, see the Debugging chapter at
the end of this document. See also
`t
pc
-build-libs --help`
for more info.
the end of this document. See also
`t
apasco
-build-libs --help`
for more info.
Loading bitstreams
------------------
...
...
@@ -71,24 +71,24 @@ The next step is to copy the bitstreams (.bit files) we have prepared in Part 1
to the device. Once you have copied the .bit file to the board (e.g., via
`scp`
), you need to load it to the FPGA, then load the driver.
For convenience, there is a script called
`t
pc
-load-bitstream`
in
`$T
PC
_HOME/bin`
For convenience, there is a script called
`t
apasco
-load-bitstream`
in
`$T
APASCO
_HOME/bin`
that simplifies this process, which can be called like this:
[t
pc
@zed] ~ t
pc
-load-bitstream --reload-driver <PATH TO .bit FILE>
[t
apasco
@zed] ~ t
apasco
-load-bitstream --reload-driver <PATH TO .bit FILE>
It will ask for the
`sudo`
password of the user
`t
pc
`
(loading the bitstream
It will ask for the
`sudo`
password of the user
`t
apasco
`
(loading the bitstream
and driver requires root privilege). On the zedboard there is a blue status LED
(left of the OLED display) that indicates whether or not a valid bitstream is
configured in the FPGA.
If everything goes well, you should see some log messages similar to this:
~/t
hreadpoolcomposer
/2016.03/platform/zynq/module ~/t
hreadpoolcomposer
/2016.03
[sudo] password for t
pc
:
Loading bitstream /home/t
pc
/basic_test.bd.bit ...
~/t
apasco
/2016.03/platform/zynq/module ~/t
apasco
/2016.03
[sudo] password for t
apasco
:
Loading bitstream /home/t
apasco
/basic_test.bd.bit ...
Done!
Loading kernel module ...
~/t
hreadpoolcomposer
/2016.03
~/t
apasco
/2016.03
Done.
On the zedboard there is a bright blue LED (left of the OLED display) that will
...
...
@@ -104,14 +104,14 @@ stall if no device in the fabric answers.
Compiling TPC(++) API programs
------------------------------
Continuing the example from Part 1, we will now compile the Rot13 application
located in
`$T
PC
_HOME/kernel/rot13`
. C/C++ builds in TPC use
`cmake`
, a
located in
`$T
APASCO
_HOME/kernel/rot13`
. C/C++ builds in TPC use
`cmake`
, a
cross-platform Makefile generator (see [1]). The pattern you see below repeats
for all CMake projects:
[t
pc
@zed] cd $T
PC
_HOME/kernel/rot13 && mkdir -p build && cd build
[t
pc
@zed] cmake -DCMAKE_BUILD_TYPE=Release .. && make
[t
apasco
@zed] cd $T
APASCO
_HOME/kernel/rot13 && mkdir -p build && cd build
[t
apasco
@zed] cmake -DCMAKE_BUILD_TYPE=Release .. && make
This will create a
`build`
subdirectory in which the
`t
pc
_rot13`
application is
This will create a
`build`
subdirectory in which the
`t
apasco
_rot13`
application is
begin build. You can also compile in debug mode by using
`cmake ..`
instead.
-- The C compiler identification is GNU 5.3.0
...
...
@@ -130,23 +130,23 @@ begin build. You can also compile in debug mode by using `cmake ..` instead.
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/t
pc/threadpoolcomposer
/2016.03/kernel/rot13/build
Scanning dependencies of target t
pc
-rot13
[ 25%] Building CXX object CMakeFiles/t
pc
-rot13.dir/t
pc
_rot13.cpp.o
[ 50%] Linking CXX executable t
pc
-rot13
[ 50%] Built target t
pc
-rot13
-- Build files have been written to: /home/t
apasco/tapasco
/2016.03/kernel/rot13/build
Scanning dependencies of target t
apasco
-rot13
[ 25%] Building CXX object CMakeFiles/t
apasco
-rot13.dir/t
apasco
_rot13.cpp.o
[ 50%] Linking CXX executable t
apasco
-rot13
[ 50%] Built target t
apasco
-rot13
Scanning dependencies of target rot13
[ 75%] Building CXX object CMakeFiles/rot13.dir/rot13.cpp.o
[100%] Linking CXX executable rot13
[100%] Built target rot13
Now there should be a
`t
pc
-rot13`
executable. As a first argument, pass a text
Now there should be a
`t
apasco
-rot13`
executable. As a first argument, pass a text
file to be ciphered; there is an ASCII version of the Shakespeare play
"All
\'
s well that ends well" in
`~/allswell.txt`
. Let us test the application
by enciphering it twice, this should give the original text back:
[t
pc
@zed] ~/t
hreadpoolcomposer
/2016.03/kernel/rot13 $ ./t
pc
-rot13 ~/allswell.txt > test.txt
[t
pc
@zed] ~/t
hreadpoolcomposer
/2016.03/kernel/rot13 $ ./t
pc
-rot13 test.txt
[t
apasco
@zed] ~/t
apasco
/2016.03/kernel/rot13 $ ./t
apasco
-rot13 ~/allswell.txt > test.txt
[t
apasco
@zed] ~/t
apasco
/2016.03/kernel/rot13 $ ./t
apasco
-rot13 test.txt
If everything goes well, the plain text should appear on the screen now.
...
...
@@ -155,10 +155,10 @@ TPC libraries, load bitstream and driver and compile TPC API applications. Of
course this does not give a complete overview of TPC, but hopefully it provides
a solid starting point to start exploring. The Rot13 application is simple
enough to explore the basics; a next step could be the
`basic_test`
example in
`$T
PC
_HOME/examples/basic_test`
. There is a TPC configuration for three basic
`$T
APASCO
_HOME/examples/basic_test`
. There is a TPC configuration for three basic
testing kernels, which perform read, write and r+w accesses on main memory
respectively. Check out the kernels
`arraysum`
,
`arrayinit`
and
`arrayupdate`
in
`$T
PC
_HOME/kernel`
and try to run the example.
`$T
APASCO
_HOME/kernel`
and try to run the example.
Debugging
---------
...
...
@@ -174,47 +174,47 @@ First of all, switch to the release mode libraries only towards the end, when
your application is running and stable. Until then, use the debug libraries.
To compile the libraries in debug mode, use:
[t
pc
@zed] ~ t
pc
-build-libs --mode debug
[t
apasco
@zed] ~ t
apasco
-build-libs --mode debug
This will enable logging in the libraries. Logging is controlled by four
environment variables:
1.
`LIBPLATFORM_DEBUG`
2.
`LIBPLATFORM_LOGFILE`
3.
`LIBT
PC
_DEBUG`
4.
`LIBT
PC
_LOGFILE`
3.
`LIBT
APASCO
_DEBUG`
4.
`LIBT
APASCO
_LOGFILE`
The
`_DEBUG`
variables are a bit mask for various parts of the libraries; you
can turn on debug information selectively for each part. See
`$T
PC
_HOME/arch/common/include/t
pc
_logging.h`
and
`$T
PC
_HOME/platform/common/include/platform_logging.h`
for further information.
`$T
APASCO
_HOME/arch/common/include/t
apasco
_logging.h`
and
`$T
APASCO
_HOME/platform/common/include/platform_logging.h`
for further information.
You can simply turn on all logs by using
[t
pc
@zed] ~ export LIBPLATFORM_DEBUG=-1
[t
pc
@zed] ~ export LIBT
PC
_DEBUG=-1
[t
apasco
@zed] ~ export LIBPLATFORM_DEBUG=-1
[t
apasco
@zed] ~ export LIBT
APASCO
_DEBUG=-1
The
`_LOGFILE`
variables can be used to redirect the log output to logfiles
(instead of stdout), e.g.:
[t
pc
@zed] ~ export LIBT
PC
_LOGFILE=/home/t
pc/libtpc
.log
[t
pc
@zed] ~ export LIBPLATFORM_LOGFILE=/home/t
pc
/libplatform.log
[t
apasco
@zed] ~ export LIBT
APASCO
_LOGFILE=/home/t
apasco/libtapasco
.log
[t
apasco
@zed] ~ export LIBPLATFORM_LOGFILE=/home/t
apasco
/libplatform.log
Usually this level of debug information is sufficient. But in case something is
going wrong on the driver level, you can also compile the device driver in debug
mode like this:
[t
pc
@zed] ~ cd $T
PC
_HOME && ./buildLibs.py driver_debug
[t
apasco
@zed] ~ cd $T
APASCO
_HOME && ./buildLibs.py driver_debug
This will activate another bitmask in the driver; you can access it via the
sysfs file
`/sys/module/t
pc
_platform_zynq/parameters/logging_level`
. To activate
sysfs file
`/sys/module/t
apasco
_platform_zynq/parameters/logging_level`
. To activate
all debug messages use:
[t
pc
@zed] ~ sudo sh -c 'echo -1 > /sys/module/t
pc
_platform_zynq/parameters/logging_level'
[t
apasco
@zed] ~ sudo sh -c 'echo -1 > /sys/module/t
apasco
_platform_zynq/parameters/logging_level'
You can see the log messages in the system log, accessible via
`dmesg`
:
[t
pc
@zed] ~ dmesg --follow
[t
apasco
@zed] ~ dmesg --follow
Run this command in a separate shell and you can see the log message during the
execution of your application.
...
...
@@ -228,7 +228,7 @@ with minimal runtime overhead. But the Zynq CPUs are severely limited in terms
of performance, so a performance hit will be measurable for library logging, too.
So, for benchmarking always use the release mode of driver and libraries.
We hope T
hreadPoolComposer
is useful to you and can help to get your FPGA
We hope T
apasco
is useful to you and can help to get your FPGA
research started as quickly as possible! If you use TPC in your research we
kindly ask that you cite our FCCM 2015 paper (see [2]) in your papers.
Even more importantly, let us know about issues with TPC and share your
...
...
@@ -240,5 +240,5 @@ directly via email.
Have fun!
[
1
]:
https://cmake.org/documentation/
[
2
]:
http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Downloads/T
hreadPoolComposer
.html
[
3
]:
https://git.esa.informatik.tu-darmstadt.de/REPARA/t
hreadpoolcomposer
[
2
]:
http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Downloads/T
apasco
.html
[
3
]:
https://git.esa.informatik.tu-darmstadt.de/REPARA/t
apasco
GETTINGSTARTED.md
View file @
6c41bb6f
T
hreadPoolComposer
-- Getting Started
T
apasco
-- Getting Started
=====================================
This document will walk you through an example bitstream creation with TPC.
But first we will discuss some basic terminology and explain how TPC works
...
...
@@ -98,7 +98,7 @@ description files:
of desired instances. Can be provided inline in the _Configuration_.
5.
_Configuration Descriptions_ (any name)
Can be provided as command line arguments to
`t
pc
`
, or (more conveniently)
Can be provided as command line arguments to
`t
apasco
`
, or (more conveniently)
in a separate file. Contains all parameters for the current _Configuration_;
the _Configuration_ determines for which _Platforms_, _Architectures_ and
_Compositions_ bitstreams shall be generated, and configures optional
...
...
@@ -113,7 +113,7 @@ description file.
Directory Structure
-------------------
All paths in TPC can be reconfigured using _Configuration_ parameters, but when
nothing else is specified, the default directory structure below
`$T
PC
_HOME`
is
nothing else is specified, the default directory structure below
`$T
APASCO
_HOME`
is
used:
*
`arch`
...
...
@@ -135,7 +135,7 @@ used:
Base directory for _Architectures_; will be searched for
`architecture.description`
s.
There are some more directories in
`$T
PC
_HOME`
, but only TPC developers need to
There are some more directories in
`$T
APASCO
_HOME`
, but only TPC developers need to
concern themselves with them. As a TPC user it is sufficient to understand the
directory structure above. Each base path can be reconfigured in the
_Configuration_
, which is most useful for _Kernels_, e.g., to switch between
...
...
@@ -150,12 +150,12 @@ letters of the latin alphabet by an offset of 13 (with wrap-around). There are
documented uses of this "encryption" in the Roman Empire, where it was
(presumably) used to keep people from reading messages "over the shoulder".
We will use
`it
pc
`
to create a configuration file for us, so start it:
We will use
`it
apasco
`
to create a configuration file for us, so start it:
1.
`it
pc
`
1.
`it
apasco
`
TPC should greet you with a menu similar to this:
Welcome to interactive T
hreadPoolComposer
Welcome to interactive T
apasco
*****************************************
What would you like to do?
...
...
@@ -203,7 +203,7 @@ We will use `itpc` to create a configuration file for us, so start it:
l: rot13
Your choice:
6.
Next step is to build the composition,
`it
pc
`
lists the available _Kernels_
6.
Next step is to build the composition,
`it
apasco
`
lists the available _Kernels_
and _Cores_, choose
`rot13`
via the corresponding key.
Number of instances[> 0]:
...
...
@@ -215,7 +215,7 @@ We will use `itpc` to create a configuration file for us, so start it:
b: false
Your choice:
8.
`it
pc
`
will keep asking whether you want to add more kernels. Finish the
8.
`it
apasco
`
will keep asking whether you want to add more kernels. Finish the
composition by
`b<RETURN>`
.
LED: Enabled[]:
...
...
@@ -223,7 +223,7 @@ We will use `itpc` to create a configuration file for us, so start it:
b: false
Your choice:
9.
Next,
`it
pc
`
will query all currently implemented feature of the _Platform_:
9.
Next,
`it
apasco
`
will query all currently implemented feature of the _Platform_:
`LED`
means that there
\`
s a simple controller for the on-board LEDs to
to show the internal state (available on Zynq, VC709).
`OLED`
is only available on zedboard, shows the number of interrupts that
...
...
@@ -237,10 +237,10 @@ We will use `itpc` to create a configuration file for us, so start it:
Enter filename for configuration[]:
10.
Finally,
`it
pc
`
asks for a file name for your configuration file. Choose
10.
Finally,
`it
apasco
`
asks for a file name for your configuration file. Choose
anything you like, e.g.,
`test.cfg`
.
Run T
hreadPoolComposer
with this configuration now?[]:
Run T
apasco
with this configuration now?[]:
a: true
b: false
Your choice:
...
...
@@ -253,7 +253,7 @@ logfiles, you can watch them via `tail --follow <FILE>` on a separate shell,
if you like.
If everything went well, there should be a
`.bit`
file in
`$T
PC
_HOME/bd/<YOUR BD>/baseline/zedboard`
afterwards (refer to the logging
`$T
APASCO
_HOME/bd/<YOUR BD>/baseline/zedboard`
afterwards (refer to the logging
output for the value of
`<YOUR BD>`
- if you had used an external _Composition_
description file, it would use that name instead of the hash).
...
...
README.md
View file @
6c41bb6f
T
hreadPoolComposer
(TPC)!
T
apasco
(TPC)!
=========================
<img
src=
"icon/t
hreadpoolcomposer_bw.png"
alt=
"ThreadPoolComposer logo"
width=
"300px
"
/>
<img
src=
"icon/t
apasco_icon.png"
alt=
"Tapasco logo
"
/>
System Requirements
-------------------
...
...
arch/baseline/CMakeLists.txt
View file @
6c41bb6f
...
...
@@ -3,48 +3,48 @@ project(arch-baseline)
set
(
CMAKE_INSTALL_PREFIX
".."
)
set
(
CMAKE_SKIP_RPATH true
)
if
(
NOT EXISTS
"$ENV{T
PC
_HOME}"
)
message
(
FATAL_ERROR
"Please set T
PC
_HOME environment variable to root directory of T
hreadPoolComposer
"
)
endif
(
NOT EXISTS
"$ENV{T
PC
_HOME}"
)
if
(
NOT EXISTS
"$ENV{T
APASCO
_HOME}"
)
message
(
FATAL_ERROR
"Please set T
APASCO
_HOME environment variable to root directory of T
apasco
"
)
endif
(
NOT EXISTS
"$ENV{T
APASCO
_HOME}"
)
include
(
"$ENV{T
PC
_HOME}/cmake/T
hreadPoolComposer
.cmake"
)
include
(
"$ENV{T
APASCO
_HOME}/cmake/T
apasco
.cmake"
)
set
(
SRCDIR
"src"
)
set
(
CMNDIR
"../common/src"
)
set
(
GCMNDIR
"
${
T
PC
_HOME
}
/common"
)
set
(
PLATFORMDIR
"
${
T
PC
_HOME
}
/platform"
)
set
(
LIBPLATFORM_STATIC
"
${
T
PC
_HOME
}
/platform/lib/
${
T
PC
_TARGET
}
/static/libplatform.a"
)
set
(
BASELINE_SOURCES
"
${
SRCDIR
}
/t
pc
_init.c"
"
${
SRCDIR
}
/t
pc
_device.c"
"
${
SRCDIR
}
/t
pc
_address_map.c"
)
set
(
COMMON_SOURCES
"
${
CMNDIR
}
/t
pc
_logging.c"
"
${
CMNDIR
}
/t
pc
_errors.c"
"
${
CMNDIR
}
/t
pc
_functions.c"
"
${
CMNDIR
}
/t
pc
_scheduler.c"
"
${
CMNDIR
}
/t
pc
_jobs.c"
"
${
CMNDIR
}
/t
pc
_status.c"
"
${
CMNDIR
}
/t
pc
_version.c"
set
(
GCMNDIR
"
${
T
APASCO
_HOME
}
/common"
)
set
(
PLATFORMDIR
"
${
T
APASCO
_HOME
}
/platform"
)
set
(
LIBPLATFORM_STATIC
"
${
T
APASCO
_HOME
}
/platform/lib/
${
T
APASCO
_TARGET
}
/static/libplatform.a"
)
set
(
BASELINE_SOURCES
"
${
SRCDIR
}
/t
apasco
_init.c"
"
${
SRCDIR
}
/t
apasco
_device.c"
"
${
SRCDIR
}
/t
apasco
_address_map.c"
)
set
(
COMMON_SOURCES
"
${
CMNDIR
}
/t
apasco
_logging.c"
"
${
CMNDIR
}
/t
apasco
_errors.c"
"
${
CMNDIR
}
/t
apasco
_functions.c"
"
${
CMNDIR
}
/t
apasco
_scheduler.c"
"
${
CMNDIR
}
/t
apasco
_jobs.c"
"
${
CMNDIR
}
/t
apasco
_status.c"
"
${
CMNDIR
}
/t
apasco
_version.c"
"
${
GCMNDIR
}
/src/gen_queue.c"
)
set
(
T
PC
_LIBS_DIR
"
${
T
PC
_HOME
}
/arch/lib"
)
set
(
T
APASCO
_LIBS_DIR
"
${
T
APASCO
_HOME
}
/arch/lib"
)
include_directories
(
"include"
"../common/include"
"
${
PLATFORMDIR
}
/common/include"
"
${
GCMNDIR
}
/include"
)
link_directories
(
"
${
PLATFORMDIR
}
/lib/
${
T
PC
_TARGET
}
"
)
link_directories
(
"
${
PLATFORMDIR
}
/lib/
${
T
APASCO
_TARGET
}
"
)
add_definitions
(
-DUSE_ASSERTIONS
)
set_source_files_properties
(
${
BASELINE_SOURCES
}
${
COMMON_SOURCES
}
PROPERTIES COMPILE_FLAGS
"-g -O3 -Wall -Werror -std=gnu11"
)
add_library
(
t
pc
SHARED
${
BASELINE_SOURCES
}
${
COMMON_SOURCES
}
)
add_library
(
libt
pc
-static STATIC
${
BASELINE_SOURCES
}
${
COMMON_SOURCES
}
${
LIBPLATFORM_STATIC
}
)
add_library
(
t
apasco
SHARED
${
BASELINE_SOURCES
}
${
COMMON_SOURCES
}
)
add_library
(
libt
apasco
-static STATIC
${
BASELINE_SOURCES
}
${
COMMON_SOURCES
}
${
LIBPLATFORM_STATIC
}
)
target_link_libraries
(
t
pc
platform atomic pthread
)
set_target_properties
(
libt
pc
-static PROPERTIES OUTPUT_NAME t
pc
)
target_link_libraries
(
t
apasco
platform atomic pthread
)
set_target_properties
(
libt
apasco
-static PROPERTIES OUTPUT_NAME t
apasco
)
install
(
TARGETS t
pc libtpc
-static
LIBRARY DESTINATION
"lib/
${
T
PC
_TARGET
}
"
ARCHIVE DESTINATION
"lib/
${
T
PC
_TARGET
}
/static"
)
install
(
TARGETS t
apasco libtapasco
-static
LIBRARY DESTINATION
"lib/
${
T
APASCO
_TARGET
}
"
ARCHIVE DESTINATION
"lib/
${
T
APASCO
_TARGET
}
/static"
)
get_filename_component
(
LIBSDIR
"lib"
REALPATH
)
add_custom_command
(
OUTPUT
${
T
PC
_LIBS_DIR
}
COMMAND ln;-fs;
${
LIBSDIR
}
;
${
T
PC
_LIBS_DIR
}
)
add_custom_target
(
install_libs ALL DEPENDS t
pc libtpc
-static
${
T
PC
_LIBS_DIR
}
)
add_custom_command
(
OUTPUT
${
T
APASCO
_LIBS_DIR
}
COMMAND ln;-fs;
${
LIBSDIR
}
;
${
T
APASCO
_LIBS_DIR
}
)
add_custom_target
(
install_libs ALL DEPENDS t
apasco libtapasco
-static
${
T
APASCO
_LIBS_DIR
}
)
arch/baseline/README.md
View file @
6c41bb6f
...
...
@@ -2,7 +2,7 @@
Proof-of-concept implementation of the most simple conceivable hardware
threadpool implementation based on the AXI4-bus. Useful as baseline for future,
optimized architectures as well as for demonstration of the basic implementation
of an Architecture for
*T
hreadpoolComposer
*
.
of an Architecture for
*T
apasco
*
.
## Building the TPC API library
Simply type
`make`
in this directory, and a directory
`lib`
should be created
...
...
arch/baseline/baseline.tcl
View file @
6c41bb6f
#
# Copyright
(
C
)
2014 Jens Korinth, TU Darmstadt
#
# This file is part of T
hreadPoolComposer
(
TPC
)
.
# This file is part of T
apasco
(
TPC
)
.
#
# T
hreadPoolComposer
is free software: you can redistribute it and/or modify
# T
apasco
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.
#
# T
hreadPoolComposer
is distributed in the hope that it will be useful,
# T
apasco
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 T
hreadPoolComposer
. If not, see <http://www.gnu.org/licenses/>.
# along with T
apasco
. If not, see <http://www.gnu.org/licenses/>.
#
# @file baseline.tcl
# @brief Baseline architecture implementation: Connects up to 64 cores
...
...
@@ -37,7 +37,7 @@ namespace eval arch {
set arch_irq_concats
[
list
]
# scan plugin directory
foreach f
[
glob -nocomplain -directory
"
$::env
(T
PC
_HOME)/arch/baseline/plugins"
"*.tcl"
]
{
foreach f
[
glob -nocomplain -directory
"
$::env
(T
APASCO
_HOME)/arch/baseline/plugins"
"*.tcl"
]
{
source -notrace $f
}
...
...
@@ -113,7 +113,7 @@ namespace eval arch {
puts
" VLNV:
$vlnv
"
for
{
set j 0
}
{
$j
< $no_inst
}
{
incr j
}
{
set name
[
format
"target_ip_%02d_%03d"
$i $j
]
set inst
[
lindex
[
t
pc
::call_plugins
"post-pe-create"
[
create_bd_cell -type ip -vlnv
"
$vlnv
"
$name
]]
0
]
set inst
[
lindex
[
t
apasco
::call_plugins
"post-pe-create"
[
create_bd_cell -type ip -vlnv
"
$vlnv
"
$name
]]
0
]
lappend insts $inst
}
}
...
...
@@ -133,7 +133,7 @@ namespace eval arch {
for
{
set i 0
}
{
$i
< $no_kinds
}
{
incr i
}
{
set no_inst
[
dict get $composition $i count
]
set example
[
get_bd_cells
[
format
"target_ip_%02d_000"
$i
]]
set masters
[
t
pc
::get_aximm_interfaces $example
]
set masters
[
t
apasco
::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
}]
...
...
@@ -184,7 +184,7 @@ namespace eval arch {
# generate output trees
for
{
set i 0
}
{
$i
<
[
llength $mdist
]}
{
incr i
}
{
puts
" mdist
[
$i
]
=
[
lindex $mdist $i
]
"
set out
[
t
pc
::create_interconnect_tree
"out_
$i
"
[
lindex $mdist $i
]]
set out
[
t
apasco
::create_interconnect_tree
"out_
$i
"
[
lindex $mdist $i
]]
connect_bd_intf_net
[
get_bd_intf_pins -filter
{
MODE == Master && VLNV ==
"xilinx.com:interface:aximm_rtl:1.0"
}
-of_objects $out
]
[
lindex $ic_ports $i
]
}
...
...
@@ -202,7 +202,7 @@ namespace eval arch {
set slaves
[
get_bd_intf_pins -of $example -filter
{
MODE ==
"Slave"
&& VLNV ==
"xilinx.com:interface:aximm_rtl:1.0"
}]
set ic_s
[
expr
"
$ic
_s +
[
llength $slaves
]
*
$no
_inst"
]
}
set in1
[
t
pc
::create_interconnect_tree
"in1"
$ic_s false
]
set in1
[
t
apasco
::create_interconnect_tree
"in1"
$ic_s false
]
puts
"Creating interconnects toward peripherals ..."
puts
"
$ic
_s slaves to connect to host"
...
...
@@ -253,12 +253,12 @@ namespace eval arch {
# Connects the threadpool to memory interconnects.
proc arch_connect_mem
{
mem_ics ips
}
{
# get PE masters
set masters
[
lsort -dictionary
[
t
pc
::get_aximm_interfaces $ips
]]
set masters
[
lsort -dictionary
[
t
apasco
::get_aximm_interfaces $ips
]]
# interleave slaves of out ic trees
set outs
[
get_bd_cells -filter
{
NAME =~
"out_*"
}]
set sc
[
llength
[
t
pc
::get_aximm_interfaces $outs
"Slave"
]]
set sc
[
llength
[
t
apasco
::get_aximm_interfaces $outs
"Slave"
]]
set tmp
[
list
]
foreach out $outs
{
lappend tmp
[
t
pc
::get_aximm_interfaces $out
"Slave"
]
}
foreach out $outs
{
lappend tmp
[
t
apasco
::get_aximm_interfaces $out
"Slave"
]
}
set outs $tmp
set slaves
[
list
]
set j 0
...
...
@@ -301,7 +301,7 @@ namespace eval arch {
set i 0
set j 0
set left
[
llength $ips
]
set cc
[
t
pc
::createConcat
"xlconcat_
$j
"
[
expr
"
[
llength $ips
]
> 32 ? 32 :
[
llength $ips
]
"
]]
set cc
[
t
apasco
::createConcat
"xlconcat_
$j
"
[
expr
"
[
llength $ips
]
> 32 ? 32 :
[
llength $ips
]
"
]]
lappend arch_irq_concats $cc
foreach ip
[
lsort $ips
]
{
foreach pin
[
get_bd_pins -of $ip -filter
{
TYPE == intr
}]
{
...
...
@@ -312,7 +312,7 @@ namespace eval arch {
set i 0
incr j
if
{
$left > 0
}
{
set cc
[
t
pc
::createConcat
"xlconcat_
$j
"
[
expr
"
$left
> 32 ? 32 :
$left
"
]]
set cc
[
t
apasco
::createConcat
"xlconcat_
$j
"
[
expr
"
$left
> 32 ? 32 :
$left
"
]]
lappend arch_irq_concats $cc
}
}
...
...
@@ -385,7 +385,7 @@ namespace eval arch {
current_bd_instance $group
# create instances of target IP
set kernels
[
t
pc
::get_composition
]
set kernels
[
t
apasco
::get_composition
]
set insts
[
arch_create_instances $kernels
]
arch_check_instance_count $kernels
set arch_mem_ics
[
arch_create_mem_interconnects $kernels $mgroups
]
...
...
arch/baseline/plugins/full_axi_slave_wrapper.tcl
View file @
6c41bb6f
#
# Copyright
(
C
)
2014 Jens Korinth, TU Darmstadt
#
# This file is part of T
hreadPoolComposer
(
TPC
)
.
# This file is part of T
apasco
(
TPC
)
.
#
# T
hreadPoolComposer
is free software: you can redistribute it and/or modify
# T
apasco
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.
#
# T
hreadPoolComposer
is distributed in the hope that it will be useful,
# T
apasco
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 T
hreadPoolComposer
. If not, see <http://www.gnu.org/licenses/>.
# along with T
apasco
. If not, see <http://www.gnu.org/licenses/>.
#
# @file full_axi_slave_wrapper.tcl
# @brief PE-wrapper plugin that checks for full AXI3/4 slave protocols and
...
...
@@ -42,7 +42,7 @@ namespace eval full_axi_wrapper {
# 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
[
t
pc
::createProtocolConverter
"conv"
"AXI4LITE"
[
get_property CONFIG.PROTOCOL $full_slave_ifs
]]
set conv
[
t
apasco
::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
...
...
@@ -74,4 +74,4 @@ namespace eval full_axi_wrapper {
}
}
t
pc
::register_plugin
"arch::full_axi_wrapper::wrap_full_axi_interfaces"
"post-pe-create"
t
apasco
::register_plugin
"arch::full_axi_wrapper::wrap_full_axi_interfaces"
"post-pe-create"
arch/baseline/referencearg.directives.template
View file @
6c41bb6f
#
# Copyright (C) 2014 Jens Korinth, TU Darmstadt
#
# This file is part of T
hreadPoolComposer
(TPC).
# This file is part of T
apasco
(TPC).
#
# T
hreadPoolComposer
is free software: you can redistribute it and/or modify
# T
apasco
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.
#
# T
hreadPoolComposer
is distributed in the hope that it will be useful,
# T
apasco
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 T
hreadPoolComposer
. If not, see <http://www.gnu.org/licenses/>.
# along with T
apasco
. If not, see <http://www.gnu.org/licenses/>.
#
set_directive_data_pack @@TOP@@ @@ARG@@
set_directive_interface -mode m_axi -offset slave @@TOP@@ @@ARG@@
...
...
arch/baseline/sim.tcl.template
View file @
6c41bb6f
#
# Copyright (C) 2014 Jens Korinth, TU Darmstadt
#
# This file is part of T
hreadPoolComposer
(TPC).
# This file is part of T
apasco
(TPC).