我正在从时钟输入七段显示器,但是现在时钟的输出是整数。我如何将其转换为二进制文件?
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
architecture behav of converter is
signal x : integer;
signal xbin : std_logic_vector(3 downto 0);
begin
xbin <= std_logic_vector(to_unsigned(x, xbin'length));
end behav;