ISim のコンソール ウィンドウで特定の時間に CLK 信号の値を返そうとしています (以下のコードでは 7.5ns)。次のエラーが表示されます。
ERROR:HDLCompiler:258 - "saved project.." 行 91: タイプ std_logic をタイプ unsigned に変換できません
この変換 ( integer'image(to_integer(unsigned((generic_signal)))); ) をstd_logic_vectorsで使用しましたが、うまくいきましたが、これはうまくいきません。CLK 値は 0 または 1 です。特定の時間にその値を返したいだけです。これを行うより効率的な方法を知っていますか?' image
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-----------------------------------------------------------
-- Component Declaration for the Unit Under Test
-----------------------------------------------------------
component SyncPosEdge port(
SYS_CLK : in std_logic;
InputSignal : in std_logic;
SyncOutputSignal : out std_logic);
end component;
-----------------------------------------------------------
-- Inputs
-----------------------------------------------------------
signal SYS_CLK : std_logic := '0';
signal InputSignal : std_logic := '0';
-----------------------------------------------------------
-- Outputs
-----------------------------------------------------------
signal SyncOutputSignal : std_logic;
-----------------------------------------------------------
-- Clock period definitions
-----------------------------------------------------------
constant SYS_CLK_period : time := 5 ns;
constant InputPeriod : time := 15 ns;
begin
-----------------------------------------------------------
-- Instantiate the Unit Under Test
-----------------------------------------------------------
uut:SyncPosEdge port map(
SYS_CLK => SYS_CLK,
InputSignal => InputSignal,
SyncOutputSignal => SyncOutputSignal);
-----------------------------------------------------------
-- Clock process definitions
-----------------------------------------------------------
SYS_CLK_process:process
begin
SYS_CLK <= '0';
wait for SYS_CLK_period / 2;
SYS_CLK <= '1';
wait for SYS_CLK_period / 2;
end process SYS_CLK_process;
-----------------------------------------------------------
-- Generate Input Signal
-----------------------------------------------------------
InputGen:process
begin
InputSignal <= '0';
wait for InputPeriod / 2;
InputSignal <= '1';
wait for InputPeriod / 2;
end process;
-----------------------------------------------------------
-- Stimulus process
-----------------------------------------------------------
stim_proc:process
begin
wait for 7.5 ns;
report "SYS_CLK: " & integer'image(to_integer(unsigned((SYS_CLK))));
wait;
end process stim_proc;