微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > 请教高手vhdl程序问题

请教高手vhdl程序问题

时间:10-02 整理:3721RD 点击:
也是关于两个FPGA之间的高速传输,传输速度100MHZ. 只有两个传输线,一个作为发送一个作为接收。我现在用vhdl编写了一个程序发送1个起始位,8个数据位,1个停止位,但是不知道要怎样开始传输过程。请高手帮帮忙,要怎样开始传输呢,非常感谢。
process(clk100p)
begin
if(clk100p 'event and clk100p = '1') then
         startsr(0) <= start;
   startsr(1) <= startsr(0);
   if (startsr(0) = '1' and startsr(1)= '0') then
          dataout <= '0';
        count <= "0000";
        schiebereg <= sendedaten;
        enable <= '1';
   else
      if enable <= '1' then
         if zaehl <= 9 then
          zaehl <= 0;
       else
         zaehl<= zaehl+1;
       if zaehl <= 0 then
              if count < "1001" then
                         dataout <= schiebereg(0);
             schiebereg(8 downto 0)<= schiebereg(9 downto 1);
             count <= count + '1';
            else
              if count = "1001" then
               dataout <= '1';
                     count <= count + '1';
            end if;
        end if;
             end if;
              end if;
    end if;
   end if;
end if;
end process;
end Behavioral;

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top