用verilog寫的正弦波發(fā)生器_第1頁
用verilog寫的正弦波發(fā)生器_第2頁
用verilog寫的正弦波發(fā)生器_第3頁
用verilog寫的正弦波發(fā)生器_第4頁
用verilog寫的正弦波發(fā)生器_第5頁
已閱讀5頁,還剩28頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、module sin(clk, rst_n, clock_l, addr_div_l, sin_data); input elk;input rst_n;output9:0 sin_data;output9:0 addr_div_l;/output 19:0 addr_div;output clock_l;wire clock;wire 9:0. addr_div;wire9:0. address;wire9:0 line;/wire7:0 q;/wire9:0 cnt_temp;div Ul( clk(clk), rst_n(rst_n), clockl (clock_l), clock (

2、clock);counter U2( clock (clock)t rst_n(rst_n), addr_div_l(addr_div_l), addr_div(line);sinwave U3( clock (clock), address(line), q(sin_data);endmodulemodule div(clk, rst_n, clock, clock_l);input elk;input rst_n;output clock;output clock_l;reg9:0. count;reg9:0. count_temp;always(posedge elk or negedg

3、e rst_n)beginif (!rst_n)begin count = 10dO;count_temp=0;endelse 辻(count = 10d24)begincount = 10dO;count_temp = ount_temp;endelsebegincount = count + 10dl;endendwire clock, clock_l;assign clock = count_temp;assign clock_l = count_temp;endmodulemodule counter(clock, rst_n, addr_div, addr_div_l);input

4、clock;input rst_n;output9:0 addr_div;output9:0 addr_div_l;reg9:0 ent;reg9:0. cnt_temp;always(posedge clock or negedge rst_n)if (!rst_n)ent = 10dO;else 辻(ent = 10dl023) ent = 10dO; elseent = ent + 10 dl;always(posedge clock or negedge rst_n)if(!rst_n)cnt_temp = 10dO;else 辻(ent = 10dl023)cnt_temp = 10

5、dO;elsecnt_temp = ent;wire 9:0. addr_div, addr_div_l; assign addr_div = cnt_temp; assign addr_div_l = cnt_temp; endmodule正弦波形數(shù)孺,做ROM用 WIDTH=10;DEPTH二1024;ADDRESS_RADIX二UNS;DATA_RADIX=UNS;CONTENT BEGIN0:511;1 :514;2 :517;3 :520;4 :524;5 :527;6 :530;7 :533;8 :536;9 :539;10:542;11:545;12:549;13:552;555

6、;558;561;564;567;570;574;577;580;583;586;589;592;595;598;602;605;608;611;614;617;620;623;626;629;632;635;638;641;644;647;650;653;656;659;662;665;668;671;674;677;680;683;1415161718192021222324252627282930313233343536373839404142434445464748495051525354555657686;585960616263646566676869707172737475767

7、778798081828384858687888990919293949596979899100689;692;695;698;701;704;707;710;713;715;718;721;724;727;730;733;735;738;741;744;747;749;752;755;758;760;763;766;769;771;774;777;779;782;785;787;790;793;795;798;800;803;806;808;1011111111111111111111111444444333333333322222 25432109876543210987 65411111

8、111122221111132109876599999888888888888888880000099999888877777666864208642086419753086400 00 CO CO6 Ol Ul UlCO CO 00 CO554419752075COOOOOOOOOOOOOOOOOCOCO44333322221308531863180000 COill146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183

9、184185186187188189910912914916918920922924926927929931933935936938940941943945946948950951953954956958959961962964965966968969971972973975976977979980190981;191982;192984;193985;194986;195987;196988;197989;198990;199992;200993;201994;202995;203996;204997;205998;206999;2071000208100020910012101002211

10、100321210042131005214100621510062161007217100821810092191009220101022110112221011223101222410132251013226101422710142281015229101523010162311016232101723310172342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762771018;1018;

11、1019;1019;1019;1020;1020;1020;1021;1021;1021;1021;1022;1022;1022;1022;1022;1022;1022;1022;1022;1022;1023;1022;1022;1022;1022;1022;1022;1022;1022;1022;1022;1021;1021;1021;1021;1020;1020;1020;1019;1019;1019;1018;278101827910172801017281101628210162831015284101528510142861014287101328810132891012290101

12、1291101129210102931009294100929510082961007297100629810062991005300100430110033021002303100130410003051000306999;307998;308997;309996;310995;311994;312993;313992;314990;315989;316988;317987;318986;319985;320984;321982;35I r -9 9 96 6 6134689124568912999999999OlOl Ol5556669999999999999999999999111122

13、2222333334444445246802467913568013568044444444443333333333 00000000009999999999 987654321098 7 6543210CO 001 136OOOOOOOOCOCOCOCO444555U1U1357O257988888888881222233334813681358033 33377766210983 3 CO CO9 CO3 38 CO7 633CO CO543 3 CO CO 1 O3 3779 00888888888888888888999999666677777 88889999900000114680

14、3579146802468024680410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453811;808;806;803;800;798;795;793;790;787;785;782;779;777;774;771;769;766;763;760;758;755;752;749;747;744;741;738;735;733;730;727;724;721;718;715;713;7

15、10;707;704;701;698;695;692;44444448887777210987655555555555555666666665666 7 7 7 8888999000111 2 2814704 7 0369258258147034 447775 4 34444444444444444444777666666666655555521098765432109876546 6 62 2 36926 66 6 66 66 6 66 66666666334445555666777COCOCOCO58147036925814703695555555555555555555555443333

16、33333322222222221098765432109876543210444444444444444444444422233334445556667778880470369258258147 037036449 99 CO5555555555551111111111OO9876543210984444555555555555555555 89990 OO1 112 2 23333444 U1 O19258258147047036925925542543544545546547548549550551552553554555556557558559560561562563564565566

17、567568569570571572573574575576577578579580581582583584585417;414;411;408;405;402;399;396;393;390;387;384;381;378;375;372;369;366;363;360;357;354;351;348;345;342;339;336;333;330;327;324;321;318;315;312;309;307;301;301;298;295;292;289;6666666665555555555555500000000099999999998888876543210987654321098

18、7611111111111222222222277700880099990000111122579247914691469146924222222222 2 2222222222222 2233344445555666777788 CO7925703 5 8136924 70358147630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673172170167165163161158156

19、15415214914714514314113813613413213012812612412212011811611411211010810610410210098;96;95;93;91;89;87;86;84;67467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671782;81;79;77;76;74;72;71;69;68;66;64;63;61;60;58;57;56;54;53;

20、51;50;49;47;16;45;43;42;41;40;38;37;36;35;34;33;32;30;29;28;27;26;25;24;2322222120191817161615141313121111109;9;8;8;7;7;6;6;5;5;4;4;3;3;3;2;2;2;1;1;1;1;0;0;0;7187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607610;0;0;0;0;

21、0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;1;1;2;2;2;3;3;3;4;4;5;5;6;6;7;7;8;8;9;9;101111121376276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379179579679779879980080180280380480580613;80714;80815;80916;81016;81117;81218;81319;81420;81521;81622;81722;81823;81924;8202

22、5;82126;82227;82328;82429;82530;82632;82733;82834;82935;83036;83137;83238;83340;83441;83542;83643;83745;83846;83947;84049;84150;84251;84353;84454;84556;84657;84758;84860;84961;85063;85164;85266;85368;85469;85571;85672;85774;85876;85977;86079;86181;86282;86384;86486;86587;86689;86791;86893;86995;87096;87198;87210087310287410487510687610887711087811287911488011688111888212088312288412488512688612888713088813288913489013689113889214189314399999999999999999999993333333322222 2222211117 65432109876543210987622

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論