【正文】
(指導老師:林漢) 。本設計技術較先進,器件運用較合理,所設計產(chǎn)品具有一定的應用價值和市場開發(fā)潛力。論文介紹了基于 FPGA 的多功能信號發(fā)生器的設計思想、使用的設計及仿真軟件、設計程序的編寫、仿真過程及結果、設計電路的工作原理、電子器件的使用方法等,特別是作者在設計中引入了 Nios II 嵌入式處理器,大大簡化了設計過程,保證了設計指標,為畢業(yè)設計的成功打下了基礎。 } return 0。 //****************SEG7 display led_data=led_display(seg7_data1,seg7_data2,seg7_data3)。23 if(yushu3) seg7_data2++。 seg7_data2=ad_data/5。 seg7_data2=2。 else if (selt_data==2) seg7_data3=2。 selt_data=IORD_ALTERA_AVALON_PIO_DATA(SELT_BASE)。 if(yu_zhi5) data=zheng_zhi。 zheng_zhi=15625/temp1。 //IOWR_ALTERA_AVALON_PIO_DATA(LED_RED_BASE,temp)。 } temp=k3*10+k2。 else k2=0。 //IOWR_ALTERA_AVALON_PIO_DATA(LED_RED_BASE,1)。 key2=IORD_ALTERA_AVALON_PIO_DATA(KEY2_BASE)。 } while(key3==0) key3=IORD_ALTERA_AVALON_PIO_DATA(KEY3_BASE)。 if(key3==0) { if(k310) k3++。 if(key3==0) { usleep(50000)。 key2=IORD_ALTERA_AVALON_PIO_DATA(KEY2_BASE)。 u32 ad_data,yushu。 u32 temp,temp1,zheng_zhi,yu_zhi,data,selt_data。 return(led)。//move the value to the d7=28。//move the value to the 21 d5=20。//move the value to the d3=12。// ,display 0 //move bit d1=4。// ,display value d6=data3。// ,display value d5=data2/a1。d3=d3%a1。d2=d2%a1。// ,display 0 d1=data1%a1。s hardware. * The memory footprint of this hosted application is ~69 kbytes by default * using the standard reference design.20* For a reduced footprint version of this template, and an explanation of how * to reduce the memory footprint for a given application, see the * small_hello_world template. */include include include include sys/include define u8 alt_u8define u32 alt_u32define a1 10define a2 100define a3 1000define a4 10000define a5 100000define a6 1000000define a7 10000000//***********************************8int led_display(u32 data1,u32 data2,u32 data3) { u32 d0,d1,d2,d3,d4,d5,d6,d7,led。low_cost39。fast39。full_featured39。standard39。Hello from Nios II39。 end else i=i+1。 wd=~wd。 i=0。 always (posedge f_50m) begin if(!reset)begin rd=0。 reg rd,wd。 input reset,f_50m。 end else i=i+1。 end else begin if(i==500) begin i=0。 always (posedge f_50m) begin if(!reset) begin f_100k=0。 reg f_100k。 input reset,f_50m。b10: selt=3。b01: selt=2。b00: selt=1。b10: q_out=sqra。b01: q_out=sina。b00: q_out=dlta。b00。b10) tmp=tmp+1。 else if(t1000) t=t+1。 endalways (posedge clk) begin if(KEY1==139。b00。reg [1:0] selt。reg [1:0] tmp。output [1:0]selt。input [7:0]dlta,sqra,sina。input clk。end sin_arc。end if。 when others=d=0。 when 62=d=254。 when 60=d=249。 when 58=d=239。 when 56=d=225。 when 54=d=207。 when 52=d=186。 when 50=d=162。 when 48=d=137。 when 46=d=112。 when 44=d=87。16 when 42=d=64。 when 40=d=43。 when 38=d=26。 when 36=d=13。 when 34=d=4。 when 32=d=0。 when 30=d=1。 when 28=d=8。 when 26=d=19。 when 24=d=34。 when 22=d=53。 when 20=d=75。 when 18=d=99。 when 16=d=124。 when 14=d=150。 when 12=d=174。 when 10=d=197。 when 08=d=217。 when 06=d=233。 when 04=d=245。 when 02=d=252。 case tmp is when 00=d=255。脈沖控制波形離散點的輸出; else tmp:=tmp+1。139。 elsif clk39。039。architecture sin_arc of sin isbeginprocess(clk,clr)variable tmp:integer range 0 to 63。 d:out integer range 0 to 255)。use 。正弦波library ieee。 end process。 end if。 end if。039。 else if tmp=00000111then tmp:=00000000。 else tmp:=tmp+8。 a:=39。039。139。 elsif clk39。039。 variable a:std_logic。end delta。entity delta is port(clk,reset:in std_logic。use 。end sq_1。end if。elseq= 0。 thent= t + 1。event and clk=39。signal t:std_logic_vec