国产久操视频-国产久草视频-国产久热精品-国产久热香蕉在线观看-青青青青娱乐-青青青青在线成人视99

  • 方案介紹
  • 附件下載
  • 相關(guān)推薦
申請入駐 產(chǎn)業(yè)圖譜

DQPSK調(diào)制解調(diào)verilog代碼quartus

05/06 08:16
593
加入交流群
掃碼加入
獲取工程師必備禮包
參與熱點資訊討論

1-230924215F0Q7.doc

共1個文件

名稱:DQPSK調(diào)制解調(diào)(代碼在文末付費下載)

軟件:Quartus

語言:Verilog

要求:使用Verilog語言進行DQPSK調(diào)制和解調(diào),并進行仿真

演示視頻:

部分代碼展示

//DPSK解調(diào)模塊
module?QPSK_demodu(
????input?clk,
????input?rst,
?input?[7:0]?qout,//調(diào)制波
?input?[7:0]?cos_wave,//本地載波
?input?[7:0]?sin_wave,//本地載波?
????output?[1:0]?data//解調(diào)輸出
);
wire?[16:0]?cos_mul;
wire?[16:0]?sin_mul;
assign?cos_mul=cos_wave*qout;//調(diào)制波形與本地載波相乘
assign?sin_mul=sin_wave*qout;//調(diào)制波形與本地載波相乘
reg?[5:0]filter_cos_cnt=0;//32
reg?[5:0]filter_sin_cnt=0;//32
reg?demodulate_a=0;
reg?demodulate_b=0;
//采用計數(shù)器濾波,檢測到cos_mul(15)?=?'1'后計數(shù)到25
always?@(posedge?clk)
??begin
????if(rst)
filter_cos_cnt<=6'd0;
?else
?if(cos_mul[15]==1)?
filter_cos_cnt<=6'd1;
????else?
???if(filter_cos_cnt==6'd0)
filter_cos_cnt<=6'd0;
else
if(filter_cos_cnt>=6'd25)
filter_cos_cnt<=6'd0;
else?
filter_cos_cnt<=filter_cos_cnt+6'd1;
??end
always?@(posedge?clk)
begin
??if(filter_cos_cnt==6'd0)
demodulate_a<=0;//濾波輸出解調(diào)的a路信號
??else
??????demodulate_a<=1;//濾波輸出解調(diào)的a路信號
end
//采用計數(shù)器濾波,檢測到sin_mul(15)?=?'1'后計數(shù)到25
always?@(posedge?clk)
??begin
????if(rst)
filter_sin_cnt<=6'd0;
?else
?if(sin_mul[15]==1)?
filter_sin_cnt<=6'd1;
????else?
???if(filter_sin_cnt==6'd0)
filter_sin_cnt<=6'd0;
else
if(filter_sin_cnt>=6'd25)
filter_sin_cnt<=6'd0;
else?
filter_sin_cnt<=filter_sin_cnt+6'd1;
??end
always?@(posedge?clk)
begin
??if(filter_sin_cnt==6'd0)
demodulate_b<=0;//濾波輸出解調(diào)的b路信號
??else
??????demodulate_b<=1;//濾波輸出解調(diào)的b路信號
end
//////////////
reg?[7:0]?cnt=8'd0;
always?@(posedge?clk)
??begin
????cnt<=cnt+1;
??end??
reg?a_buf=0;
reg?b_buf=0;
reg?a_buf2=0;
reg?b_buf2=0;
wire?D_a,D_b;
always@(posedge?clk)
if(cnt==8'd1)?begin
a_buf<=demodulate_a;
b_buf<=demodulate_b;
a_buf2<=a_buf;//a路延遲
b_buf2<=b_buf;//b路延遲
end
//差分解調(diào)
assign?D_a=a_buf?^?a_buf2;//Cn=Bn^Bn-1
assign?D_b=b_buf?^?b_buf2;//Cn=Bn^Bn-1
wire?[1:0]data_buf;
assign?data_buf={D_a,D_b};//輸出差分解調(diào)后的2bit數(shù)據(jù)
assign?data=data_buf;
endmodule

設(shè)計文檔(文檔點擊可下載):

1. 工程文件

2. 程序文件

3. 程序編譯

4. RTL圖

5. Testbench

6. 仿真圖

載波模塊

調(diào)制模塊

解調(diào)模塊

點擊鏈接獲取代碼文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=172

  • 1-230924215F0Q7.doc
    下載

相關(guān)推薦

海晏县| 边坝县| 哈尔滨市| 稻城县| 电白县| 马尔康县| 长阳| 常州市| 广东省| 双峰县| 乐至县| 蒙山县| 遵义县| 宁河县| 樟树市| 舒城县| 右玉县| 察雅县| 海原县| 新乡市| 大宁县| 泰州市| 富锦市| 昆山市| 从化市| 稻城县| 拜城县| 双柏县| 岳池县| 湾仔区| 隆林| 朝阳区| 乐都县| 石泉县| 拜城县| 东丽区| 措美县| 松滋市| 太白县| 池州市| 磐安县|