我有以下代碼:我不明白這個VHDL代碼有什麼問題嗎?
entity wave_select is
port(address:in std_logic_vector(6 downto 0);
ws1: in std_logic;
ws0: in std_logic;
wave_out: out std_logic_vector(6 downto 0));
end wave_select;
architecture choose_arch of wave_select is
signal internal_sine:std_logic_vector(6 downto 0);
signal internal_tri:std_logic_vector(6 downto 0);
signal internal_sqr:std_logic_vector(6 downto 0);
begin
U0: entity sine_tbl port map(addr=>address, sine_val=>internal_sine);
U1: entity triangle_tbl port map(addr=>address, tri_val=>internal_tri);
U2: entity square_tbl port map(addr=>address, square_val=>internal_sqr);
process (std_logic_vector'(ws1, ws0))
begin
case ws_combo is
when "01" => wave_out<=internal_sine;
when "10" => wave_out<=internal_tri;
when "11" => wave_out<=internal_sqr;
when others =>wave_out<=(others => '-');
end case;
end process;
end choose_arch;`
每當我嘗試編譯,我得到以下錯誤:
- 標識符/關鍵字預期(用於加工線)
- 關鍵字預計年底(用於「10」行時)
- 預期設計單位聲明(與關鍵字錯誤相同的行)
修復了這個問題
下次考慮使用更具描述性的標題。 – simon 2013-04-25 06:21:58