What does this do ?

Hi,

Can anyone tell me what this bit of code is doing ?

-- declarations

------------------------------------------------------------------------------------------- signal phase : std_logic_vector(6 downto 0);

type INTEGER_ARRAY is array ( natural range ) of integer;

constant NUMERATOR : INTEGER_ARRAY(7 downto 0) := (7,30,7,7, 30, 30,

30,30);

variable phase_next : std_logic_vector(6 downto 0);

--------------------------------------------------------------------------------------------

-- **** problem code **********

phase_next := phase + NUMERATOR(conv_integer(std));

Obviously the conv_integer(std) part of the code is being used to access the array NUMERATOR but I don't understand exactly how since no number value is being specified to key into the array ie. what is the value of 'std' that is being converted to an integer by the function 'conv_integer' ?

Thanks

Reply to
iqbalmuh
Loading thread data ...

snipped-for-privacy@hotmail.co.uk schrieb:

-------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------

Hi, just two guesses:

1.) there's a port named std in the entity. 2.) your code snippet is just wrong in that line (copy & paste error or uncompleted template)

Have a nice synthesis Eilert

Reply to
backhus

Hi,

The "std" can also be a constant defined somewhere in the design file or in "a package", also be careful about it too.

Regards,

Enes

Reply to
kays_f

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.