Altera_Forum
Honored Contributor
14 years agoproblems with inputs vs. constants
Hi all,
I am having problems using Input ports to control a function in VHDL. I think it may be a synthesis problem, but I am not sure. I could just not be understanding something or doing something stupid. In this case I have inputs to a state machine which iterates a signal a number of time based on the values. When the "constant" values are applied, the SM works fine. When the values are from the input ports it crashes. Here is the code. They are both std_logic_vectors of the same length. Anyone have any idea what's going on? Thanks. Entity TIMING_GEN is generic ( constant A : std_logic_vector(15 downto 0) := x"0144; constant B : std_logic_vector(15 downto 0) := x"0148"; ); port ( XValue : in std_logic_vector(15 downto 0):= x"0144"; YValue : in std_logic_vector(15 downto 0):= x"0148"; RENA : in std_logic_vector; ); End entity; architecture rtl of TIMING_GEN is signal rows, columns : std_logic_vector(15 downto 0); begin if RENA = '1' then rows <= XValue; columns <= YValue; else rows <= A; columns <= B; end if; after this there is a state machine which does some loops based on these values..