?? qpsk_two.v
字號(hào):
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 19:54:56 07/21/2007
// Design Name:
// Module Name: QPSK_two
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module QPSK_two(clk, reset, x, y);
input clk; //系統(tǒng)工作時(shí)鐘
input reset; //系統(tǒng)控制信號(hào)
input x; //系統(tǒng)輸入信號(hào)
output y; //QPSK解調(diào)輸出信號(hào)
// 先記錄下8個(gè)時(shí)鐘周期的信號(hào),然后供下一次判決
reg [7:0] temp;
reg [7:0] temp2;
reg [2:0] cnt;
wire [1:0] y1;
always @(posedge clk) begin
if (!reset)
cnt <= 3'b111;
else begin
cnt <= cnt +1;
if (cnt == 3'b111)
temp <= temp2;
else
temp <= temp;
temp2 <= {temp2[6:0], x};
end
end
assign y1 = (reset == 0) ? 2'b00 :
(temp == 8'b11110000) ? 2'b00 :
(temp == 8'b11000011) ? 2'b01 :
(temp == 8'b00001111) ? 2'b10 :
(temp == 8'b00111100) ? 2'b11 : 2'b00;
assign y = (cnt[2] == 0) ? y1[1] : y1[0];
endmodule
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -