Giter VIP home page Giter VIP logo

artico3's Introduction

==============
ARTICo3 Primer
==============

ARTICo3 is a reconfigurable computing architecture based on multiple
hardware acceleration, and able to provide dynamic and adaptive behavior
at runtime by trading off between its three main pillars (*):
    - Computing Performance
    - Energy Consumption
    - Fault Tolerance

ARTICo3 uses slot-based Dynamic and Partial Reconfiguration (DPR) to
provide module replication, a feature that is combined with a configurable
datapath to support different data transfer patterns (SIMD-like execution,
nMR redundant execution).

This repository contains the ARTICo3 framework, which consists of the
basic hardware infrastructure (VHDL IP cores), as well as the runtime
API used to execute user applications with explicit task- and data-level
parallelism under Linux.

Users can found more information on the different development stages in
the doc/ folder.


(*) ARTICo3 stands for Reconfigurable Architecture to enable Intelligent
Management of Computing performance, energy Consumption and Dependability
(in Spanish, "Arquitectura Reconfigurable para el Tratamiento Inteligente
de Cómputo, Consumo y Confiabilidad").

artico3's People

Contributors

alfonrod avatar

Stargazers

 avatar Frieden_Ls avatar Darwin avatar Victor O. Costa avatar  avatar Leonardo Suriano avatar Honorat avatar

Watchers

James Cloos avatar  avatar

artico3's Issues

Deprecated Xilinx tools paths

Script files in the ARTICo³ Development Kit (tools/_pypack/artico3/scripts) currently rely on older Xilinx installation paths and should be updated accordingly. Hence,

/opt/Xilinx/Vivado/<version>/settings64.sh
/opt/Xilinx/SDK/<version>/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-
/opt/Xilinx/SDK/<version>/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-

should become:

/tools/Xilinx/Vivado/<version>/settings64.sh
/tools/Xilinx/Vitis/<version>/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-
/tools/Xilinx/Vitis/<version>/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-

Multikernel execution crashes OS

The current implementation of the Linux driver does not support execution environments in which 3 or more kernels are allocated in the runtime. This is due to a misunderstanding on how the poll() syscall works.

This syscall was introduced to transition to an interrupt-based approach rather than busy waiting on a register in the scheduling thread while a) performing DMA transfers from software to accelerators (or viceversa) and/or b) waiting for accelerators to finish their execution. The binary masks are now defined as follows:

#define POLLDMA 0x0001
#define POLLIRQ(id) (1 << id)

However, with this approach, kernel ID masks overlap with some predefined events, i.e., POLLHUP, POLLERR, and POLLNVAL, defined in poll.h. The current event mapping should be changed to avoid run-time problems (e.g., OS crashing).

System crash after reloading Linux driver

Removing the Linux driver and inserting it again causes the whole system to crash, entering in an unrecoverable state. The problem seems to be related to the way the ARTICo³ IRQ is handled in the kernel code (i.e., request_irq()).

