Altera_Forum
Honored Contributor
13 years agoInteger problem....
Hello.
I made the code below and that is working well. But when I test the code in Model_sim.... I don't know how to increase the input 1 by 1 like 0, 1, 2, 3, 4.... 15.. how can i make the inputs increase 1 by 1 in model_sim? I want to know the way!! LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY adder_integer is PORT( cin : in integer range 0 to 1; astring : in integer range 0 to 15; bstring : in integer range 0 to 15; sum_string : out integer range 0 to 31); end adder_integer; architecture arc of adder_integer is begin sum_string<= astring + bstring + cin; end arc;