名稱:LFSR偽隨機(jī)序列發(fā)生器Verilog代碼vivado仿真
軟件:vivado
語(yǔ)言:Verilog
代碼功能:
LFSR偽隨機(jī)序列發(fā)生器
根據(jù)提供的電路圖寫代碼,實(shí)現(xiàn)LFSR偽隨機(jī)序列發(fā)生器。
FPGA代碼Verilog/VHDL代碼資源下載:www.hdlcode.com
演示視頻:
設(shè)計(jì)文檔:
1. 工程文件
2. 程序文件
3. 程序編譯
4. Testbench
5. 仿真圖
部分代碼展示:
module?lfsr( input?clk, input?rst, output?number ); wire?[3:0]?x; assign?x=4'b1011; reg?[3:0]?L; always@(posedge?clk?or?posedge?rst) if(rst) L<=4'b0101; else begin L[1]<=L[0]; L[2]<=L[1]; L[3]<=L[2]; L[0]<=L[3]?^?L[2];
點(diǎn)擊鏈接獲取代碼文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=480
閱讀全文