Forum Discussion
Altera_Forum
Honored Contributor
9 years agoARRAY with a dynamic range
Hi All, I am tying to create an ARRAY dynamic size with range of 1-64 (XXX). (I will use it for creating a dynamic data delay that can be configured) Modelsim compile it with no errors ,...
Altera_Forum
Honored Contributor
9 years agohi,
Array size can be changed through generics to make your design scalable. But you can not create dynamic array which size depends on signal or port value. Here is my suggestion: Create array of length equal to your maximum wanted delay. Generate in series connected registers (input of first register is your wanted to delay signal, input of next register is connected to previous register output and so on). Then use mux to select one of the register outputs. But take in mind that if you are planing to use large array this will require large mux which will give delays trough comb elements in real hardware.