Building STREAM for Maxwell using DIME-C

These notes apply to the version of Dime-C/DimeTalk on the Nallatech "HPC Toolkit Issue 3" CD, running on Windows XP. You can also download the STREAM DIME-C code.

Open DimeTalk Design Tools. If it fails with an error message about system DLLs being relocated, this is probably because Windows update KB925902 is installed; it is incompatible with DimeTalk and you need to install KB935448 to fix this. See: http://support.microsoft.com/kb/935448/en-us

Right click in the DimeTalk window and select "Create -> Device" from the popup menu. Select a H101M board with a Virtex-4 LX160 device. This should create the green device box on your DimeTalk network. All the other components must be placed on this device, so you may need to enlarge it by dragging the corner further out.

Select the H100 clock driver (the only component on the tab) from the system tab at the top of the window and left click within the H101 device to place it.

Select the PCI-X host interface device (from the "edges" tab) and left click within the H101 device to place it. On the H101, the PCI-X interface needs an explicit connection to the clock component, so connect the 7th connector of the clock to the top connector of the interface (by clicking on the clock's 7th connector and dragging to the PCI-X interface's top connector).

Now create a 4 way non-blocking router (from the "Routers" tab), a simple memory map node (from the "Basic Internal FPGA nodes" tab), and any block RAMs you require (also from the "Basic Internal FPGA nodes" tab. Don't use the ones in the "Legacy BlockRAM nodes" tab). Connect the ports on the router to red ports on the memory map, the PCI-X interface and the block RAMs (if any). It doesn't matter which port connects to where as long as all of your components which have a red port are connected to the router.

(If you have more than 4 components with red ports, you will need to create 2 or more routers and chain them together in order to connect all components).

Create a Dime-C component by opening Dime-C straight from Windows - NOT from the DimeTalk library manager, as this will cause the SRAM buses to be of the wrong type. Start a new project, then go into the project options and set the target device to V4LX160. Now create a new unit, save it as a .c file, and add it to the project.

Input the C code for your component. The function prototype determines the number and type of memories that the component will connect to: normal arrays will correspond to internal block RAMs, arrays preceded by the keyword "sram" will correspond to SRAMs on the board. Simple scalar parameters will be passed to the component through the memory map on the DimeTalk network.

For example:

  void dime_c_function(sram int x[1000], int y[1000], float z)
  {
      ...
  }

will result in a Dime-C component that interfaces with one block RAM (for y), one SRAM (for x), and has one value (z) passed in through the memory map.

Now save, compile the unit and build the project. If all goes well you can now return to DimeTalk.

Add the Dime-C component to the library as a VHDL component. Select the .vhd file for your Dime-C module with _TOP in its name. Your component should now appear on the "DIME-C" tab in DimeTalk.

Put the Dime-C component into your network. The memory map node should be wired up to it. If you are using block RAMs, you can also wire these directly to the Dime-C component. However, with SRAMs things are more involved...

Create the SRAMs by selecting the H101 DDR2 SRAM component and placing them into the device. They can be connected directly to the router(s). You can have up to 4 SRAMs. They also need to be connected to the SRAM outputs of the clock driver (the 2nd to 5th ports on the clock driver).

To connect your SRAMs to the Dime-C component, you need to use the DDR async interface from the "User components" tab. There are a few complications:

  1. There are two versions of the interface, a single port version and a dual port version. The dual port version should always be used, and applications requiring only a single port should leave the second port unconnected.
  2. The "SRAM clock" input for this interface must come from the same place as the clock that's actually running the SRAM. You can get it from one of the clock driver's SRAM outputs (it doesn't matter which one, they're all the same) by putting in a breakout and wiring the "_clk0" signal from it to your interface. To do this, right click on one of the SRAM clock signal ports on the clock driver module and select Create -> Breakout", and connect the middle port of the breakout to the top port of the DDR interface.

    N.B. if you run out of SRAM clocks on the clock driver module, you can create a "bus" which will allow one signal to be connected to multiple SRAMs/interfaces.

  3. The dual port interface requires a 2x clock signal that is not setup by default. This can be fixed by editing the component properties for the dual port interface in the DimeTalk library manager, going to the "Signals" tab, right clicking on the "clk2x" signal and selecting "Set Group Type -> Clock -> CLKAx2"

Generating VHDL and building the bitstream may fail if you have the wrong version of Xilinx ISE installed. Nallatech ship their own version with the HPC toolkit; ensure that your "XILINX" environment variable points to the Nallatech version and not to any other version you may have installed. Also check the "PATH" variable to make sure it points to the "bin\nt" directory within the Nallatech XILINX installation.

FPGAsMaxwellDIMEC (last edited 2007-10-16 09:42:03 by RobBaxter)