MethoCourseTp2: accu.vbe
File accu.vbe, 377 bytes (added by , 18 years ago) |
---|
Line | |
---|---|
1 | -- Registre accumulateur 4 bits |
2 | |
3 | ENTITY accu IS |
4 | PORT ( |
5 | ck : IN BIT; |
6 | i : IN BIT_VECTOR(3 DOWNTO 0); |
7 | q : OUT BIT_VECTOR(3 DOWNTO 0); |
8 | vdd : IN BIT; |
9 | vss : IN BIT); |
10 | END accu; |
11 | |
12 | ARCHITECTURE vbe OF accu IS |
13 | |
14 | SIGNAL x : REG_VECTOR(3 DOWNTO 0) REGISTER; |
15 | |
16 | BEGIN |
17 | |
18 | q <= x; |
19 | |
20 | label0 : BLOCK(ck='1' AND NOT ck 'STABLE) |
21 | BEGIN |
22 | x <= GUARDED i; |
23 | END BLOCK; |
24 | |
25 | END vbe; |