3L Diamond

From SundanceWiki
Jump to navigation Jump to search

Diamond DSP and Diamond FPGA

As an official software partner, 3L Ltd has been working closely with Sundance for nearly 20 years, and this close relationship has meant that customers get the benefits of a simple-to-use, reliable, and flexible development environment that is highly optimised to work well with Sundance's Lego ® approach.



Below are a few of the questions we have been asked about using 3L Diamond.




Can I move the TIMs from slots #1 and #2 to #3 and #4 and still run our application?

This really all depends upon what comport configuration you are using, and whether the new TIM placement would use the same Comports.

Do you also use the Comport to the host (PC etc) to download your applications (i.e. running 3L Diamond)? You have to know that the host connection is hard-wired to TIM site 1 of most of our carrier boards.

You can use FMS cables to connect comport 3 of site 1 to another site if it is required.


Why won't my 3L Diamond example run?

I've made a very simple 3L diamond application to test my hardware / software, but for some reason it will not run.

The error message is telling me that the wrong sort of TIM has been found.

Make sure you have rebuilt the examples for the TIM type you have. The TIM type is specified in the .cfg file.

In the documentation of Diamond I found that the TimerRate function returns the number of clock per second and is usually 1000. In our case (we use a 1 GHz DSP board) wich is the value of this function? Is possible to set it to 1.000.000 ? For example setting CLOCK in my configuration file. In other words i need a timer with 1 microsecond precision...how i can obtain such a value?

The timer functions in Diamond are used to control not only the user- visible timers, but also the timeslicing mechanism. Decreasing the clock period increases the processor overhead associated with all of these functions.

There are two things you can do if you really do want the clock to tick faster.

The safest is to program the second C6000 timer (TIMER 1) to generate a tick that is separate from the kernel's clock (TIMER 0). There is an example of this in: \target\c6000\Sundance\examples\interrupts\attachfn\EventSet If you have installed Diamond to the default place, this will be:

C:\3L\Diamond\target\c6000\Sundance\examples\interrupts\attachfn\EventSet

If all you want to do is time a section of code, you can simplify this even further and start TIMER 1 with an infinite period and with interrupts inhibited. To time your code, read the timer's counter before the code, and read it again after. The difference gives a value that, when divided by the TIMER 0 period, will give you the timer in milliseconds, but to the maximum resolution possible on the C6000. If the code sequence takes longer than a 32-bit counter, you will be forced to use interrupts to count timer reloads, although the overhead of that would make nonsense of the resulting time.

The more risky approach, which I strongly suggest you avoid, would be to change the period of TIMER 0. The PERIOD register will be set by Diamond to give a 1ms tick. If you want, say, a 100us tick, you would stop the timer, divide this value by 10, and then restart the timer. Note that timer_rate() is NOT changed by this procedure; it will still return 1000.


When I try to run my compiled application the Diamond Server shows the error: Root processor is the wrong type. SMT395_VP30 was expected but SMT395_VP20 was found.

The TIM type declared in the configuration file (.cfg) is incorrect. In this case the hardware in the system is a SMT395_VP20. It is similar for other DSP modules. If you open the configuration file (.cfg), you can see the declaration of the processor: Code: processor root SMT395_VP30

You have to replace the type of the module by the module that you use: processor root SMT395_VP20

If it is written: processor root default

You have to open : C:\3L\Diamond\bin\ProcType.exe and to change the default processor by the one you use.

I've tried to recompile the example for smt8101 as described. Everytime I just keep getting the following error when running the make file: >> 3l___tmp.cmd, line 9: error: can't find input file 'rts6201.lib'

The solution is either to switch to V3.0.1 or to edit the file:

C:\3L\Diamond\bin\c6000\sundance\command.dat and replace "rts6201" with "rts6200" throughout.

What software for SDR-2 kit is available under MATLAB?

There are full support from: SMT6040, SMT6041, PARS and even MATLAB/Simulink Real Time Workshop, Simulink HDL-coder and Xilinx System Generator that are fully compatible with the 3L Diamond tools.

Other design approaches are available like "C-to-FPGA" compilers like Impulse-C.

Can I plug my DSP module on the first TIM site of my carrier board?

You can add into the first TIM site of the carrier board every DSP module implementing the Global Bus in the firmware. If the module that you use doesn't implement the Global Bus interface in its FPGA (such like the first version of the SMT319), you can leave the first TIM site of your carrier board empty and add the module in the second TIM site for instance. Then, you have to use a comport connection to link the Host comport to the second TIM site. To make it you have to connect the T1C3 to T2C3 (in the case the module is plugged into the TIM site 2) respecting the silver/blue side of the cable.

How can I boot a DSP TIM mounted on an SMT180 via an external comport cable attached to an SMT310 inside a PC?

You just need to move the DSP TIM to the TIM Site 1 of the SMT180 allowing use of an "input" comport.

Will 3L Diamond be still applicable & useful if we interface non-Sundance FPGA (Xilinx or Altera) and/or TI DSP board to Sundance platform?

Absolutely. Diamond FPGA allows tasks to access the pins of the FPGA, so you can create tasks to interface to any device connected to the FPGA.

Can we use Diamond with other multiprocessor TI platforms, for example TI Davinci (TMS320DM6446), connected to Sundance platform through one of the available connectors?

There are plans to add support for Diamond on more DaVinci processors from TI - we currently support the DM642. At present, Diamond is only used on the Sundance SMT339 platform.

Can 3L Diamond work with Altera FPGA tools, I have only seen references for Xilinx?

Yes. Diamond provides a simple model for multiprocessor design. There is no reason why Diamond could not work on Altera devices. Note, at present, 3L does not suppport any hardware vendors with Altera devices, although they could be supported.

How can I tell what the serial number of my 3L dongle is?

If you have a white Diamond 4 3L dongle you can find the serial number but plugging it into a machine with Diamond 4 installed, and then running \3L\Diamond\bin\drivers\DinkeyChange.exe. This should tell you the serial number.

I'm using version 3.x of Diamond, and USB communication doesn't work. Is there a fix?

We do have a ".dll" file that needs to be updated to get Diamond versions lower than 5.1.1 to work with USB communications with Sundance hardware. You can get a copy here: SmtDrvUsb_Hack_Diamond_Under_5_1_1.zip

This file needs to be unpacked and moved to "Windows/system32" and renamed to SmtDrvUsb.dll. The existing file can be renamed to something else, just in case.