0

関連リストで unsigned の下位ビットを std_logic_vector に変換する次のコードがあります。コンパイルして、GHDL を使用してシミュレーションを実行できます。しかし、出力波形には、不明なビットはinner_counterありませんが、不明な ('U') ビットがいくつかありcounterます。(波形イメージはコードに従っています。) と のビットには値を保存する必要があるinner_counterと思います。counterこれが予想される動作または GHDL のバグであることを知っている人はいますか?

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity test_bench is
end test_bench;

architecture default of test_bench is
  signal clk : std_logic := '0';
  signal counter : unsigned(7 downto 0) := (others => '0');

  component inner
    port (
    clk : in std_logic;
    inner_counter : in std_logic_vector(6 downto 0));
  end component;

begin

  i0 : inner port map (
  clk => clk,
  inner_counter => std_logic_vector(counter(6 downto 0)));

  process
  begin
    clk <= '1';
    wait for 1 ns;
    clk <= '0';
    wait for 1 ns;
  end process;

  process(clk)
  begin
    if rising_edge(clk) then
      counter <= counter + 1;
    end if;
  end process;

end default;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity inner is
  port (
  clk : in std_logic;
 inner_counter : in std_logic_vector(6 downto 0));
end inner;

architecture default of inner is
begin
  --do something
end architecture;

counterとの波形イメージinner_counter

4

0 に答える 0