root@linaro-developer:~# modprobe martico3
root@linaro-developer:~# modprobe -r martico3
root@linaro-developer:~# modprobe martico3
Unable to handle kernel paging request at virtual address bf008139
pgd = d5e34000
[bf008139] *pgd=15e9d811, *pte=00000000, *ppte=00000000
Internal error: Oops - BUG: 7 [#1] PREEMPT SMP ARM
Modules linked in: martico3(O+) xilinx_devcfg [last unloaded: martico3]
CPU: 1 PID: 1784 Comm: modprobe Tainted: G           O    4.9.0-xilinx-dirty #1
Hardware name: Xilinx Zynq Platform
task: df605640 task.stack: defd6000
PC is at string+0x2c/0x74
LR is at 0xffffffff
pc : [<c02e2590>]    lr : [<ffffffff>]    psr: 00000093
sp : defd7c08  ip : c0a3b7b4  fp : 000003e0
r10: c07d516c  r9 : defd7c30  r8 : c0a3b3d4
r7 : c0a3b7b4  r6 : defd7cf8  r5 : c0a3b417  r4 : defd7cf4
r3 : c07ea12f  r2 : bf008139  r1 : 00000000  r0 : c0a3b417
Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 15e3404a  DAC: 00000051
Process modprobe (pid: 1784, stack limit = 0xdefd6210)
Stack: (0xdefd7c08 to 0xdefd8000)
7c00:                   c0a3b417 c0a3b7b4 bf008139 c02e4b34 c0a3b417 ffffff04
7c20: ffff0a00 ffff1030 ffffffff 00000002 ffffff04 ffff0a00 0000003d 000003e0
7c40: 00000001 00000000 ffffffff c0a0c698 c0a3aa68 00000000 00000000 c02e4c7c
7c60: 00000000 c01529e0 00000000 defd7ca0 dfbb23a0 c01586c4 00000000 dfbb23a0
7c80: 00000000 00000000 60000093 00000000 df6320c4 defd7ce4 c0152d34 00000000
7ca0: df5e5800 000000a4 df6320c0 df56f460 60000013 c0152d50 c07d5135 defd7ce4
7cc0: 00000001 c018ff8c c07d5135 defd7ce4 00000001 df56f400 d5d05dc0 c0156090
7ce0: c07d5135 000000a4 00000001 bf00d139 00000001 bf008139 00000000 00000000
7d00: df56f400 d5d05dc0 00000000 df56f400 df56f410 000000a4 df6320c0 00000000
7d20: c0176228 c01562b0 df6320c0 deefb010 00000000 df6320c0 deefb000 df6320c4
7d40: bf00d139 bf00c990 bf00d139 df6320c0 defd7d04 d5d05040 bf00c76c deefb010
7d60: bf00d328 bf00d328 00000003 00000001 df5e5c64 c039b168 deefb010 c0a5c988
7d80: 00000000 c0399c04 deefb010 deefb044 bf00d328 c0a19c18 df5e5c40 c0399d44
7da0: 00000000 bf00d328 c0399cc8 c0398474 df4abf5c d5c592b4 bf00d328 dec5d180
7dc0: 00000000 c0399364 bf00d139 bf00d13a 00000000 bf00d328 bf00d540 00000000
7de0: bf00d3c8 c039a460 d5d05580 bf00d540 00000000 bf00f050 ffffe000 bf00f000
7e00: 00000000 c01017b4 defd7e10 c012c408 00000000 a0000013 00000000 bf00d3c8
7e20: 00000000 c0a13b3c deddd9c0 d5d6601c dfe731e0 c0a318c0 c0a318c0 00015d8f
7e40: 00000000 00000000 df5e5c64 a0000013 d5c57740 00000001 bf00d380 defd7f54
7e60: d5c57740 df5e5c40 00000001 c01902a0 bf00d380 d5c57740 bf00d380 defd7f54
7e80: 00000001 c0178c0c bf00d38c 00007fff bf00d380 c0176370 defd7f48 e0b6e000
7ea0: c0176298 0000008d e0b71bd0 bf00d52c 7f5abadc 00000027 00003c20 c01d2820
7ec0: 00003c20 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7f00: 00000000 00000000 7fffffff 00000000 7f5abadc 00000003 0000017b c0106da4
7f20: defd6000 00000000 7f5bfe48 c01793a0 7fffffff 00000000 00000003 00000000
7f40: 00003c20 e0b6e000 00003c20 00000000 7f5bfe48 e0b6e000 00003c20 e0b71658
7f60: e0b714c0 e0b70ad0 00001574 000017f4 00000000 00000000 00000000 00000e6c
7f80: 00000023 00000024 00000019 0000001d 00000014 00000000 7f5bfe48 7f5bf178
7fa0: 30481600 c0106be0 7f5bfe48 7f5bf178 00000003 7f5abadc 00000000 7f5ac1b0
7fc0: 7f5bfe48 7f5bf178 30481600 0000017b 00040000 00000000 00000000 7f5bfe48
7fe0: be86d928 be86d918 7f5a33af b6e99012 60000030 00000003 00000000 00000000
[<c02e2590>] (string) from [<c02e4b34>] (vsnprintf+0x1f8/0x334)
[<c02e4b34>] (vsnprintf) from [<c02e4c7c>] (vscnprintf+0xc/0x24)
[<c02e4c7c>] (vscnprintf) from [<c01529e0>] (vprintk_emit+0x1fc/0x3f4)
[<c01529e0>] (vprintk_emit) from [<c0152d50>] (vprintk_default+0x1c/0x24)
[<c0152d50>] (vprintk_default) from [<c018ff8c>] (printk+0x68/0x7c)
[<c018ff8c>] (printk) from [<c0156090>] (__setup_irq+0x550/0x5d0)
[<c0156090>] (__setup_irq) from [<c01562b0>] (request_threaded_irq+0x104/0x14c)
[<c01562b0>] (request_threaded_irq) from [<bf00c990>] (artico3_probe+0x224/0x288 [martico3])
[<bf00c990>] (artico3_probe [martico3]) from [<c039b168>] (platform_drv_probe+0x50/0x9c)
[<c039b168>] (platform_drv_probe) from [<c0399c04>] (driver_probe_device+0x1b0/0x274)
[<c0399c04>] (driver_probe_device) from [<c0399d44>] (__driver_attach+0x7c/0xa8)
[<c0399d44>] (__driver_attach) from [<c0398474>] (bus_for_each_dev+0x7c/0x8c)
[<c0398474>] (bus_for_each_dev) from [<c0399364>] (bus_add_driver+0x16c/0x1dc)
[<c0399364>] (bus_add_driver) from [<c039a460>] (driver_register+0xa0/0xe0)
[<c039a460>] (driver_register) from [<bf00f050>] (artico3_init+0x50/0x8c [martico3])
[<bf00f050>] (artico3_init [martico3]) from [<c01017b4>] (do_one_initcall+0x100/0x120)
[<c01017b4>] (do_one_initcall) from [<c01902a0>] (do_init_module+0x54/0x1b0)
[<c01902a0>] (do_init_module) from [<c0178c0c>] (load_module+0x16d4/0x1cb8)
[<c0178c0c>] (load_module) from [<c01793a0>] (SyS_finit_module+0x88/0x90)
[<c01793a0>] (SyS_finit_module) from [<c0106be0>] (ret_fast_syscall+0x0/0x3c)
Code: e1dde1fa 31a02003 e151000e 0a000002 (e4d23001) 
---[ end trace fa88ccb973e825a6 ]---

Kernel ID limitations

The current implementation of the Linux driver limits the maximum amount of kernels that can be simultaneously allocated in the runtime. This limitation comes from the implemented interrupt handling mechanism, which is based on the poll() syscall.

Hence, the current limitations to the number of simultaneous kernels allocated in the runtime are:

Hardware: 4-bit signal, ID 0 reserved, 15 kernels.
Software: short data type (16 bits) to store events from poll(), 1 event for DMA completion, 3 for errors, 12 free (non contiguous).

To keep the implementation scheme simple, events for kernel IDs should go from 0x0040 to 0x8000 (i.e., avoiding 0x0002 and 0x0004). If implemented, this would limit the maximum number of simultaneous kernels allocated in the runtime to 10.

Improving error messages

When no more artico3 slots are loaded in the FPGA, and/or no more artico3 structures in the sw memory (for example after a artico3_exit() or artico3_release() or before artico3_init()) are allocated, if we try to access an artico3 hardware structure (that clearly does not exit), a Segmentation Fault is generated.
Instead, a message like no artico3 structure available can make the sw debug easier.

That is not a bug but a future error message improvement (I cannot assign the label improvement because I do not have the right).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.