Forum Discussion
Altera_Forum
Honored Contributor
17 years agoIn my experience w/ the Nios projects, I would use the .VHD file to grab the appropriate component declaration information (as well as for the instantiation), but then use the .sopc file in Quartus. If you look at the very bottom of the <project_name>.vhd for the Nios project, you'll find the declared module text. The following is the naming format for the Nios ports (named pio_in16 and pio_out16 in the SOPC project, respectively):
-- the_pio_in16 in_port_to_the_pio_in16 : IN STD_LOGIC_VECTOR (15 DOWNTO 0); -- the_pio_out16 out_port_from_the_pio_out16 : OUT STD_LOGIC_VECTOR (15 DOWNTO 0); I have found that the following assignments are all I need to get Nios working as an instantiation in a Quartus project. [path] = location of the SOPC builder project "nios_project" = name of the Nios project This also assumes that you are using on-chip memory for the codespace (which is what I do). set_global_assignment -name SEARCH_PATH [path] set_global_assignment -name SOURCE_FILE [path]/nios_project.sopc set_global_assignment -name QIP_FILE [path]/nios_project.qip set_global_assignment -name VHDL_FILE [path]/onchip_memory_0.vhd set_global_assignment -name HEX_FILE [path]/onchip_memory_0.hex set_global_assignment -name MIF_FILE [path]/cpu_0_ociram_default_contents.mif set_global_assignment -name MIF_FILE [path]/cpu_0_rf_ram.mif Jeff