PLATO · N-DPU · preliminary design · 2016

An FPGA that poses as SDRAM

In the PLATO normal-camera DPU, a communications FPGA collects the images from the camera front-ends over SpaceWire, and the GR712RC LEON3FT processor has to read them.

This evaluation, done at IAA-CSIC in February 2016, tested the simplest bridge between the two: an FPGA block that answers the processor's SDRAM bus exactly like a memory chip.

Block diagram of the PLATO N-DPU: GR712RC with LEON3FT, memory controller and SpaceWire links, and the comFPGA with four SpaceWire RMAP links to the front-end electronics, its own SDRAM zone and a memory-mapped interface on the processor memory bus
Preliminary N-DPU architecture: GR712RC (left) and comFPGA (right), sharing the memory bus.
GR712RCLEON3FT processor
RTAXTarget FPGA family
PC133SDRAM timing, CL 2
16-bitData bus
46 MHzAfter place & route
1.2 %Logic used (AX2000)

Context

PLATO is ESA's mission to find and characterise Earth-like planets around Sun-like stars, with 26 cameras on a single platform. Each group of normal cameras is served by a Data Processing Unit (N-DPU) that receives the raw images, processes them on board and passes the results on.

Two chips, one memory bus

In the architecture under study the N-DPU had two main devices:

  • GR712RC, a dual-core LEON3FT system-on-chip, running the software, with its own SRAM+EDAC and an SDRAM zone, and SpaceWire links to the instrument control units.
  • comFPGA, a radiation-tolerant Microsemi RTAX, with four SpaceWire RMAP links to two front-end electronics units (FEE), its own SDRAM zone for the incoming images, and an interrupt controller.

The open question was how the processor would get at the data held by the FPGA.

The idea

The GR712RC already has an SDRAM controller on its memory bus. If the FPGA answers that bus as if it were an SDRAM device, the processor can read and write FPGA registers and buffers with ordinary memory accesses, with no extra interface core and no driver beyond a memory map. A separate line raises interrupts when new data is ready.

The address lines then act as an index into the data held by the FPGA.

The ComFPGA memory interface and an SDRAM device share the address, data and control lines of the GR712RC memory bus
The ComFPGA memory interface sits on the GR712RC memory bus next to a real SDRAM, sharing address, data and control lines.

The interface

sdramBusSlave is a VHDL entity with exactly the pins of an SDRAM chip: data, address, bank, clock, clock enable, chip select, RAS, CAS, WE and data mask. Inside, it decodes the SDRAM commands and behaves like the memory the controller expects.

What it does

  • Decodes the SDRAM command set: mode register load, activate, read, write, precharge, auto-refresh and burst terminate.
  • Stores the mode register written by the controller at initialisation and serves reads and writes as bursts, as the mode register defines.
  • For this evaluation, a loopback: four registers can be written and read back, indexed by the two lowest address bits.
  • 16-bit data bus, the width of one SDRAM device, so it can replace one x16 chip on the board.

Timing parameters

The generics follow a PC133 (-75) SDRAM with CAS latency 2, the same device used in the testbench:

tCK10 ns clock period
tRCD / tRP20 ns row-to-column delay and precharge
tRAS / tRC44 ns / 66 ns
tAC6 ns access time from clock
tMRD2 cycles after mode register load

Testbench

The interface was verified in ModelSim inside a small GRLIB system: Gaisler's SDRAM controller drives the bus, the GRLIB AMBA Test Framework generates the AHB transfers, and a Micron MT48LC16M16A2 behavioural model sits next to the FPGA block as a reference.

Sequence

Sequence diagram: the GR712RC initialises the SDRAM interface, then performs a read, a write, a read, a burst write and a burst read

What the testbench checks

  • SDRAM initialisation by the controller: precharge all banks, eight auto-refresh cycles and mode register load.
  • Single read and write accesses.
  • Burst writes and burst reads of eight 32-bit words.

Verification was by inspection: the waveforms and the ModelSim log show every transaction and its data. The log of the burst test:

# write burst at 215 930 ns 32-bit write burst 0x40000000 0x01234567 OKAY 32-bit write burst 0x40000004 0x89abcdef OKAY 32-bit write burst 0x40000008 0xfedcba98 OKAY 32-bit write burst 0x4000000c 0x76543210 OKAY ... # read back at 226 350 ns 32-bit read burst 0x40000000 0x01234567 OKAY 32-bit read burst 0x40000004 0x89abcdef OKAY 32-bit read burst 0x40000008 0xfedcba98 OKAY 32-bit read burst 0x4000000c 0x76543210 OKAY
ModelSim waveform of a burst write: the controller activates the row, then writes consecutive columns; the interface decodes ACT and WRITE and receives 0x4567, 0xCDEF, 0xBA98, 0x3210 on its 16-bit data bus
Burst write: after ACT, the controller writes consecutive columns. The FPGA block decodes the command (Operation = WRITE) and receives its 16-bit half of each 32-bit word (0x4567, 0xCDEF, 0xBA98, 0x3210).
ModelSim waveform of the burst read back from the interface
Burst read: the same data comes back from the interface.
ModelSim waveform overview: SDRAM initialisation after reset, followed by write and read transactions
Overview: initialisation after reset (mode register 0x0223), then the write and read transactions.

Implementation

The structural version was synthesised and placed with Microsemi Libero / Designer for the Axcelerator family, the commercial counterpart of the radiation-tolerant RTAX, and a post-layout simulation was run with the back-annotated netlist.

AX2000Device, 896-pin FBGA
161R-cells (sequential), 1.5 %
239C-cells (combinatorial), 1.1 %
46 MHzAfter implementation (50 MHz in simulation)

Conclusions

  • An SDRAM-slave block is small: about 1.2 % of an AX2000, leaving almost the whole device for the SpaceWire links and buffers.
  • The original notes also estimated that AMBA and memory-bus occupancy would stay low with the four SpaceWire interfaces transferring at the same time; that scenario was not part of this testbench.
  • The processor needs nothing special: its standard SDRAM controller and a memory map are enough.

Open points

  • Timing closure at the target bus frequency: 46 MHz after place and route.
  • Automatic self-checking in the testbench, instead of checking waveforms and log by eye.
  • Implementation on a board. It was planned for an IAA-CSIC FPGA board and was not done in this evaluation.
  • The block diagram assumes an RTAX4000; the evaluation used the AX2000 (RTAX2000S class).

History

SDRAM interface communication

First version of the interface and pin constraints.

Simulation ready

Testbench, stimulus and Doxygen documentation; functional and post-synthesis simulation working.

Structural architecture

Structural version of the interface, ready for the command execution and state machine updates.

Project contents

hdl/sdramBusSlave.vhd (behavioural and structural architectures), configuration and PLATO packages, and the Micron SDRAM model.
stimulus/GRLIB testbench with the SDRAM controller and AMBA Test Framework.
simulation/ModelSim scripts for functional and post-synthesis runs, and waveform setups.
constraint/, designer/Pin and timing constraints, place-and-route results and back-annotated netlist.
doc/Doxygen documentation generated from the VHDL.

The source repository is private. For access, please contact IAA-CSIC at jmgomez@iaa.es.