generic

Feb 23, 2005 1 Replies

Hi



I want to make my design generic but I got a problem I have a kinf of counter and i want it generic in fonction of the reset value of the counter ex:



signal cpt : std_logic_vector(A downto 0);



if ( unsigned(cpt) = B) then cpt '0'); else cpt


Yes you can make it generic, assuming that B is a constant

I have removed A, and changed B and cpt to naturals. When this i

synthesized, the synthesizer will change this to an n-bit counter where n is log2(B)

generi

B : natura )

..

signal cpt : natural range 0 to B

if (cpt = B) the

cpt

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required