0.
It takes the I/Q samples as input and asserts the trigger signal during a potential packet activity.
Optionally, it can be configured to skip the first certain number of samples before detecting a power trigger. This is useful to skip the spurious signals during the initial hardware stabilization phase.
The logic of the power_trigger module is quite simple: after skipping certain number of initial samples, it waits for significant power increase and triggers the trigger signal upon detection. The trigger signal is asserted until the power level is smaller than a threshold for certain number of continuous samples.
input clock, //时钟
input enable, //模块使能
input reset, //复位
input set_stb, //设置选通信号
input [7:0] set_addr, //设置地址,8位
input [31:0] set_data, //设置数据,32位
input [31:0] sample_in, //采样输入,32位
input sample_in_strobe, //采样输入选通信号
output reg trigger //触发信号
1.
先通过setting_reg模块设置set_stb、set_addr和set_data等相关参数:(1)信号检测阈值[15:0] power_thres;(2)信号消失检测窗口长度[15:0] window_size;(3)信号出现时跳过的采样点数目[31:0] num_sample_to_skip。
power_thres = 16'd100;
window_size = 16'd80;
num_sample_to_skip = 32'd0; //原来是32‘d500_0