?? two_ask.v
字號:
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 20:37:26 07/20/2007
// Design Name:
// Module Name: two_ASK
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module two_ASK(clk, reset, x, y);
input clk;
input reset;
input x; //輸入信號
output y;
// cnt 是分頻計數器
reg cnt;
// carriers是要調制的載波信號,將輸入信號clk經過4分頻得到
reg carriers;
always @(posedge clk) begin
if(!reset) begin
cnt <= 1'b0;
carriers <= 0;
end
else begin
if (cnt == 1'b1) begin
cnt <= 1'b0;
carriers <= ~carriers;
end
else begin
carriers <= carriers;
cnt <= cnt + 1;
end
end
end
// 對基帶信號進行調制
assign y = x & carriers;
endmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -