// Decode Manchester into NRZ code
always@(posedge clk16x or negedge FPGA_nRESET_reg1)
begin
if(!FPGA_nRESET_reg1)
begin
nrz <= 1'b0 ;
end
else
begin
if(no_bits_rcvd > 0 && sample == 1'b1)
begin
nrz <= mdi2 ~^ clk1x ;
end
else if(!clk1x_enable)
begin
nrz <= 0 ;
end
end
end
解码部分的代码