Simulate and run an application, Smt6040, Sundance simulink toolbox – Sundance SMT6040 User Manual
Page 47

Sundance Multiprocessor Technology Limited
Form : QCF32
SMT6040
“Sundance Simulink Toolbox”
Date : 6 July 2006
o
Sample the two input analog channels at 61,440,000 samples/s (double-click on the
ADCs to see sample frequency and other parameters). During simulations, data come
from two signal generators present in the root model.
o
Sub-sample both channels with period STime (a variable from the MATLAB workspace
set by the sim_setParam block in the root model.
o
Mux them together into a 2-dimensional vector (sim_mux2).
o
Send the vector to the root via a comport (sim_FPGA2comport block).
5.2 Simulate and run an application
The SMT6040 application can be first verified during Simulation. Data printed on the screen
and the graphs displayed by the scopes (Figure 42) can be used both for debugging and to
verify the algorithm results.
Compilation is very simple: users need to double-click on the sim_digHwInterface in the
top diagram, then click on COMPILE TO HW/SW/ANALOG.
Clicking on OVERALL BUILD shall trigger compilation, which will, in the sequence:
• Split the whole system into subsystems (one for each sim_system).
• Split each subsystem into a digital HW, a SW and an analog HW part (if any).
• Compile each part independently.
To build and execute the application on the hardware, a “.wir” file is necessary to define the
hardware connections implemented (as users might connect different comports or SHBs).
The following is an example of “.wir” file:
wire ? root[CP:0] node1[CP:3] ! Internal connection between the two processors of SMT362
wire ? root[CP:1] node1[CP:4] ! Internal connection between the two processors of SMT362
! The following assume a physical comport cable from
! T1C2 (TIM1) to T1C5 (TIM2)
wire ? node1[CP:2] root[CP:5] ! Requires connection between [T1C2] to [T1C5]
connect ? T6040_node1[1] node1[CP:1] ! Requires connection between [T1C1] to [T2C4]
connect ? root[CP:4] T6040_root[0] ! Requires connection between [T1C4] to [T2C1]
The instruction:
Diamond(modelname)
Builds the application (composed by DSP program and FPGA bitstream), download it onto
the hardware and runs it.
Results can be verified from the data printed on the screen and by connecting the DAC output
to an oscilloscope.
SMT6040 - “Sundance Simulink Toolbox”
Last Edited: 08/01/2010 15.42
Page 47 of 53