此时需要单独使用always来完成此功能,当软件下发指令时,当S_tx_start变量拉高;当fifo读空shi,将S_tx_start变量拉低。
always @(posedge I_rs422_clk)begin
if(RS422_ctl_rst)
S_tx_start <= 0;
else if(RS422_ctl_en && (RS422_ctl_we == 4'hf)&&(RS422_ctl_addr==12'h028))
S_tx_start <= RS422_ctl_din[0];
else if(S_empty)
S_tx_start <= 0;
end