FPGA计划曼彻斯特编解码Verilog源代码modulemd(rst,clk16x,mdi,rdn,dout,data_ready);inputrst;inputclk16x;inputmdi;inputrdn;output[7:0]dout;outputdata_ready;regclk1x_enable;regmdi1;regmdi2;reg[7:0]dout;reg[3:0]no_bits_rcvd;reg[3:0]clkdiv;regdata_ready;wireclk1x;regnrz;wiresample;reg[7:0]rsr;//Generate2FFregistertoacceptserialManchesterdatainalways@(posedgeclk16xorposedgerst)beginif(rst)beginmdi1<=1'b0;mdi2<=1'b0;endel
1