40位曼彻斯特解码模块的vhdl代码求助
时间:10-02
整理:3721RD
点击:
代码的一部分贴上,问题在代码下面:process(reset,clkMuxx,mdi,filterok,filterok_delay,mdi_r,mdi_r_filterok,rxf,rxf_r,mdi_xor_active,s_data_active)
begin
if rising_edge(clk) then
-- filter data
rxf '0');
rxf_r '0');
filterok '0');
xor_filterok '0');
end if;
end process;
-- decode1m
decode_proc:
process(tick,clk,filterok,filterok_delay,line_active,reset, clk_1m,DataBit_cnt_width,
decode_word_flag,bit_cnt_recv,decode_state,dout_wr_cnt_delay,HalfBit_cnt_width)
variable parity_v : std_logic;
begin
if rising_edge(clkMuxx) then
HalfBit_cnt_width <= 0;
if (tick ) = '0' then --record bit gap time
HalfBit_cnt_width <= HalfBit_cnt_width + 1;
--最终问题来了,这个Halbit将会一直+1了,因为tick永远是初值0.。求哪位大神给我解惑
end if;
begin
if rising_edge(clk) then
-- filter data
rxf '0');
rxf_r '0');
filterok '0');
xor_filterok '0');
end if;
end process;
-- decode1m
decode_proc:
process(tick,clk,filterok,filterok_delay,line_active,reset, clk_1m,DataBit_cnt_width,
decode_word_flag,bit_cnt_recv,decode_state,dout_wr_cnt_delay,HalfBit_cnt_width)
variable parity_v : std_logic;
begin
if rising_edge(clkMuxx) then
HalfBit_cnt_width <= 0;
if (tick ) = '0' then --record bit gap time
HalfBit_cnt_width <= HalfBit_cnt_width + 1;
--最终问题来了,这个Halbit将会一直+1了,因为tick永远是初值0.。求哪位大神给我解惑
end if;
没仔细看,本人用的是Verilog,但是前面的clk速率应该是Manchester带宽的4倍,这样只是为了更加精准的采样,filterok才和Manchester编码后发出的波形一样
我的妈,VHDL真是复杂
