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

Re: [oc] VHDL code for following condition needed





design a counter to count from 0 to 3 .
add  A*4 to it.

-cheers

On Fri, 14 Jun 2002 rshlp@indiainfo.com wrote:

> 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
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
K.G.Nanda Kumar
Senior Research Engineer
Satellite Communication
Centre for Development Of Telematics
71/1,millers road
Bangalore 560052
ph:2263399 Extn 324

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