请参阅xilinx中的模拟输出而不是数字输出

时间:2017-08-11 03:00:59

标签: vhdl xilinx

我正在使用此网站的代码code

entity triangular is
port (clk : in std_logic; 
  wave_out : out std_logic_vector(7 downto 0);
  reset :in std_logic
 );
end triangular;

architecture Behavioral of triangular is

signal count,count2 : integer := 0;
signal direction : std_logic := '0';

begin

process(clk,reset)
begin
if(reset = '1') then
count <= 0;
count2 <= 129;
elsif(rising_edge(clk)) then
--"direction" signal determines the direction of counting - up or down
if(count = 253) then
    count <= 0;
    if(direction = '0') then
        direction <= '1';
        count2 <= 126;
    else
        direction <= '0';
        count2 <= 129;
    end if; 
 else
    count <= count + 1;
 end if;
 if(direction = '0') then
    if(count2 = 255) then
        count2 <= 0;
    else
        count2 <= count2 + 1; --up counts from 129 to 255 and then 0 to 127
    end if;
else
    if(count2 = 255) then
        count2 <= 0;
    else
        count2 <= count2 - 1; --down counts from 126 to 0 and then 255 to 128
    end if;
end if;

end if;
end process;

wave_out <= conv_std_logic_vector(count2,8);

end Behavioral;

我正在以数字格式输出,但我希望得到网站链接中给出的输出。我怎样才能做到这一点?我是VHDL的新手,作为任务工作。

output image
(点击放大)

1 个答案:

答案 0 :(得分:0)

在Xilinx ISE模拟器模拟结果中,只能使用数字值代替ISim,您可以使用ModelSim模拟器 在那个ModelSim模拟器模拟数据选项可用 在Vivado模拟器中还有模拟数据视图选项