Skip to content
JamesNewton edited this page May 28, 2019 · 44 revisions

"Gateware" is what we call the FPGA programming that makes Dexter stunningly responsive. It allows feedback from encoder to motor in as little as 200 nanoseconds.

Dexters gateware configures the Xilinx Inc. XC7Z010-1CLG400C FPGA from the image of the micro SD card on the microzed board.

To program the FPGA on Dexter, you will need to install the Xilinx ISC. We know the 14.6 version works:
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools/archive.html
14.7 probably works as well, we just haven't tested it.

  • Extract the Xilinx_ISE_DS_Win_14.6_P.68d_3.tar file to a folder.
  • Run the xsetup.exe installer
  • Accept the license terms.
  • Select "ISE Webpack" for installation.
  • Accept the default settings (you can change install location, but make sure it's off a root directory. E.g. D:\Xillinx is fine)
  • Continue to setup the Visual C++ 2008 runtime system
  • Continue to allow the device drivers to be installed

When the install finishes and the License Configuration Manager appears,

  • select "Get free Vivado/ISE WebPack license".
  • You will need to connect, and sign into Xilinx web site (create an account if you don't have one).
  • Select "ISE WebPack license" and click "Generate Node-Locked License".
  • Continue through the wizard and complete the license request.
  • On the "Manage Licenses" screen, press the download arrow icon (lower left corner).
  • Back in the License Configuration Manager, load the Xilinx.lic file and close.

The SD card image has multiple partitions, one is the actual hard drive image when running in the robot. Another is the FAT partition which contains UBOOT, ZIMAGE, DTS (Device Tree) and the Gateware .BIT file. Those can be updated individually.

The DexRun.c firmware communicates with the gateware by setting and reading memory mapped registers through the 'w' command oplet

The ultra fast update has several benefits:

  1. We can run the P term in the PID controller up and not have oscillations. Actually since it’s integrated, and the time base is so fast, the P term is less than 1, but the point is that it tracks so close that in a slower system, it would oscillate. It doesn’t have time to overshoot. And that gives us better accuracy.

  2. Small perturbations in the sensor system just get swamped by the good data around them. The mechanical system filters them out because it doesn’t have time to jerk. The motor inertia starts filtering mechanically at a few kHz, but If you get the update speed up over 50 kHz the motor inductance filters out the control signals as well.

  3. The position of the motor is actually being dithered around the point it needs to be. We are stepping back and forth over points in between even the microstepping points. Especially on joints 4 and 5. This is where the inductive filtering helps us.

Mainly the group delay is so low that we don’t need any filtering.

Dexters gateware is written in Viva, a graphical system for defining logic. This (very) large picture shows the overview of that logic diagram: Dexter FPGA logic diagram overview

Clone this wiki locally