lastscan19 (2)

lastscan19 (2)



LICZNIK


PRZYKŁADY LICZNIKÓW 1

ENT3TY counter IS

PORT (d: IN BIT VECTOR (3 DOWNTO 0); q: OUT INTEGER RANGĘ 0 TO 4) ;

END counter,

ENT1TY coaatcrt IS

PORT (d: IN INTEGER RANGĘ 0 TO 255;

clk, elear, ld, enable, updown: IN BIT; qa, qb, qc, qd, qe, qf: OUT INTEGER RANGĘ OTO 255);

END conntcra;

ARCHITECTURE archi OF courter IS BEGIN

PROCESS (d)

VAR1ABLE n: INTEGER; BEGIN

n 0;

ARCHITECTURE arch OF countere IS BEGIN

— An eaable eona ter

FOR i IN d’RANGE LOOP IF d(i) = ‘1’ THEN n = n+ 1;

END IF;

END LOOP;

PROCESS (clk)

VARIABLE cal: INTEGER RANGĘ 0 TO 255; BEGIN

, IF (clk’EVENT AND clk = ‘1’) THEN H0£j) IFenable = ‘1’ THEN ^ ent ent + 1;

q <= n;

END PROCESS;

END IF; END IF;

END archi;

qa <= ent; END PROCESS;

PRZYKŁADY LICZNIKÓW 2

PRZYKŁADY LICZNIKÓW 3

— A synchrOBOBS load coanter

— A synebronotts elear coanter

PROCESS (clk)

VARIABLE cat: INTEGER RANGĘ 0 TO 255; BEGIN

IF (clk’EVENT AND clk = ‘ł’) THEN

™c=Dt‘°™ L°W

ELSE

ent := ent + 1;

END IF;

END IF;

PROCESS (clk)

VARIABLE cat: INTEGER RANGĘ 0 TO 255; BEGIN

IF (dk’EVENT AND clk = ‘1’) THEN IF elear = ‘0’ THEN

ent := 0;

ELSE

ent := ent + 1;

ENDIF';

ENDIF;

qb <= ent; END PROCESS;

qd <= ent; END PROCESS;

— An ap_down co aster

— A synchronons load elear coanter

PROCESS (clk)

VARIABLE cat: INTEGER RANGĘ 0 TO 255; VARIABLE directioa: INTEGER;

BEGIN

fF (up_down = ‘1’) TTfEN dircction r= 1;

ELSE

directioa r= -1;

ENDIF;

PROCESS (clk)

BEGIN

IF (clk’EVENT AND clk = ‘1) THEN IF dear = 'O5 THEN

ent := 0;

ELSE

IF ld = ‘0’ THEN ent := d;

ELSE

ent := ent + 1;

j IF (clkłEVENT AND clk * ‘1’) THEN cat cat + dbrectioa;

END IF;

ENDIF; END IF;

qc <= cat; END PROCESS;

qc < : ent; END PROCESS;

3 4

\


Wyszukiwarka

Podobne podstrony:
MG 66 Tryby portu library ieee; use ieee.std_logic_1164.all; a entity port_mode is port( a, b : in
lastscan17 Dolomite Dolomilc, CaMg(C03)2, is present in many scdimentary carbonaic rocks, usual-ly r
Image265 Liczniki nastawne mogą być zastosowane m.in.: —    jako dzielniki częstotliw
Wydarzenia licznie zgromadzonych gości, znaleźli się m.in. prorektorzy Urszula Bobryk i Ryszard Dębi
lastscan13 Ooid Grainstone Ooids often exhibit a radial structure as well as concentric laminations.
Tabela 4: Funkcje licznika LPM Counter aclr clk_ Wejścia clock at- updown
Tabela 4: Funkcje licznika LPM Counter aclr clk_ Wejścia clock at- updown
front Search Log Component^S&ffCHlOG Component Search Log is avaiiaoie in the fonowwg verswns fo
image004 SOMETIMES YOU HAVE TO FIGHT FIRE WITH FIRE. THE YEAR IS 2032. AND SOMETIMES IS NOW. In 1996
00214 5151d685820d3809856989a212338cd 216 Baxley Introduction The usual assumption underlying stati
00435 ?638d50a938c7a2f85d18a38dd8caa3 440Russell c) the iterates exhibit sensitive dependence on in

więcej podobnych podstron