[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
PARAMETERS (NUMBER = 11);
CONSTANT WIDTH = CEIL(LOG2(NUMBER));
SUBDESIGN count_n
(
clock :INPUT;
res/ :INPUT = VCC;
ena :INPUT;
q[WIDTH-1..0] :OUTPUT;
)
VARIABLE
cnt[WIDTH-1..0] :DFFE;
BEGIN
cnt[].clk = clock;
cnt[].clrn = res/;
cnt[].ena = ena;
IF (cnt[].q == NUMBER) THEN
cnt[].d = GND;
ELSE
cnt[].d = cnt[].q + 1;
END IF;
q[] = cnt[].q;
END;
E-mail: info@telesys.ru