1. Process Analysis of nioⅱ sbte build project
Nioⅱ gnu c compilation tool:
(1) nios2-elf-gcc
(2) nios2-elf-ar
(3) nios2-elf-g ++
(4) nios2-elf-insert
(5) nios2-elf-objdump
Prj_name: Prj _***
Prj_bsp_name: Prj _ *** _ BSP
Click "build project". The following compilation prompt is displayed:
Make all // All: prj _ *** and prj _ *** _ BSP
// Start compiling the prj _ *** _ BSP Project
Info: Building ../prj _ *** _ BSP
Make-no-print-directory-C ../prj _ *** _ BSP
// CallNios2-elf-gccCompile
// The following compiled files are located in the prj _ *** _ BSP/hal/src directory.
Compiling alt_alarm_start.c
Compiling alt_busy_sleep.c
Compiling alt_close.c
Compiling alt_dcache_flush.c
Compiling alt_dcache_flush_all.c
Compiling alt_dcache_flush_no_writeback.c
Compiling alt_dev.c
Compiling alt_llist_insert.c
Compiling alt_dma_rxchan_open.c
Compiling alt_dma_txchan_open.c
Compiling alt_do_ctors.c
Compiling alt_do_dtors.c
Compiling alt_env_lock.c
Compiling alt_environ.c
Compiling alt_errno.c
Compiling alt_exception_entry.s
Compiling alt_exception_muldiv.s
Compiling alt_exception_trap.s
Compiling alt_execve.c
Compiling alt_exit.c
Compiling alt_fcntl.c
Compiling alt_fd_lock.c
Compiling alt_fd_unlock.c
Compiling alt_find_dev.c
Compiling alt_find_file.c
Compiling alt_flash_dev.c
Compiling alt_fork.c
Compiling alt_fs_reg.c
Compiling alt_stat.c
Compiling alt_get_fd.c
Compiling alt_getchar.c
Compiling alt_getpid.c
Compiling alt_gettod.c
Compiling alt_gmon.c
Compiling alt_icache_flush.c
Compiling alt_icache_flush_all.c
Compiling alt_iic.c
Compiling alt_iic_isr_register.c
Compiling alt_instruction_exception_entry.c
Compiling alt_instruction_exception_register.c
Compiling alt_io_redirect.c
Compiling alt_ioctl.c
Compiling alt_irq_entry.s
Compiling alt_irq_handler.c
Compiling alt_irq_register.c
Compiling alt_irq_vars.c
Compiling alt_isatty.c
Compiling alt_kill.c
Compiling alt_link.c
Compiling alt_load.c
Compiling alt_log_macro.s
Compiling alt_log_printf.c
Compiling alt_lseek.c
Compiling alt_main.c
Compiling alt_malloc_lock.c
Compiling alt_mount.s
Compiling alt_open.c
Compiling alt_printf.c
Compiling alt_putchar.c
Compiling alt_putstr.c
Compiling alt_read.c
Compiling alt_release_fd.c
Compiling alt_remap_cached.c
Compiling alt_remap_uncached.c
Compiling alt_rename.c
Compiling alt_sbrk.c
Compiling alt_settod.c
Compiling alt_software_exception.s
Compiling alt_stat.c
Compiling alt_tick.c
Compiling alt_times.c
Compiling alt_uncached_free.c
Compiling alt_uncached_malloc.c
Compiling alt_unlink.c
Compiling alt_usleep.c
Compiling alt_wait.c
Compiling alt_write.c
Compiling altera_nios2_irq.c
Compiling crt0.s
// The files compiled above are located in the prj _ *** _ BSP/hal/src directory.
// The following compiled files are located in the prj _ *** _ BSP/directory.
Compiling alt_sys_init.c
// The files compiled above are located in the prj _ *** _ BSP/directory.
// The following compiled files are located in the prj _ *** _ BSP/Drivers/src directory.
Compiling altera_avalon_jtag_uart_fd.c
...... // Then compile the driver source file for each IP address.
// The files compiled above are located in the prj _ *** _ BSP/Drivers/src directory
// CallNios2-elf-arAssembly
Creating libhal_bsp.a // compile all the *. O files generated in the previous compilation into libhal_bsp.a
// At This Point, BSP build complete, that is, the prj _ *** _ BSP project has been compiled
// Start compiling applications
Info: compiling app _ ***. C to OBJ/app_src.o // callNios2-elf-gccCompile
Info: Linking ***. Elf // callNios2-elf-g ++ nios2-elf-insertLink and Change Mode
Info: Creating ***. objdump // callNios2-elf-objdump
// At this point, the prj _ *** build complete and nioⅱ app are compiled.
2. Analysis of generate process in FPGA Builder
The nioⅱ system created in the System Builder is recorded as: directory/Niosii _***
After the system is built, click"Generate", The following message is displayed:
Info: wrote directory/niosii _ ***. sopcinfo
Info: niosii _ *****: wrote directory/niosii _ ****. html
//------
Info: niosii _ ***: generating QIP file // generate a QIP File
Info: info: Running quartuⅱ Shell
Info: info: Command: quartus_sh-T sopc_add_qip_file.tcl
Info: info: Evaluation of TCL script sopc_add_qip_file.tcl was successful
Info: info: quartuⅱ shell was successful
//------
Info: Starting PTF file elaboration // PTF File
.....
Info: Finished elaborating PTF File
//------
Executing:Sopc_builder-Classic-generate directory/niosii _ ***. PTF
Info: Starting generation
......
No. sopc_builder configuration file (!) // The file is missing
### Mk_custom_sdk starting
### Reading project directory/niosii _ ***. PTF
### Finding all CPUs
### Finding all available components
### Reading directory/. sopc_builder/install. PTF
### Found no. * Components
### Finding all peripherals
### Finding Software Components
###......
### Mk_custom_sdk Finishing
### Starting generation for system: nioⅱ _***
......
### Running Generator program for CPU // prompt to generate niosii, followed by detailed process
### Running Generator program for sysid // prompt to generate the sysid Module
###... // Generate IP components in turn
### GeneratingQuartus symbol for top level: Niosii _ *** // generate the quartuⅱ symbol.
### Creating system-generation Script: directory/niosii _ *** _ generation_script
### Running setup for HDL simulator: Modelsim
### The following system items have been generated:
(1) how to create a directory/niosii _ ***. PTF
(2) system HDL model: directory/nioⅱ _ ***. v
(3) system generation Script: directory/niosii _ *** _ generation_script
Info: system generation wasSuccessful// Niosii _ *** System Generation
3. Analysis of the compiling process
Quartusi compilation tool:
(1) quartus_map
(2) quartus_fit
(3) quartus_asm
(4) quartus_sta
Quartuⅱ hardware project is recorded as: prj _***
After you click "Starting compilation", the following message is displayed:
Info: Running QuartusIIAnalysis & Synthesis// Start from analysis and synthesis
Info: Command: quartus_map-read_settings_files = on-write_settings_files = off prj _ ***-C prj _***
Info: Parallel compilation is enabled and will use 2 of the 2 processors Detected
......
Info: QuartusII Analysis & synthesis was successful // complete analysis and synthesis
......
Info: Running QuartusIIFitter// Adaptation starts
Info: Command: quartus_fit-read_settings_files = OFF-write_settings_file = off prj _ ***-C prj _***
Info: Parallel compilation is enabled and will use 2 of the 2 processors Detected
Info: Selected device ep3c55f484c8 for design "prj _***"
......
Info: fitter preparation operations ending
Info: fitter placement preparation operations beginning
Info: fitter placement preparation operations ending
Info: fitter placement operations beginning
Info: fitter placement was successful
Info: fitter routing operations beginning
Info: fitter routing operations ending
......
Info: started post-fitting delay Annotation
Info: delay annotation completed successfully
......
Info: quartuⅱ fitter was successful // adaptation completed
......
Info: Running quartuⅱ javaser // implementation starts
Info: Command: quartus_asm-read_settings_files = OFF-write_settings_file = off prj _ ***-C prj _***
......
Info: Running quartuⅱ timequest Timing Analyzer // start of Time Series Analysis
Info: Command: quartus_sta prj _ ***-C prj _***
Info: Parallel compilation is enabled and will use 2 of the 2 processors Detected
......
Info: cycler is generating device programming files
......
Info: quartuⅱ javaser was successful // Implementation completed
......
Info: quartuⅱ timequest Timing Analyzer was successful // timing analysis ends
......
Info: QuartusII full compilation was successful // QuartusII compiled