1.初学verilog 想请您帮忙看看 谢谢 如何实现ASK fsk
初学verilog 想请您帮忙看看 谢谢 如何实现ASK fsk
我这里可以实现2-ask 和2-fsk的调制和解调。。zxing库源码下载。更改app页面源码。转卡模式源码
2-ask 调制
module two_ask(clk,智慧屏源码输出rst,x,y);
input clk,rst,x;
output y;
reg[1:0] cnt;
reg car;
always @ (posedge clk)
begin
if(!rst)
begin
cnt<=2'b0;
car<=0;
end
else begin
if(cnt==2'b)
begin
cnt<=2'b;
car<=~car;
end
else begin
car<=car;
cnt<=cnt+1;
end
end
end
assign y=x&car;
endmodule
2-ask 解调
module two_ask(rst,clk,x,y);
input clk;
input rst;
input x;
output y;
reg y;
reg[2:0] cnt;
reg[2:0] m;
always @(posedge clk)
begin
if(!rst) begin
cnt<=3'b;
end
else if(cnt==3b)
cnt<=3'b;
else cnt<=cnt+1;
end
always @(posedge clk)
beign
if(!rst)
begin
m<=3'b;
end
else beign
if(cnt==3'b)
begin
if(m<=3'b)
y<=0;
else
y<=1'b1;
m<=3'b;
end
else
m<=m+1;
end
end
endmodule
就是做个ASK-FSK的转化模块
先写个ASK的,然后写个FSK的清风小程序源码,2个合起来就是顶层模块,然后对顶层模块仿真即可