Platform Designer Components
Platform Designer Components
1 Introduction
The Intel® Platform Designer tool allows a digital system to be designed by interconnecting selected Platform
Designer components, such as processors, memory controllers, parallel and serial ports, and the like. The Platform
Designer tool includes many pre-designed components that may be selected for inclusion in a designed system,
and it is also possible for users to create their own custom Platform Designer components. This tutorial provides
an introduction to the process of creating custom Platform Designer components. The discussion is based on the
assumption that the reader is familiar with the Verilog or VHDL hardware description language and is also familiar
with the material in the tutorial Introduction to the Intel Platform Designer Tool.
The screen captures in this tutorial were obtained using the Quartus® Prime version 21.1 software; if other versions
are used, some of the images may be slightly different.
Contents:
FPGAcademy.org 1
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Host computer
(USB connection)
Reset
Avalon Interconnect
System
On-chip
ID FPGA chip
memory
Figure 1. Block diagram of an example Platform Designer system implemented on an FPGA board.
Each component in the system, referred to as a Platform Designer component, adheres to at least one of the Avalon®
Interfaces supported by Platform Designer. With the interface defined for the component, Platform Designer is able
to construct an interconnect structure, called the Avalon Interconnect, which enables components to exchange data.
The Platform Designer tool can generate a system based on the selected set of components and user parameters. The
generated system contains Verilog or VHDL code for each component and the interconnect structure, allowing it to
be synthesized, placed and routed for an FPGA device.
2 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
In this tutorial we explain what we mean by a Platform Designer component, describe the Avalon Interfaces in more
detail, and show how to create a custom component that can be included in the Platform Designer list of available
components.
There are many types of Avalon Interfaces; the most commonly used types are:
• Avalon Memory-Mapped Interface (Avalon MM) – an address-based read/write interface which is typical of
master-slave connections
• Avalon Streaming Interface (Avalon-ST) – an interface that supports unidirectional flow of data
• Avalon Conduit Interface – an interface that accommodates individual signals or groups of signals that do
not fit into any of the other Avalon Interface types. You can export the conduit signals to make connections
external to the Platform Designer system.
A single component can use as many of these interface types as it requires. For example, a component might provide
an Avalon-ST port for high-throughput data, in addition to an Avalon MM slave port for control. All components
must include the Avalon Clock and Reset Interfaces. Readers interested in more complete information about the
Avalon Interfaces may consult the Avalon Interface Specifications document that can be found on the Intel website.
In this tutorial we will show how to develop a Platform Designer component that has an Avalon Memory-Mapped
Interface and an Avalon Conduit Interface. The component is a 32-bit register that can be read or written as a
memory-mapped slave device via the Avalon Interconnect and can be visible outside the system through a conduit
signal. The purpose of the conduit is to allow the register contents to be displayed on external components such as
LEDs or 7-segment displays. Thus, this register is similar to the output parallel ports shown in Figure 1.
If the register is to be used in a system such as the one depicted in Figure 1, then it should respond correctly to
Nios II instructions that store data into the register, or load data from it. Let D be the 32-bit input data for the
register, byteenable be the four-bit control input that indicates which byte(s) will be loaded with new data, and Q be
the 32-bit output of the register. In addition, it is necessary to provide clock and reset signals. Figures 2 and 4 show
a suitable specification for the desired register, called reg32, in Verilog and VHDL, respectively.
FPGAcademy.org 3
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Our register will be instantiated in a top-level module that provides the necessary signals for connecting to an Avalon
MM Interconnect. Let this module be called reg32_avalon_interface. The Avalon MM Interface signals used in this
module are:
• clock
• byteenable – two-bit signal that identifies which bytes are being used
The reg32_avalon_interface module also provides a 32-bit Avalon Conduit Interface signal called Q_export. Fig-
ures 3 and 5 show how this module can be specified in Verilog and VHDL code, respectively.
always@(posedge clock)
if (!resetn)
Q <= 32’b0;
else
begin
// Enable writing to each byte separately
if (byteenable[0]) Q[7:0] <= D[7:0];
if (byteenable[1]) Q[15:8] <= D[15:8];
if (byteenable[2]) Q[23:16] <= D[23:16];
if (byteenable[3]) Q[31:24] <= D[31:24];
end
endmodule
4 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
FPGAcademy.org 5
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY reg32 IS
PORT ( clock, resetn : IN STD_LOGIC;
D : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
byteenable : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
Q : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) );
END reg32;
6 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY reg32_avalon_interface IS
PORT ( clock, resetn : IN STD_LOGIC;
read, write, chipselect : IN STD_LOGIC;
writedata : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
byteenable : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
readdata : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
Q_export : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) );
END reg32_avalon_interface;
COMPONENT reg32
PORT ( clock, resetn : IN STD_LOGIC;
D : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
byteenable : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
Q : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) );
END COMPONENT;
BEGIN
to_reg <= writedata;
WITH (chipselect AND write) SELECT
local_byteenable <= byteenable WHEN ’1’, "0000" WHEN OTHERS;
reg_instance: reg32 PORT MAP (clock, resetn, to_reg, local_byteenable,
from_reg);
readdata <= from_reg;
Q_export <= from_reg;
END Structure;
Each slave device includes one or more registers that can be accessed for read or write transaction by a master
device. Figures 6 and 7 illustrate the signals that are used by master and slave interfaces. The direction of each
signal is indicated by arrows beside it, with ← indicating an output and → indicating an input to a device. All
transactions are synchronized to the positive edge of the Avalon clk signal. At time t 0 in the figures, the master
begins a read transaction by placing a valid address on its address outputs and asserting its read control signal. The
slave recognizes the request because its chipselect input is asserted. It responds by placing valid data on its readdata
FPGAcademy.org 7
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
outputs; the master captures this data on its readdata inputs and the read transaction ends at time t 1 . A second read
t t t t t4 t5 t6
transaction is shown in the figure starting0 at time 1t 2 . In this2 case, the3 slave device asserts the waitrequest input of the
master, which can be used to clk
extend a read transaction by any number of clock cycles. The slave device deasserts
the waitrequest signal andaddress address data at time t 3 ,address
provides the requested and the read transaction ends at time t 4 .
address
writedata data
readdata data data
A write transaction is illustrated starting at time t 5 in Figures 6 and 7. The master places a valid address and data on
its address and datawritechipselect
outputs, and asserts the write control signal. The slave captures the data on its datawrite
write
inputs and the write transaction ends at time t 6 . Although not shown in this example, a slave device can assert the
read
waitrequest input of the master to extend a write transaction over multiple clock cycles if needed.
waitrequest
t0 t1 t2 t3 t4 t5 t6
clk
address address address address
writedata data
readdata data data
write
read
waitrequest
Figure 6. Timing diagram for read/write transactions from the master’s point of view.
t0 t1 t2 t3 t4 t5 t6
clk
address address address address
writedata data
readdata data data
chipselect
write
read
waitrequest
t0 t1 t2 t3 t4 t5 t6
Figure 7. Timing diagram for read/write transactions from the slave’s point of view.
clk
address address address address
Addresses used by master devices are aligned to 32-bit word boundaries. For example,dataFigure 8 illustrates four
writedata
32-bit addresses that could be used to selectdatafour registers in a slave data
readdata device. The address of the first register is
0x10000000, the address ofwrite
the second register is 0x10000004, and so on. In this example, the slave would have
read
a two-bit address input for selecting one of its four registers in any read or write transaction. Since addresses are
waitrequest
word-aligned, the lower two address bits from the master are not seen in the slave. The master provides a four-bit
byteenable signal, which is used by the slave to control a write transaction for individual bytes. For example, if
the master performs a write transaction to only the most-significant byte of the second register in Figure 8 then the
master would write to address 0x10000007 by having its byteenable output signal set to the value 0x1000 and its
address output signal set to the value 0x10000004. The slave device would see its two-bit address input set to 0x01
and would use its byteenable inputs to ensure that the write transaction is performed only for the selected byte of the
second register. Although the byteenable signals are not shown in Figures 6 and 7, they have the same timing as the
address signals.
8 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
The above examples show the basic transactions between a master and a slave. More advanced transactions can be
performed, the procedure for which is described in the Avalon Interconnect Specifications document.
Master Slave 31 32 …… 1 0
Address Address[1..0]
0x10000000 00 First Register
FPGAcademy.org 9
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Next, using your preferred HDL language (Verilog or VHDL), create a new design file (File > New... > Design
Files) and add the Verilog code from Figure 2, or the VHDL code from Figure 4, and name the file reg32.v (or
.vhd). Add this file to your current project (Project > Add Current File to Project). Create another file and add
the Verilog code from Figure 3 or the VHDL code from Figure 5, name the file reg32_avalon_interface.v (or .vhd),
and add this file to the current project.
Later, we will create a top-level HDL file for the component_tutorial project, but first we will use the Platform
Designer tool to generate an embedded system. Open the Platform Designer tool to get to the window depicted
in Figure 9. The Platform Designer tool automatically includes a clock component in the system, as shown in the
figure.
10 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Before creating the new Platform Designer component for our 32-bit register, we will first instantiate some other
components that will be needed in our system. In the IP Catalog area of the Platform Designer window expand
the Processors and Peripherals > Embedded Processors item and add a Nios II Processor to the system. In
the Nios II Processor dialog window that opens, select Nios II/e as the type of processor. Next, in the IP Catalog,
expand the Basic Functions > On-Chip Memory item and add an On-Chip Memory (RAM or ROM) Intel
FPGA IP component. Click Finish to return to the main Platform Designer window. In the Connections area of
the Platform Designer window, make the connections illustrated in Figure 10 between the clock component, Nios II
processor, and on-chip memory module.
FPGAcademy.org 11
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Errors will be displayed in the Platform Designer Messages window about the Reset and Exception vectors mem-
ories that are needed for the Nios II Processor. To fix these errors, re-open the Nios II processor component that has
already been added to the system by right-clicking on it and selecting Edit. In the window shown in Figure 11 use
the provided drop-down menus to set both the Reset vector memory and Exception vector memory to the on-chip
memory component. Click Finish to return to the main Platform Designer window.
12 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
The Platform Designer window may now show an error related to overlapping addresses assigned to the components
in the system. To fix this error click on the System menu in the Platform Designer window and then click on Assign
Base Addresses. The Platform Designer window should now appear as illustrated in Figure 12.
FPGAcademy.org 13
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Now, we will create the new Platform Designer component for our 32-bit register, and make this component available
in the Platform Designer IP Catalog. To create a new component, click the New... button in the IP Catalog area of
the Platform Designer window. The Component Editor tool, shown in Figure 13, will appear. It has four tabs.
The first step in creating a component is to specify where in the IP Catalog our new component will appear. In the cur-
rent tab, Component Type, change the Name to reg32_avalon_interface, the Display name to reg32_component,
and provide a name for the Group setting, such as My Own IP Cores.
14 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Next, we add the files that describe the component. Go to the Files tab, depicted in Figure 14, and then click on the
Add File... button under Synthesis Files to browse and select the top-level file reg32_avalon_interface.v. Run the
analysis of the top-level file by clicking on the Analyze Synthesis Files button. Platform Designer analyzes this
file to determine the types of interfaces that are used by the component. Optionally, you can also add the file reg32.v
to the list of Synthesis Files. Then click the Copy from Synthesis Files button under Verilog Simulation Files to
add the files for simulation. If the Component Editor finds any errors when analyzing the top-level file, then they
will need to be fixed and the code re-analyzed. Once no syntax errors are present, then the next step is to specify the
types of interfaces that are used by the component.
Figure 14. Adding HDL files that define the new component.
FPGAcademy.org 15
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Click on the Signals & Interfaces tab to specify the meaning of each interface port in the top-level entity. This
leads to the window in Figure 15.
16 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
To define correctly the meaning of each signal, it is necessary to specify the correct types of interface, put the
signals in the correct interface, and specify the signal type for each signal. For the clock [1] signal, select <<add
interface>> and select Clock Input as in Figure 16. Now drag and drop the signal clock [1] into Clock Input interface
and change its Signal Type to clk, as shown in Figure 17.
FPGAcademy.org 17
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
18 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
For the resetn [1] signal, drag and drop it into the Reset Input interface and change its signal type to reset_n, as
indicated in Figures 18 and 19.
FPGAcademy.org 19
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
20 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Finally, the Q_export signal must be visible outside the Platform Designer-generated system; it requires a new
interface which is not a part of the Avalon Memory-Mapped Interface. Click on the <<add interface>>, and
specify its type as Conduit, as shown in Figure 20. Drag and drop Q_export into the newly created conduit interface.
The Signal Type for a conduit signal does not matter, so Q_export does not need to be edited. The rest of the signals
shown in the Component Editor already have correct interface types as their names are recognizable as specific
Avalon signals. The Component Editor window should now appear as shown in Figure 21.
FPGAcademy.org 21
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
22 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Note that there are still some error messages. The first error message states that the avalon_slave_0 interface must
have an Associated Clock and an Associated Reset. Select clock_sink as this clock and clock_reset as the reset, as
indicated in Figure 22. Also note in Figure 22 that under the Timing heading we have changed the parameter called
Read wait for the avalon_slave_0 interface from its default value, which was 1, to the value 0. This parameter
represents the number of Avalon clock signals that the component requires in order to respond to a read request. Our
register can respond immediately, so we do not need to use the default of 1 wait cycle.
Figure 22. Specifying the clock and reset associated with the Avalon Slave interface.
FPGAcademy.org 23
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
The remaining error messages state that the clock_reset interface must have an associated clock. Set this clock to
clock_sink, as depicted in Figure 23. Now, there should be no error messages left. Click Finish to complete the
creation of the Platform Designer component, and save the component when prompted to do so.
Figure 23. Specifying the clock associated with the reset interface.
24 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Next, make the connections shown in Figure 25 to attach the register component to the required clock and reset
signals, as well as to the data master port of the Nios II processor. Finally, as indicated in the Export column in
Figure 25, click on Double-click to export for the Conduit and specify the name to_hex. Notice in the Base
address column in Figure 25 that the assigned address of the new register component is 00000000. This address can
be directly edited by the user, or it can be assigned automatically by using the Assign Base Addresses command
in the System menu. In this tutorial, we will leave the address as 00000000.
Use the Save command in the File menu to save the defined Platform Designer system using the name embed-
ded_system. Next, in the Platform Designer window select Generate > Show Instantiation Template..., the
window in Figure 26 will show up. This window gives an example of how the embedded system defined in the
Platform Designer tool can be instantiated in HDL code. Note that the clock input of our embedded system is called
clk_clk, the reset input is called resetn_reset_n, and the conduit output is named to_hex_readdata.
FPGAcademy.org 25
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
26 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Finally, open the Generation window in the Platform Designer tool, shown in Figure 27 by selecting Generate
> Generate HDL, and then click the Generate button. This action causes the Platform Designer tool to generate
HDL code that specifies the contents of the embedded system, including all of the selected components and the
Avalon interconnection fabric.
FPGAcademy.org 27
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Close the Platform Designer tool to return to the main Quartus Prime window. Next, select Project > Add/Re-
move Files in Project... from the main Quartus Prime window, and then browse on the button to open the
window in Figure 28. Browse to the folder called embedded_system/synthesis and then select the file named embed-
ded_system.qip. This file provides the information needed by the Quartus Prime software to locate the HDL code
generated by the Platform Designer tool. In Figure 28 click Open to return to the Settings window and then click
Add to add the file to the project. Click OK to return to the main Quartus Prime window.
Figure 28. Adding the .qip file to the Quartus Prime project.
28 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Store the code for the top-level module in a file called component_tutorial.v (or .vhd), and store the code for the
seven-segment code converter in a file called hex7seg.v (or .vhd). Include appropriate pin assignments in the Quar-
tus Prime project for the CLOCK_50, KEY0 , and HEX0, . . ., HEX3 signals on the DE-series board. If all the necessary
pin assignments are not made, it may not be possible to connect to the board (from the Quartus Prime software, or
the Monitor Program). For instructions on adding pin assignments, see the Quartus Introduction tutorial.
Compile the project. After successful compilation, download the circuit onto the DE-series board by using the
Quartus Prime Programmer tool. See the Quartus Introduction tutorial for instructions on downloading a circuit to
a board.
embedded_system U0 (
.clk_clk(CLOCK_50), .reset_reset_n(KEY[0]), .to_hex_readdata(to_HEX) );
FPGAcademy.org 29
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY component_tutorial IS
PORT ( CLOCK_50 : IN STD_LOGIC;
KEY : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
HEX0 : OUT STD_LOGIC_VECTOR(0 TO 6);
HEX1 : OUT STD_LOGIC_VECTOR(0 TO 6);
HEX2 : OUT STD_LOGIC_VECTOR(0 TO 6);
HEX3 : OUT STD_LOGIC_VECTOR(0 TO 6);
END component_tutorial;
COMPONENT hex7seg IS
PORT ( hex : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
display : OUT STD_LOGIC_VECTOR(0 TO 6) );
END COMPONENT hex7seg;
BEGIN
U0: embedded_system PORT MAP (
clk_clk => CLOCK_50,
resetn_reset_n => KEY(0),
to_hex_readdata => to_HEX );
h0: hex7seg PORT MAP (to_HEX(3 DOWNTO 0), HEX0);
h1: hex7seg PORT MAP (to_HEX(7 DOWNTO 4), HEX1);
h2: hex7seg PORT MAP (to_HEX(11 DOWNTO 8), HEX2);
h3: hex7seg PORT MAP (to_HEX(15 DOWNTO 12), HEX3);
END Structure;
30 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Figure 31. Specifying the system description file and Quartus Prime programming file.
FPGAcademy.org 31
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
After successfully creating the Monitor Program project, click on the command Connect to System in the Actions
menu. Open the Memory tab in the Monitor Program, and click the setting Query Devices, as indicated in Fig-
ure 33. Now, click the Refresh button to see that the content of address 0x00000000, which represents the 32-bit
register component, has the value 00000000. Edit the value stored in the register, as illustrated in Figure 34, and
observe the changes on the seven-segment displays on the DE-series board.
32 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
9 Concluding Remarks
In this tutorial we showed how to create a component for use in a system designed by using the Platform Designer
tool. Although the example is for a slave interface, the same procedure is used to create a master interface, with the
only difference being in the type of an interface that is created for the component.
FPGAcademy.org 33
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
10 Appendix A
The HDL code for the seven-segment code converter that is instantiated in Figures 29 and 30 is shown in Figures 35
and 36.
Figure 35. Verilog code for the seven-segment display code converter.
34 FPGAcademy.org
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY hex7seg IS
PORT ( hex : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
display : OUT STD_LOGIC_VECTOR(0 TO 6) );
END hex7seg;
Figure 36. VHDL code for the seven-segment display code converter.
FPGAcademy.org 35
Mar 2022
M AKING P LATFORM D ESIGNER C OMPONENTS For Quartus® Prime 21.1
Copyright © FPGAcademy.org. All rights reserved. FPGAcademy and the FPGAcademy logo are trademarks of
FPGAcademy.org. This document is being provided on an “as-is” basis and as an accommodation and therefore
all warranties, representations or guarantees of any kind (whether express, implied or statutory) including, with-
out limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically
disclaimed.
36 FPGAcademy.org
Mar 2022