Program Standalone Altera FPGA Development Board from Simulink
This example shows how to target an Altera® FPGA development board for synthesis using the FPGA Turnkey workflow. For more information, see Workflows in HDL Workflow Advisor.
Before You Begin
To run this example, you must set up your synthesis tool. To learn how to set up your synthesis tool, see Synthesis Tool Path Setup.
This example uses the Altera DE2-115 development and education board. You can also try this example with a different board and specify the target interface according the interface definition of that board. To see a list of Altera boards that you can use with the FPGA Turnkey workflow, see Supported EDA Tools and Hardware.
To download the programming file, you must first connect the target device. However, if the target device is not connected, you can still generate the programming file.
FPGA Servomotor Controller with UART interface for Intel Board
This example uses
hdlcoderUARTServoControllerExampleAltera model that is designed to work with a Altera DE2-115 development and education board.
UART_Servo_on_FPGA subsystem receives commands through UART ports. The subsystem generates a pulse-width modulation (PWM) waveform to control a servomotor.
Select Target Device
UART_Servo_on_FPGAsubsystem and select HDL Code > HDL Workflow Advisor.
In the HDL Workflow Advisor, select the Set Target > Set Target Device and Synthesis Tool task.
For Target workflow, select FPGA Turnkey.
For Target platform, select Altera DE2-115 development and education board.
If the board does not automatically appear in the list, select Get more boards to download the Altera FPGA Boards support package.
The HDL Workflow Advisor automatically sets the synthesis tool based on your board selection.
Click Run This Task.
Set Target Interface and Frequency
In the left pane of the HDL Workflow Advisor, select the Set Target Interface task.
For each port, set Target Platform Interfaces options as shown in this figure. Click Apply.
The HDL Workflow Advisor allocates each port to a specified bit position
[or range of bit positions
[. The width of the specification in bits must equal the width of the port on the DUT. When you select options, the HDL Workflow Advisor automatically allocates a bit range. You can double-click an entry in the Bit Range / Address / FPGA Pin column to edit its value.
For detailed information about each Target Platform Interfaces option, refer to your board documentation.
You must allocate at least one output port to the target device. If you do not allocate any ports, the Set Target Interface task displays an error and terminates.
Click Run This Task.
In the Set Target Frequency task, set FPGA system clock frequency to
100MHz, then click Run This Task.
In this example, the target frequency must be 100 MHz due to the fixed UART baud rate.
Generate Code, Synthesize, and Program Target Device
After you select the target device and configure its port interface, the HDL Workflow Advisor performs the next tasks automatically. The HDL Workflow Advisor performs these steps.
Prepare the model for HDL code generation by checking the model for HDL code generation compatibility.
Set HDL options in Model Configuration Parameters dialog box and generate HDL code.
Execute FPGA synthesis and timing analysis using Altera Quartus® II. The HDL Workflow advisor also annotates the model with critical path information that it obtains during synthesis.
Generate the programming file and use it program the device.
To program your target device, follow these steps:
Open the Download to Target task group.
Right-click Program Target device and select Run to Selected Task.
The task sequence concludes by programming your target board with the generated programming file. You can then read the code generation and synthesis log files.