Using FOR loop in VHDL with a variable

后端 未结 2 1572
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 03:08

Is there any possible way to create a for loop in the form:

for i in 0 to some_var loop
    // blah,blah
end loop;

If not, is there any alt

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-14 03:28

    Only loop parameters with static range are synthesizable.

    You can implement a FSM(finite state machine) if some_var has a discrete range. Then write a specific loop for each state.

提交回复
热议问题