brng.dev

Brandon's Bytes


Project: libmem [0]

04 Feb 2018


This post is a copy from my old website and blog. I have kept its original post date.

So I’m currently taking EE 382N.4 Advanced Micro-Controller Systems at UT, taught by Dr. Mark McDermott. The class revolves around working wiht a ZedBoard, which has a Xilinx Zynq-7020 SoC combining two ARM Cortex-A9 cores with an FPGA, where we learn to write hardware accelerators and integrate them into a Linux system.

As part of this, we’ve been given the binary and source of a nifty set of programs that Dr. McDermott wrote that are able to print out (or put a value at) values from provided physical addresses. The kicker is that we’ll have to write a program that will write to the registers of a device on the FPGA that has to replicate the behavior of this set of programs.

I decided to write a library that abstracts this process and provides a clean interface to perform this in: no need to directly muck about with mmap() and such, and have called it “libmem” in honor of it using the /dev/mem device.

Github Link