我試圖使用「VHDL」編程相當簡單的東西。但我已經堅持了幾個小時,我無法找到一種方法使其工作。VHDL - 與標準觸發器不匹配
我試圖找到一種方法來在不同的過程中使用相同的信號或將它們組合成一個過程。 在不同的過程中使用信號是不可能的,如果我將它們合併到一個過程中,我會收到錯誤「不匹配標準觸發器」。我希望這裏的任何人都能幫助我,並說出我能如何解決這個問題。
示例代碼;
process(scan_ready,rc5_ready)
variable welkescan : std_logic_vector(1 downto 0);
begin
if (scan_ready' event and scan_ready = '0') and not((rc5_ready' event and rc5_ready = '0')) then
welkescan := "01";
visualisatiegebruikt <= "0001";
visualisatiecode <= scan_code;
elsif (rc5_ready' event and rc5_ready = '0') and not((scan_ready' event and scan_ready = '0')) then
welkescan := "10";
visualisatiegebruikt <= "0010";
visualisatiecode <= scan_con;
else
welkescan := "00";
end if;
if ((welkescan = "01" and scan_code = "01110010") or (welkescan = "10" and scan_code = "00100001")) and (pwm_on /= "11111100") then
pwm_on <= pwm_on + 28;
visualisatiepwm <= visualisatiepwm + "0001";
elsif ((welkescan = "01" and scan_code = "01110101") or (welkescan = "10" and scan_code = "00100000")) and (pwm_on /= "00000000") then
pwm_on <= pwm_on - 28;
visualisatiepwm <= visualisatiepwm - "0001";
end if;
end process;
我也試過代碼示例:
process(scan_ready)
begin
if scan_ready' event and scan_ready = '0' then
visualisatie <= "0001"; -- 1 op display => toetsenbord
scanwaarde(3 downto 0) <= scan_code(3 downto 0);
scanwaarde(7 downto 4) <= scan_code(7 downto 4);
if scan_code = "01110010" and pwmaansturen /= "11111100" then
pwmaansturen <= pwmaansturen + 28;
visualisatiepwm <= visualisatie + "0001";
elsif scan_code = "01110101" and pwmaansturen /= "00000000" then
pwmaansturen <= pwmaansturen - 28;
visualisatiepwm <= visualisatie - "0001";
elsif scan_code = "01110100" then
pwmaansturen <= "11111100";
visualisatiepwm <= "1001";
elsif scan_code = "01101011" then
pwmaansturen <= "00000000";
visualisatiepwm <= "0000";
end if;
end if;
end process;
process(rc5_ready)
begin
if rc5_ready' event and rc5_ready = '0' then
visualisatie <= "0010"; -- 2 op display => afstandsbediening
scanwaarde(3 downto 0) <= scan_con(3 downto 0);
scanwaarde(7 downto 4) <= scan_con(7 downto 4);
if scan_con = "00100001" and pwmaansturen /= "11111100" then
pwmaansturen <= pwmaansturen + 28;
visualisatiepwm <= visualisatie + "0001";
elsif scan_con = "00100000" and pwmaansturen /= "00000000" then
pwmaansturen <= pwmaansturen - 28;
visualisatiepwm <= visualisatie - "0001";
elsif scan_con = "00010110" then
pwmaansturen <= "11111100";
visualisatiepwm <= "1001";
elsif scan_con = "00010111" then
pwmaansturen <= "00000000";
visualisatiepwm <= "0000";
end if;
end if;
end process;
我希望有人能幫助我。 問候。
你模擬了你的設計嗎?你使用什麼工具鏈?目標平臺(供應商,fpga設備系列,...)是什麼? – Paebbels
我使用晶格菱形,fpga,不能模擬,因爲我仍然有這個錯誤。 – Mech
你使用哪種模擬類型(行爲,後綜合,郵政地圖,郵寄地點和路線)?行爲模擬不應該知道真正的觸發器類型。 – Paebbels