Altera_Forum
Honored Contributor
13 years agoUnique constant per instantiation
Good morning!
Is there a way to generate a constant that is unique per call to the function? I want something like this: architecture ... constant c_myid : std_logic_vector(31 downto 0) := f_generate_unique_id(); end The idea being that each time the component gets instantiated, the value of c_myid is different. I would also settle for a random ID and just hope they don't collide. However, whatever construct I use needs to be synthesizable and portable between vendors. Obviously I would prefer a solution that spits out a sequential counter on each invocation. Is there maybe some built-in function for this? Or some trick I don't see?