PWM_LED

所属分类:VHDL/FPGA/Verilog
开发工具:PHP
文件大小:1657KB
下载次数:219
上传日期:2006-04-11 10:17:02
上 传 者hitray
说明:   PWM_LED的开发 vhdl编程
(PWM_LED the development of VHDL programming)

文件列表:
PWM_LED\boot_rom.mif (5732, 2005-04-17)
PWM_LED\BOOT_ROM.VHD (5635, 2005-04-17)
PWM_LED\CPU.VHD (502664, 2005-04-17)
PWM_LED\DEBUG.FSF (267, 2004-03-14)
PWM_LED\FLASH8.MIF (1048848, 2004-12-04)
PWM_LED\LED_PIO.VHD (2922, 2005-04-17)
PWM_LED\M0A.BDF (15124, 2005-04-17)
PWM_LED\M0A.CDF (293, 2004-11-23)
PWM_LED\M0A.CSF (12828, 2004-03-12)
PWM_LED\M0A.ECO (0, 2004-03-14)
PWM_LED\M0A.PIN (30633, 2005-04-17)
PWM_LED\M0A.POF (524430, 2005-04-17)
PWM_LED\M0A.PSF (4678, 2004-03-14)
PWM_LED\M0A.QPF (1555, 2005-04-17)
PWM_LED\M0A.QSF (11766, 2005-04-17)
PWM_LED\M0A.QWS (1237, 2005-04-17)
PWM_LED\M0A.SOF (140510, 2005-04-17)
PWM_LED\M0A.SSF (338, 2004-03-14)
PWM_LED\M0A.asm.rpt (8992, 2005-04-17)
PWM_LED\M0A.done (26, 2005-04-17)
PWM_LED\M0A.fit.eqn (1499685, 2005-04-17)
PWM_LED\M0A.fit.rpt (743349, 2005-04-17)
PWM_LED\M0A.map.eqn (1317089, 2005-04-17)
PWM_LED\M0A.map.rpt (177959, 2005-04-17)
PWM_LED\M0A.tan.rpt (373884, 2005-04-17)
PWM_LED\M0A_assignment_defaults.qdf (29362, 2004-09-04)
PWM_LED\NIOS32.BSF (4039, 2005-04-17)
PWM_LED\nios32.ptf (45517, 2005-04-17)
PWM_LED\NIOS32.VHD (252990, 2005-04-17)
PWM_LED\NIOS_0.VHD (475853, 2004-03-21)
PWM_LED\RELEASE.FSF (267, 2004-03-14)
PWM_LED\TIMER1.VHD (11161, 2005-04-17)
PWM_LED\UART1.VHD (62305, 2005-04-17)
PWM_LED\altera_vhdl_support.vhd (22524, 2005-04-17)
PWM_LED\amd_avalon.mif (1048874, 2004-03-21)
PWM_LED\amd_avalon_contents.srec (171768, 2004-03-21)
PWM_LED\amd_flash2.mif (1048858, 2004-09-04)
PWM_LED\amd_flash2_contents.srec (165526, 2004-09-04)
PWM_LED\amd_flash6.mif (1048858, 2004-09-04)
PWM_LED\amd_flash6_contents.srec (165526, 2004-09-04)
... ...

readme.txt - How to use the -mflat compiler option and librarys What is MFLAT? -------------- The Nios GNU tools and libraries now include an mflat option to generate code that works with a flat (non-windowing) register file. When this option is used, the compiler: Saves registers to the stack on function calls, instead of issuing the SAVE instrction to advance the CWP. Restores registers from the stack on fuction returns, instead of issuing the RESTORE instrction to decrement the CWP. How to Use MFLAT? ----------------- The Makefile in this directory demonstrates how to compile and link a 32 bit Nios program using the mflat option and libraries. The nios sdk library must also be recompiled with the mflat option. This can be done by changing the file: *sdk/lib/Makefile The line: CCFlags = -g -c -O2 -mno-zero-extend -m$(M) -I ../inc \ should be replaced with the line: CCFlags = -g -c -O2 -mno-zero-extend -m$(M) -I ../inc -mflat\ You should also disable the installation of the CWP manager. This can also be done by modifying the excalibur.h and excalibur.s files For excalibur.s, change: .equ __nios_use_cwpmgr__ , 1 ; Handle register window underflows To: .equ __nios_use_cwpmgr__ , 0 ; Handle register window underflows For excalibur.h, change: #define __nios_use_cwpmgr__ 1 // Handle register window underflows To: #define __nios_use_cwpmgr__ 0 // Handle register window underflows Then run "make" in the *sdk/lib directory Some assembly routines in the nios sdk library use SAVE and RESTORE instructions. These routines should be avoided or rewritten to save and restore the registers they corrupt to/from the stack. These include: The Nios GDB stub The Nios profiler (gprof) nr_longjmp nr_uart_txcr nr_uart_txhex[16,32] nr_uart_txstring The isr manager (nios_isrmanager.s) has been rewritten to work with MFLAT, and is included in this directory, and should copied to the *sdk/lib directory and rebuilt with the Makefile there. What about interrupts with MFLAT? --------------------------------- The Nios itself advances the CWP on an interrupt, so appications that use interrupts will not run in with a truely flat register model. However, the nios_isrmanager.s included in this directory saves the required registers on the stack and restores the CWP to its original location before calling the user installed ISR, so ISRs which use this manager will run in a flat register model. If you do not not choose to use the included isr manager, each interrupt will advance the CWP, and operate in a new register window. If nested interrupts are allowed (by enabling interrupts inside an ISR), it is possible for the CWP to overflow.

近期下载者

相关文件


收藏者