イーサネットパケット送信に使用されるLinuxサーバボックスに接続されたFPGAボードを使用しています。 10パケットごとに1つのLEDが1回点滅し、処理が続行されます。つまり、100個のパケットを送信すると、LEDが10回点滅するはずです。私は実行しようとしたVHDLのソースコードを共有しましたが、それは私が望むやり方では機能しません。何か助けや提案は本当に感謝されます。前もって感謝します。FPGA(VHDL) - イーサネットパケット受信時にLEDが点滅する
---------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
---------------------------------------------
entity notification is
port (clk: in std_logic;
reset: in std_logic;
dv: in std_logic;
LED: out std_logic
\t );
end notification;
\t
architecture behavior of notification is
\t
signal packet_count: std_logic_vector (3 downto 0);
signal q: std_logic;
begin
process(clk)
begin
if reset = '1' then
packet_count <= "0000";
elsif dv = '1' then
if packet_count < "1010" then
packet_count <= packet_count + 1;
q <= '0';
else
q <= '1';
packet_count <= (others => '0');
end if;
end if;
LED <= q;
end process;
end behavior;
コードにif-statementクロックがありません(rising_edge)。 VHDLで同期設計を参照してください。 – JHBonarius