Commit 8eed7b0c authored by Jens Korinth's avatar Jens Korinth
Browse files

WIP: rebuilding of libtapasco

* building in main dir, like libplatform
* closely mirrored changes in libplatform: tapasco_ctx_t matches
  platform_ctx_t, and tapasco_devctx_t with platform_devctx_t
* this whole change requires a lot of changes all over the place
* tapasco-debug builds, but does not work yet
* tapasco-benchmark does not build yet
parent f494b20b
cmake_minimum_required(VERSION 2.8)
project(arch-axi4mm)
if (NOT EXISTS "$ENV{TAPASCO_HOME}")
message(FATAL_ERROR "Please set TAPASCO_HOME environment variable to root directory of Tapasco")
endif (NOT EXISTS "$ENV{TAPASCO_HOME}")
include ("$ENV{TAPASCO_HOME}/cmake/Tapasco.cmake")
set(CMAKE_INSTALL_PREFIX "${TAPASCO_HOME}")
set(SRCDIR "axi4mm/src")
set(CMNDIR "common/src")
set(AXI4MM_SOURCES "${SRCDIR}/tapasco_regs.c")
set(COMMON_SOURCES "${CMNDIR}/tapasco_context.c"
"${CMNDIR}/tapasco_delayed_transfers.c"
"${CMNDIR}/tapasco_device.c"
"${CMNDIR}/tapasco_errors.c"
"${CMNDIR}/tapasco_jobs.c"
"${CMNDIR}/tapasco_logging.c"
"${CMNDIR}/tapasco_local_mem.c"
"${CMNDIR}/tapasco_memory.c"
"${CMNDIR}/tapasco_pemgmt.c"
"${CMNDIR}/tapasco_scheduler.c"
"${CMNDIR}/tapasco_version.c"
"${TAPASCO_COMMON_DIR}/src/gen_mem.c"
"${TAPASCO_COMMON_DIR}/src/gen_queue.c")
include_directories(${TAPASCO_INCDIRS})
include_directories("include" "common/include" "${TAPASCO_PLATFORM_DIR}/common/include")
link_directories(${TAPASCO_STATICLINKDIRS})
set_source_files_properties(${AXI4MM_SOURCES} ${COMMON_SOURCES} PROPERTIES COMPILE_FLAGS ${TAPASCO_CFLAGS})
add_library(tapasco SHARED ${AXI4MM_SOURCES} ${COMMON_SOURCES})
add_library(libtapasco-static STATIC ${AXI4MM_SOURCES} ${COMMON_SOURCES} ${TAPASCO_PLATFORM_LIB})
target_link_libraries(tapasco platform atomic pthread)
set_target_properties(libtapasco-static PROPERTIES OUTPUT_NAME tapasco)
install(TARGETS tapasco libtapasco-static
LIBRARY DESTINATION "lib/${TAPASCO_TARGET}"
ARCHIVE DESTINATION "lib/${TAPASCO_TARGET}/static")
......@@ -10,8 +10,7 @@ set(CMAKE_INSTALL_PREFIX "${TAPASCO_HOME}/lib")
set(SRCDIR "src")
set(CMNDIR "../common/src")
set(AXI4MM_SOURCES "${SRCDIR}/tapasco_axi4mm.c"
"${SRCDIR}/tapasco_device.c"
set(AXI4MM_SOURCES "${SRCDIR}/tapasco_device.c"
"${SRCDIR}/tapasco_regs.c")
set(COMMON_SOURCES "${CMNDIR}/tapasco_delayed_transfers.c"
"${CMNDIR}/tapasco_device.c"
......
//
// Copyright (C) 2014-2018 Jens Korinth, TU Darmstadt
//
// This file is part of Tapasco (TAPASCO).
//
// 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_axi4mm.c
//! @authors J. Korinth, TU Darmstadt (jk@esa.cs.tu-darmstadt.de)
//!
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <tapasco.h>
#include <tapasco_context.h>
#include <tapasco_errors.h>
#include <tapasco_logging.h>
struct tapasco_ctx {
tapasco_dev_ctx_t *dev_ctx;
};
tapasco_dev_ctx_t *tapasco_context_device(tapasco_ctx_t *ctx)
{
return ctx->dev_ctx;
}
// declare logging exit for flushing
// TODO: is it possible to handle this more nicely?
extern void platform_logging_exit(void);
static
void _flush_logs_on_sigint(int sig)
{
LOG(LALL_INIT, "caught SIGINT, flushing logs and leaving the sinking ship");
tapasco_logging_exit();
platform_logging_exit();
exit(sig);
}
static
int _tapasco_install_sigint_handler()
{
struct sigaction act;
memset(&act, '\0', sizeof(act));
act.sa_handler = &_flush_logs_on_sigint;
return sigaction(SIGINT, &act, NULL) + sigaction(SIGABRT, &act, NULL);
}
tapasco_res_t _tapasco_init(const char *const version, tapasco_ctx_t **ctx)
{
tapasco_logging_init();
LOG(LALL_INIT, "version: %s, expected version: %s", tapasco_version(),
version);
if (tapasco_check_version(version) != TAPASCO_SUCCESS) {
ERR("version mismatch: found %s, expected %s",
tapasco_version(), version);
return TAPASCO_ERR_VERSION_MISMATCH;
}
*ctx = (tapasco_ctx_t *)malloc(sizeof(**ctx));
if (! *ctx) {
ERR("could not allocate tapasco context");
return TAPASCO_ERR_OUT_OF_MEMORY;
}
// install signal handler
if (_tapasco_install_sigint_handler()) {
ERR("could not install signal handler: %s", strerror(errno));
free(*ctx);
return TAPASCO_ERR_UNKNOWN_ERROR;
}
LOG(LALL_INIT, "tapasco initialization done");
return TAPASCO_SUCCESS;
}
void tapasco_deinit(tapasco_ctx_t *ctx)
{
LOG(LALL_INIT, "shutting down TaPaSCo");
if (ctx) {
free(ctx);
}
LOG(LALL_INIT, "all's well that ends well, bye");
tapasco_logging_exit();
}
//
// Copyright (C) 2014 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_device.c
//! @brief Zynq Platform device struct and helper methods.
//! Makes extensive use of the arch/common code snippets to
//! implement the various TPC API calls.
//! @authors J. Korinth, TU Darmstadt (jk@esa.cs.tu-darmstadt.de)
//!
//! @todo Remove stdio and debug output.
#include <stdio.h>
#include <assert.h>
#include <tapasco_device.h>
#include <tapasco_jobs.h>
#include <tapasco_regs.h>
#include <tapasco_scheduler.h>
#include <tapasco_logging.h>
#include <tapasco_local_mem.h>
#include <platform.h>
#include <platform_errors.h>
#include <platform_info.h>
/** Internal device struct implementation. */
struct tapasco_dev_ctx {
tapasco_ctx_t *ctx;
tapasco_pemgmt_t *pemgmt;
tapasco_jobs_t *jobs;
tapasco_dev_id_t id;
tapasco_local_mem_t *lmem;
platform_ctx_t *pctx;
};
tapasco_ctx_t *tapasco_device_context(tapasco_dev_ctx_t const *ctx)
{
assert(ctx);
return ctx->ctx;
}
tapasco_pemgmt_t *tapasco_device_pemgmt(tapasco_dev_ctx_t const *ctx)
{
assert(ctx);
return ctx->pemgmt;
}
tapasco_local_mem_t *tapasco_device_local_mem(tapasco_dev_ctx_t const *ctx)
{
assert(ctx);
return ctx->lmem;
}
tapasco_jobs_t *tapasco_device_jobs(tapasco_dev_ctx_t const *ctx)
{
assert(ctx);
return ctx->jobs;
}
platform_ctx_t *tapasco_device_platform(tapasco_dev_ctx_t const *ctx)
{
assert(ctx);
return ctx->pctx;
}
/** System setup function. */
static void setup_system(tapasco_dev_ctx_t *dev_ctx)
{
// enable interrupts, globally and for each instance
tapasco_pemgmt_setup_system(dev_ctx, dev_ctx->pemgmt);
}
tapasco_res_t tapasco_create_device(tapasco_ctx_t *ctx,
tapasco_dev_id_t const dev_id,
tapasco_dev_ctx_t **pdev_ctx,
tapasco_device_create_flag_t const flags)
{
tapasco_dev_ctx_t *p = (tapasco_dev_ctx_t *)
malloc(sizeof(struct tapasco_dev_ctx));
if (! p) {
ERR("could not allocate tapasco device context");
return TAPASCO_ERR_OUT_OF_MEMORY;
}
platform_res_t pr = platform_init(&p->pctx);
if (pr != PLATFORM_SUCCESS) {
ERR("platform context init failed, error: %s (%d)",
platform_strerror(pr), pr);
return TAPASCO_ERR_PLATFORM_FAILURE;
}
tapasco_res_t res = tapasco_pemgmt_init(p, &p->pemgmt);
res = res == TAPASCO_SUCCESS ? tapasco_jobs_init(&p->jobs) : res;
res = res == TAPASCO_SUCCESS ? tapasco_local_mem_init(p,
&p->lmem) : res;
if (res != TAPASCO_SUCCESS) return res;
p->ctx = ctx;
p->id = dev_id;
*pdev_ctx = p;
setup_system(p);
LOG(LALL_DEVICE, "device %d created successfully", dev_id);
return TAPASCO_SUCCESS;
}
void tapasco_destroy_device(tapasco_ctx_t *ctx, tapasco_dev_ctx_t *dev_ctx)
{
tapasco_local_mem_deinit(dev_ctx->lmem);
tapasco_jobs_deinit(dev_ctx->jobs);
tapasco_pemgmt_deinit(dev_ctx->pemgmt);
platform_deinit(dev_ctx->pctx);
free(dev_ctx);
}
uint32_t tapasco_device_func_instance_count(tapasco_dev_ctx_t *dev_ctx,
tapasco_kernel_id_t const k_id)
{
assert(dev_ctx);
//! @todo Remove this when custom AXI regset IP core is available.
return tapasco_pemgmt_count(dev_ctx->pemgmt, k_id);
}
tapasco_res_t tapasco_device_load_bitstream_from_file(tapasco_dev_ctx_t *dev_ctx,
char const *filename,
tapasco_load_bitstream_flag_t const flags)
{
return TAPASCO_ERR_NOT_IMPLEMENTED;
}
tapasco_res_t tapasco_device_load_bitstream(tapasco_dev_ctx_t *dev_ctx, size_t const len,
void const *data,
tapasco_load_bitstream_flag_t const flags)
{
return TAPASCO_ERR_NOT_IMPLEMENTED;
}
tapasco_res_t tapasco_device_acquire_job_id(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t *j_id,
tapasco_kernel_id_t const k_id,
tapasco_device_acquire_job_id_flag_t flags)
{
if (flags) return TAPASCO_ERR_NOT_IMPLEMENTED;
*j_id = tapasco_jobs_acquire(dev_ctx->jobs);
if (*j_id > 0)
tapasco_jobs_set_kernel_id(dev_ctx->jobs, *j_id, k_id);
return *j_id > 0 ? TAPASCO_SUCCESS : TAPASCO_ERR_UNKNOWN_ERROR;
}
void tapasco_device_release_job_id(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t const job_id)
{
tapasco_jobs_release(dev_ctx->jobs, job_id);
}
tapasco_res_t tapasco_device_job_launch(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t const j_id,
tapasco_device_job_launch_flag_t const flags)
{
tapasco_res_t const r = tapasco_scheduler_launch(dev_ctx, j_id);
if (r != TAPASCO_SUCCESS || (flags & TAPASCO_DEVICE_JOB_LAUNCH_NONBLOCKING)) {
return r;
} else {
return tapasco_scheduler_finish_job(dev_ctx, j_id);
}
}
tapasco_res_t tapasco_device_job_get_arg(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t const j_id,
size_t arg_idx,
size_t const arg_len,
void *arg_value)
{
return tapasco_jobs_get_arg(dev_ctx->jobs, j_id, arg_idx, arg_len, arg_value);
}
tapasco_res_t tapasco_device_job_set_arg(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t const j_id,
size_t arg_idx,
size_t const arg_len,
void const *arg_value)
{
return tapasco_jobs_set_arg(dev_ctx->jobs, j_id, arg_idx, arg_len, arg_value);
}
tapasco_res_t tapasco_device_job_set_arg_transfer(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t const job_id,
size_t arg_idx,
size_t const arg_len,
void *arg_value,
tapasco_device_alloc_flag_t const flags,
tapasco_copy_direction_flag_t const dir_flags)
{
return tapasco_jobs_set_arg_transfer(dev_ctx->jobs, job_id, arg_idx,
arg_len, arg_value, flags, dir_flags);
}
tapasco_res_t tapasco_device_job_get_return(tapasco_dev_ctx_t *dev_ctx,
tapasco_job_id_t const j_id,
size_t const ret_len,
void *ret_value)
{
return tapasco_jobs_get_return(dev_ctx->jobs, j_id, ret_len, ret_value);
}
tapasco_res_t tapasco_device_has_capability(tapasco_dev_ctx_t *dev_ctx,
tapasco_device_capability_t cap)
{
platform_ctx_t *pctx = tapasco_device_platform(dev_ctx);
assert(pctx);
platform_info_t info;
platform_info(pctx, &info);
return info.caps0 & cap;
}
......@@ -27,8 +27,6 @@
#include <tapasco_regs.h>
#include <tapasco_device.h>
#include <platform.h>
#include <platform_context.h>
#include <platform_addr_map.h>
#define FIRST_ARG_OFFSET 0x20
#define ARG_OFFSET 0x10
......@@ -37,37 +35,21 @@
#define IAR_OFFSET 0x0c
#define RET_OFFSET 0x10
static tapasco_handle_t _bases[TAPASCO_NUM_SLOTS] = { 0 };
static inline tapasco_handle_t base_addr(tapasco_dev_ctx_t const *dev_ctx,
tapasco_slot_id_t const slot_id)
{
assert(slot_id < TAPASCO_NUM_SLOTS);
platform_ctx_t *pctx = tapasco_device_platform(dev_ctx);
platform_addr_map_t *am = platform_context_addr_map(pctx);
if (! _bases[slot_id]) {
platform_addr_map_get_slot_base(am, slot_id, &_bases[slot_id]);
}
return _bases[slot_id];
}
tapasco_handle_t tapasco_regs_arg_register(
tapasco_dev_ctx_t const *dev_ctx,
tapasco_devctx_t const *devctx,
tapasco_slot_id_t const slot_id,
size_t const arg_idx)
{
tapasco_handle_t base = base_addr(dev_ctx, slot_id);
return base
return devctx->info.base.arch[slot_id]
+ FIRST_ARG_OFFSET
+ arg_idx * ARG_OFFSET;
}
tapasco_handle_t tapasco_regs_named_register(tapasco_dev_ctx_t const *dev_ctx,
tapasco_handle_t tapasco_regs_named_register(tapasco_devctx_t const *devctx,
tapasco_slot_id_t const slot_id,
tapasco_reg_t const reg)
{
tapasco_handle_t const base = base_addr(dev_ctx, slot_id);
tapasco_handle_t const base = devctx->info.base.arch[slot_id];
switch (reg) {
case TAPASCO_REG_CTRL:
return base;
......
//
// Copyright (C) 2018 Jens Korinth, TU Darmstadt
//
// This file is part of Tapasco (TPC).
// This file is part of Tapasco (TaPaSCo).
//
// 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
......@@ -23,4 +23,14 @@
#ifndef TAPASCO_CONTEXT_H__
#define TAPASCO_CONTEXT_H__
#include <tapasco_types.h>
#include <platform.h>
struct tapasco_ctx {
platform_ctx_t *pctx;
size_t num_devices;
platform_device_info_t *devinfo;
tapasco_devctx_t *devs[PLATFORM_MAX_DEVS];
};
#endif /* TAPASCO_CONTEXT_H__ */
......@@ -26,24 +26,24 @@
#include <tapasco_jobs.h>
#include <tapasco_types.h>
tapasco_res_t tapasco_transfer_to(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_transfer_to(tapasco_devctx_t *dev_ctx,
tapasco_job_id_t const j_id,
tapasco_transfer_t *t,
tapasco_slot_id_t s_id);
tapasco_res_t tapasco_transfer_from(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_transfer_from(tapasco_devctx_t *dev_ctx,
tapasco_jobs_t *jobs,
tapasco_job_id_t const j_id,
tapasco_transfer_t *t,
tapasco_slot_id_t s_id);
tapasco_res_t tapasco_write_arg(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_write_arg(tapasco_devctx_t *dev_ctx,
tapasco_jobs_t *jobs,
tapasco_job_id_t const j_id,
tapasco_handle_t const h,
size_t const a);
tapasco_res_t tapasco_read_arg(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_read_arg(tapasco_devctx_t *dev_ctx,
tapasco_jobs_t *jobs,
tapasco_job_id_t const j_id,
tapasco_handle_t const h,
......
......@@ -29,13 +29,29 @@
#include <tapasco_jobs.h>
#include <platform_types.h>
tapasco_ctx_t *tapasco_device_context(tapasco_dev_ctx_t const *dev_ctx);
tapasco_pemgmt_t *tapasco_device_pemgmt(tapasco_dev_ctx_t const *dev_ctx);
tapasco_local_mem_t *tapasco_device_local_mem(tapasco_dev_ctx_t const *dev_ctx);
tapasco_jobs_t *tapasco_device_jobs(tapasco_dev_ctx_t const *dev_ctx);
platform_ctx_t *tapasco_device_platform(tapasco_dev_ctx_t const *dev_ctx);
struct tapasco_devctx {
tapasco_dev_id_t id;
platform_info_t info;
tapasco_pemgmt_t *pemgmt;
tapasco_jobs_t *jobs;
tapasco_local_mem_t *lmem;
platform_ctx_t *pctx;
platform_devctx_t *pdctx;
void *private_data;
};
tapasco_res_t tapasco_device_info(tapasco_dev_ctx_t const *dev_ctx,
platform_info_t *info);
tapasco_res_t tapasco_create_device(tapasco_ctx_t *ctx,
tapasco_dev_id_t const dev_id,
tapasco_devctx_t **pdev_ctx,
tapasco_device_create_flag_t const flags);
void tapasco_destroy_device(tapasco_ctx_t *ctx, tapasco_devctx_t *dev_ctx);
static inline
uint32_t tapasco_device_func_instance_count(tapasco_devctx_t *dev_ctx,
tapasco_kernel_id_t const k_id)
{
assert(dev_ctx);
return tapasco_pemgmt_count(dev_ctx->pemgmt, k_id);
}
#endif /* TAPASCO_DEVICE_H__ */
......@@ -36,7 +36,7 @@ typedef struct tapasco_local_mem tapasco_local_mem_t;
* @param lmem output pointer to initialize
* @return TAPASCO_SUCCESS if successful, an error code otherwise
**/
tapasco_res_t tapasco_local_mem_init(tapasco_dev_ctx_t const *dev_ctx,
tapasco_res_t tapasco_local_mem_init(tapasco_devctx_t *dev_ctx,
tapasco_local_mem_t **lmem);
void tapasco_local_mem_deinit(tapasco_local_mem_t *lmem);
......
......@@ -34,7 +34,7 @@
* @param flags device memory allocation flags
* @return TAPASCO_SUCCESS if successful, error code otherwise
**/
tapasco_res_t tapasco_device_alloc(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_device_alloc(tapasco_devctx_t *dev_ctx,
tapasco_handle_t *handle, size_t const len,
tapasco_device_alloc_flag_t const flags,
...);
......@@ -45,7 +45,7 @@ tapasco_res_t tapasco_device_alloc(tapasco_dev_ctx_t *dev_ctx,
* @param handle memory chunk handle returned by @see tapasco_alloc
* @param flags device memory allocation flags
**/
void tapasco_device_free(tapasco_dev_ctx_t *dev_ctx,
void tapasco_device_free(tapasco_devctx_t *dev_ctx,
tapasco_handle_t handle,
tapasco_device_alloc_flag_t const flags,
...);
......@@ -59,7 +59,7 @@ void tapasco_device_free(tapasco_dev_ctx_t *dev_ctx,
* @param flags flags for copy operation, e.g., TAPASCO_COPY_NONBLOCKING
* @return TAPASCO_SUCCESS if copy was successful, an error code otherwise
**/
tapasco_res_t tapasco_device_copy_to(tapasco_dev_ctx_t *dev_ctx, void const *src,
tapasco_res_t tapasco_device_copy_to(tapasco_devctx_t *dev_ctx, void const *src,
tapasco_handle_t dst, size_t len,
tapasco_device_copy_flag_t const flags,
...);
......@@ -73,7 +73,7 @@ tapasco_res_t tapasco_device_copy_to(tapasco_dev_ctx_t *dev_ctx, void const *src
* @param flags flags for copy operation, e.g., TAPASCO_COPY_NONBLOCKING
* @return TAPASCO_SUCCESS if copy was successful, an error code otherwise
**/
tapasco_res_t tapasco_device_copy_from(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_device_copy_from(tapasco_devctx_t *dev_ctx,
tapasco_handle_t src,
void *dst, size_t len,
tapasco_device_copy_flag_t const flags,
......@@ -89,7 +89,7 @@ tapasco_res_t tapasco_device_copy_from(tapasco_dev_ctx_t *dev_ctx,
* @param slot_id PE-local memory slot
* @return TAPASCO_SUCCESS if copy was successful, an error code otherwise
**/
tapasco_res_t tapasco_device_copy_to_local(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_device_copy_to_local(tapasco_devctx_t *dev_ctx,
void const *src,
tapasco_handle_t dst,
size_t len,
......@@ -106,7 +106,7 @@ tapasco_res_t tapasco_device_copy_to_local(tapasco_dev_ctx_t *dev_ctx,
* @param slot_id PE-local memory slot
* @return TAPASCO_SUCCESS if copy was successful, an error code otherwise
**/
tapasco_res_t tapasco_device_copy_from_local(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_device_copy_from_local(tapasco_devctx_t *dev_ctx,
tapasco_handle_t src,
void *dst,
size_t len,
......
......@@ -36,7 +36,7 @@ typedef struct tapasco_pemgmt tapasco_pemgmt_t;
* @param pes pointer to internal functions struct pointer.
* @return TAPASCO_SUCCESS if successful.
**/
tapasco_res_t tapasco_pemgmt_init(const tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_pemgmt_init(const tapasco_devctx_t *dev_ctx,
tapasco_pemgmt_t **pes);
/**
......@@ -51,7 +51,7 @@ void tapasco_pemgmt_deinit(tapasco_pemgmt_t *pes);
* @param dev_ctx device context.
* @param ctx functions context.
**/
void tapasco_pemgmt_setup_system(tapasco_dev_ctx_t *dev_ctx,
void tapasco_pemgmt_setup_system(tapasco_devctx_t *dev_ctx,
tapasco_pemgmt_t *ctx);
/**
......@@ -89,7 +89,7 @@ size_t tapasco_pemgmt_count(tapasco_pemgmt_t const *ctx,
* @param slot_id id of the slot.
* @return TAPASCO_SUCCESS if successful, an error code otherwise.
**/
tapasco_res_t tapasco_pemgmt_prepare_slot(tapasco_dev_ctx_t *dev_ctx,
tapasco_res_t tapasco_pemgmt_prepare_slot(tapasco_devctx_t *dev_ctx,
tapasco_job_id_t const j_id,
tapasco_slot_id_t const slot_id);
......@@ -98,7 +98,7 @@ tapasco_res_t tapasco_pemgmt_prepare_slot(tapasco_dev_ctx_t *dev_ctx,
* @param slot_id id of the slot to start.
* @return TAPASCO_SUCCESS if successful, an error code otherwise.
**/