何をすべきかを知らないが、それはVHDLエラー10344は、私がセット&負荷Dフリップフロップコード(同期)を作成しようとしています
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity syn is
port (
clk : in std_logic;
rst_n : in std_logic;
d : in std_logic;
ld : in std_logic;
q : out std_logic_vector(7 downto 0);
co : out std_logic);
end syn;
architecture rtl of syn is
signal count : std_logic_vector(8 downto 0);
begin
co <= count(8);
q <= count(7 downto 0);
process (clk)
begin
if (clk'event and clk = '1') then
if (rst_n = '0') then
count <= (others => '0'); -- sync reset
elsif (ld = '1') then
count <= '0' & d; -- sync load
else
count <= count + 1; -- sync increment
end if;
end if;
end process;
end rtl;
エラーメッセージは、何が間違っているかを示します。この場合、非常に正確です。 –
集合体。 count(0)はdに割り当てられ、他のもの(8downto1)には '0'が割り当てられる。さもなければあなたの意図は明確ではありません。 2つのインデックスポジションだけをロードしようとしていますか? – user1155120