General-Purpose Memory Controller(GMPC)

Table of Contents

So, in retrospective, here is a list of things to keep in mind:

  • I implemented the FPGA device driver as a platform device driver. I chose ioctl() function calls to let user application access the FPGA;
  • Timing specifications must be set in nanoseconds in the gpmctimings structure, not gpmcclocks ticks, as I originally assumed they were;
  • compiling the kernel gpmc driver in debug mode helps tracing down incorrect timings: it's easy to specify timing values which exceed the range of their respective bit maps in GPMC config registers;
  • At first, make sure the kernel does not turn off unused clocks (it's a kernel config option).
  • Make sure that the gpmcclock pad is set as input/output: the GPMC hardware monitors it to tweak its timing.
  • keep it simple: use simple memory interface signals (ex: static RAM cs*, rd*, wr* signals) and relaxed timings: for example, my read/write cycles take about 200ns to complete and I use a 100MHz gpmcclock.
  • don't be afraid to 'hack' the kernel: need to call hidden (static) kernel GPMC functions? Just export() them. I had to do so in order to do extra configuration works on the GPMC-FPGA intervace.

read

Author: Shi Shougang

Created: 2015-03-05 Thu 23:20

Emacs 24.3.1 (Org mode 8.2.10)

Validate