Other articles


  1. Day 9: Week summary

    In the "thesis reboot" post, I brought back from the dead the dusty implementation of my master thesis. Seeing that it was still (almost) working, a week off work was planned to prepare its adaptation to the almighty OpenCL. This post summarizes what this week was all about.

    TL; DR …

    read more
  2. Day 9: OpenCL target debugging with gdb-igfx

    How to use Intel gdb-igfx to debug Intel GPU.

    Everything starts with this article: Getting Started with Debugging with Intel® Parallel Studio XE 2016 [1]. unfortunately, the article is quite old now ("Last updated on August 25, 2015") and not really up-to-date anymore.

    No, wait, there is a newer version …

    read more
  3. Day 8: OpenCL blocks

    How to have a function taking a callback as parameter?

    You cannot use function pointers in OpenCL, even if they can be resolved during compilation.

    It is not possible to write this (while it works in CUDA since the beginning):

    void do_operation(const int* A, const int* B, int* C …
    read more
  4. Day 6: OpenCL malloc

    How to make OpenCL memory allocation functions more like normal malloc/memcpy?

    The problem

    There is a problem with clCreateBuffer [1] is that it returns an opaque cl_mem object, rather than a good old pointer to the allocated memory.

    cl_mem clCreateBuffer (
        cl_context context,
        cl_mem_flags flags,
        size_t size,
        void *host_ptr,
        cl_int …
    read more
  5. Day 7: OpenCL on ARM Mali

    Surprisingly, ARM Mali and Intel HD Graphics GPUs are similar in their design, in comparison to NVidia and AMD's designs.

    Intel and ARM are friendlier to divergent threads

    On the left, ARM Mali [ARM], on the right Intel IGP [INTEL].

    The similarity seems to stem from the two companies having …

    read more
  6. Day 5: OpenCL basics

    What is a device, a compute unit (CU), a work-group, a work-item, a command-queue?

    Work-group vs Work-item

    From [1]:
    A multi-core CPU or multiple CPUs (in a multi-socket machine) constitute a single OpenCL device. Separate cores are compute units. Work-group [is a ] a collection of related work-items that execute on …
    read more
  7. Day 4: v_mem_manager and spinlock

    The simple memory manager of v_array [V_ARRAY] needs a lock on the bitfield which keeps the state of the memory chunks (i.e., allocated or free).

    How to implement this lock on CPU and on GPU? [1].

    Bonus question: in an unified memory environment, how to make it so that …

    read more
  8. Thesis reboot: project setup

    Easy start: let us do CPU-only first

    gputwigstack [1] is the result of a Master research about XML query processing on GPGPU [2].

    Image source: [3] [4].

    Three steps:

    1. metadata generation from parsing XML file
    2. database creation
    3. query processing

    What you will need to build

    Dependencies:

    • scons software construction tool …
    read more
  9. Intel NUC6i7KYK "Skull Canyon"

    Nuc! Nuc! Nûûûûc!

    Review

    Japanese review with nice pictures of the internals [1].

    For example, the CPU:

    Source: [2]

    The long silicon die on the left is the 4-core CPU and the 72-execution-unit GPU. The smaller silicon die on the right is the 128MB eDRAM [3] L4 cache shared by …

    read more
  10. The return of the forgotten Master thesis

    The Master thesis returns after seven years!

    Seven years ago...

    Seven years ago, I wrote my Master thesis [1] about using GPGPU for processing queries on XML trees.

    Unfortunately, the result was not impressive. There were two major drawbacks:

    • It was required to first copy XML metadata to the GPU …
    read more
  11. Intel IGP, OpenCL, and GDB

    So nice!

    Just discovered that Intel provides a special version of GDB for debugging OpenCL kernels on their GPU [1]. What a great move!

    Knowing Intel, I was already imagining that they would have a fully proprietary solution like the Intel debugger [2]. Fortunately, they deprecated it in 2013 in …

    read more
  12. Intel IGP, OpenCL compute units, and divergent threads

    How many OpenCL compute unit has an Intel integrated graphic processor? aka How many divergent threads can be run in parallel?

    On the quest to finding the OpenCL-compatible device having the largest amount of compute units (CU), it seems that around 30 CU, latest nVIDIA achitectures tend to feature a …

    read more
  13. Super Nintendo gamepad to keyboard adapter

    Convert a Super Nintendo gamepad to an USB keyboard.

    Ever wondered if you could type using a gamepad? On one side, a standard keyboard with its 100+ keys gives you direct access to most characters, but is not very confortable to use since you have to move your hands. On …

    read more
  14. firefox in docker and ssh tunnel

    How to run firefox inside a docker container?

    firefox in docker

    Adapted from [1] for debian:jessie-slim:

    FROM debian:jessie-slim
    
    RUN apt-get update && \
            apt-get install -y firefox-esr && \
            apt-get clean
    
    RUN groupadd --gid 1000 user && \
            useradd --uid 1000 --gid 1000 --create-home user
    
    USER user
    CMD /usr/bin/firefox-esr
    

    Build the image …

    read more
  15. Howto clone an SD-card

    How to clone an SD-card?

    ~$ sudo dd if=/dev/mmcblk0 of=image.img bs=4M status=progress
    5783945216 bytes (5,8 GB, 5,4 GiB) copied, 81,031 s, 71,4 MB/s
    [...]
    3835+1 records in
    3835+1 records out
    16088301568 bytes (16 GB, 15 GiB) copied, 247,23 …
    read more
  16. Docker and Jenkins with chroot-based SDK

    How to run Jenkins via docker and build a project chrooting in a SDK?

    Easy

    docker is easy to install on Ubuntu [1].

    Starting a Jenkins container with a persistent volume is just as easy [2]:

    sudo docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v /var/jenkins_home …
    read more
  17. C++: enum range-based for loop

    Loop over all the members of an enumeration.

    #include <iterator>
    
    // Inspired from http://codereview.stackexchange.com/a/57699
    
    template<typename T, T... args>
    struct EnumIterAll
        : public std::iterator<
                                std::input_iterator_tag, // iterator_category
                                T,                       // value_type
                                std::ptrdiff_t,          // difference_type
                                const T*,                // pointer
                                const T&                 // reference
          >
    {
        static constexpr T values[] = {args...};
        static constexpr std …
    read more
  18. Placeholder for profiling links

    Beware link wall ahead

    Stumbling upon this page [1] ended up in a massive recurssive tree search. A stack of links where kept here.

    Profiling with gdb

    Why not profiling your application by sampling backtraces using gdb? This intuitive idea is easily adapted to remote debugging as well. [2]

    If …

    read more
  19. How to record your screen into an animated gif?

    How to record your screen into an animated gif with precise position and size?

    I would like to create an animated gif with a size of 800x600px. The canva should contain a web browser in the top half, and a command-line terminal in the bottom half.

    Placing the windows via …

    read more
  20. Intel debug port for Atom

    How to debug an Atom processor over JTAG?

    Official presentation of the "Intel JTAG debugger" is [1].

    The standard Intel debug port is the 60-pin XDP (eXtended Debug Port). It extends JTAG with additional signals. This port also has a lower pin count variant: the 31-pin XDP-SSA (Second Side Attach …

    read more
  21. Finally the right Eclipse project configuration!

    I don't want a fully fledged Eclipse project or depend on heavy Eclipse for anything.~

    I don't know if you have the same feeling, but it doesn't look like a good idea to depend on one heavy tool for anything in your electronic project. Having easy-to-understand scripts for building or …

    read more
  22. Thinking about going USB

    The USB specs are pretty large.

    Specifications

    USB 2.0 specs [1]. Explanations [2].

    Good description of the protocol [3].

    Another source [4].

    Protocol analyzers

    USB communications can be spyed with:

    Software Wireshark (example video there [5]).

    Hardware OpenVizsla An Open-source FPGA-based USB sniffer [6]... based of the Xilinx Spartan …

    read more
  23. Nothing works!

    Buying a cheap analog multimeter at Conrad [1]... and having to repair it right out of the box!

    The discret wire connecting the battery to the voltmeter line was broken. Fortunately, this analog multimeter is so simple that you can reverse engineer it easily and find the issue.

    References

    [1 …
    read more
  24. FLRe project overview

    Inside of the FLRe first complete prototype.

    The microcontroller and FPGA boards are inserted facing each other in the (upper and lower) PCB guide grooves of the enclosure.

    read more
  25. Reading from serial line

    Simple example code to read the serial port under GNU/Linux

    This code is expected to do something similar to

    cat /dev/ttyUSB0
    
    /* Reading from serial line
     * written by vjp
     * on 2015.03.12 */
    
    #include <stdio.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <sys …
    read more
  26. Setup of the FLRe test environment

    The FLRe automated test environment is meant to verify the validity of the FPGA dynamic reconfiguration code for all CLB (configurable logic block) of the Spartan-6 LX9 silicon die.

    The FLRe client is compiled on the Raspberry Pi and sends requests over UART to the demo board, which processes the …

    read more
  27. Dreaming of 0402?

    Dreaming of 0402? They are cute but damn small for handsoldering... or are they?

    Introducing the keyring-shaped 0402 challenge!

    An USB connector... a voltage regulator and its two capacitors... on a 2x2cm PCB... nothing special so far, but if you flip the board...

    ... a SMD soldering challenge!

    To light up …

    read more
  28. FLRe STM32F4 board (paper)

    FLRe microcontroller paper PCB is ready!

    All capacitors and resistors are in 0805 SMD size.

    The alignment of the pin header footprints don't match with the enclosure constrains. (u_u)

    read more
  29. FLRe STM32F4 board (misc. footprints)

    All the footprints are ready. The boot mode (BOOT0 and BOOT1) will be set via a SMD DIP switch. The different power supplies will be accessible throught 1.27mm-pitch THT pin headers.

    Board layout

    Now finally starts the fun of tidying everything of the board.

    As it can be guessed …

    read more
  30. FLRe STM32F4 board (part1)

    The schematic of the FLRe STM32F4 microcontroller board has started.

    read more
  31. vjCanUsb (intro)

    Presentation

    vjCanUsb is an USB-to-CAN interface featuring:

    • one STM32F4 ARM Cortex-M4 microcontroller running at 168MHz (192KB RAM, 1MB flash). The Complete datasheet: [DH].
    • two 3.3V LDO linear regulators, one for the digital as well as one dedicated to the analog power supply. USB power is filtered by a ferrite …
    read more
  32. Product thoughts - Microcontroller board initial layout

    Above: the STM32F40x in its LQFP64 package cannot be used because it lacks FSMC support (unbound silicium pads, see [1] rev.4 p. 59). The LQFP144 poackage has full FSMC support, while the LGFP100 package has limited support: data lines only, and no address lines. Since the address lines will …

    read more
  33. FLRe front panel

    Just got the PCB of the front panel...

    First experiences with the front panel

    The PCB matches the size of the metal cover of the enclosure with a surprising accuracy, and the result looks quite professional. About the PCB itself, most of the footprints are homemade, and one notices immediatly …

    read more
  34. Server reboot, first time

    Because of the required update of the glibc [1], I had to reboot the Raspberry Pi running this webserver. Just before it restarted for the first time, I quickly got the uptime of the server:

    The server is runnning fresh since today!

    References

    [1]GNU/Linux Glibc “Ghost” bug, https …
    read more
  35. Product thoughts - part2

    Dreaming of making a real-life product. Part two.

    I decided to go for a stacked two-PCB design with a front panel also made as a PCB. The Hammond 1455 enclosure is available in 80x50x20mm (approx.) dimensions. If no large components are used on one side of each PCB, two PCBs …

    read more
  36. Track length matching with KiCAD and FreeRouting

    KiCAD does not support length matching, but there is to achieve some manual length matching using FreeRouting [1]. Unfortunately, FreeRouting has little documentation outside of the official manual [2].The idea comes from this blog post at Numato Labs [3]. Designing a Spartan-6 FPGA board with SDRAM, they needed to …

    read more
  37. Product thoughts

    Dreaming of making a real-life product.

    PCB prototyping services

    Prices are for one 50x100mm 2-layer (front and back) standard PCB with green soldermask

    • http://www.jackaltac.com 37€ (includes 21% VAT), up to 100x100mm and top silkscreen, min track 0.15mm, min hole 0.3mm, made in South Africa and …
    read more
  38. FLRe project restarts!

    The FLRe project restarts... with my first coffee machine ever!

    Plan for the next steps: build an automated test system, so as to validate the FLRe source code for each LUT in the Spartan-6 LX9 FPGA. The test system will be supervised by a Raspberry Pi:

    Raspberry Pi -(uart)-> STM32F3 …
    read more
  39. No, computer science is not based on mathematics

    I have heard this sentence quite many times:

    Vincent: "I studied computer science..."

    Someone: "Oh! You must be good in mathematics then!"

    No! There is no need of mathematics to design a computer. Maybe this misconception comes from the English word computer itself, which is based on compute meaning calculate …

    read more
  40. C++: embedded driver code with static class and template

    #include <stdint.h>
    
    /* Base address of Device1 */
    #define DEVICE1 0x01234567
    
    struct MemoryMap {
            uint32_t Reg1;
            uint32_t Reg2;
    };
    
    template <uint32_t BASE_PTR>
    class MyDriver {
            public:
            static uint32_t MyMethod() {
                    return ((struct MemoryMap*)BASE_PTR)->Reg1;
            }
    };
    
    int main(int argc, char* argv[]) {
            uint32_t reg = MyDriver<DEVICE1>::MyMethod();
    
            return 0;
    }
    

    To avoid having to cast BASE_PTR all …

    read more

Page 1 / 1