8.1.4. Step 4: Create the top level wrapper

Create the top-level wrapper around the generated SOPC system. This release includes a template for the FPGA top level file named CortexM1_ExampleDesign_Top.v in the default ExampleDesign directory. Copy this file into your project directory.

Note

This is a transparent wrapper that instantiates the top-level SOPC module.

The following code extract includes the signals that have been modified in the example template provided. You will also need to make these assignments if you create your own top-level system.

//wire declarations
wire [ 23: 0] tristate_bridge_address_internal;
wire EDBGRQ_to_the_arm_cortexm1_inst_internal;
wire NMI_to_the_arm_cortexm1_inst_internal;
wire [3:0] out_port_from_the_LED_IF_internal;
wire [3:0] in_port_to_the_Switch_IF_internal;
wire reset_n_internal;
wire locked_from_the_Ext_SRAM_PLL;
//assignments
assign tristate_bridge_address[23:1] = tristate_bridge_address_internal[23:1];
//signal anded with 0 because no pulldown resistors are availableassign EDBGRQ_to_the_arm_cortexm1_inst_internal  = (EDBGRQ_to_the_arm_cortexm1_inst & 1'b0);
//signal anded with 0 because no pulldown resistors are available
assign NMI_to_the_arm_cortexm1_inst_internal  = (NMI_to_the_arm_cortexm1_inst & 1'b0);
assign in_port_to_the_Switch_IF_internal  = ~in_port_to_the_Switch_IF;
assign out_port_from_the_LED_IF           = ~out_port_from_the_LED_IF_internal;
assign reset_n_internal                   = reset_n & locked_from_the_Ext_SRAM_PLL;

The following signals inputs to the processor are not used in the example system and must be driven LOW:

The out_port_from_the_LED_IF are inverted to allow a logic 1 to turn on the LED. The in_port_to_the_Switch_IF is inverted so a pressed switch produces a logic 1 in the internal FPGA design.

The reset_n signal is anded with locked_from_the_Ext_SRAM_PLL to produce the FPGA reset_n_internal signal.

Note

In other Altera FPGAs, these signals are held LOW with pull-down resistors in the FPGA. The Cyclone III only has pull-ups. Pull-downs are not available to the user.

Copyright © 2008 ARM Limited. All rights reserved.ARM DUI 0430A
Non-Confidential