[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[oc] VHDL code for following condition needed



Hi,

Assume you have a control pin A [Integer], a clk and output CNT.
Now, depending on the value of A, CNT should count from A value.

That is, 
if A = 0, the counter should count from 0 to 3.
if A = 1, the counter should count from 4 to 7.
if A = 5, the counter should count from 20 to 23.
if A = 2, the counter should count from 8 to 11.
... and so on.

Is there any way to write a general code for the above condition.
Thanks in advance.

RV
--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml