Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi Email: amgh@mehr.sharif.edu
Concurrent Statements Concurrent Signal Assignment Component Instantiation Statement Generate Statement Process Statement Block Statement Concurrent Procedure Call Statement Concurrent Assert Statement
Sequential Statements Signal Assignment Statement Variable Assignment Statement IF Statement Case Statement Loop Statement Wait Statement Procedure Call Statement
Sequential Statements (cont.) Next Statement Exit Statement Return Statement Assertion Statement Report Statement Null Statement
Block Statement block_label: BLOCK [ (guard_expression) ] [ IS ] block_header block_declarative_part BEGIN block_statement_part END BLOCK [ block_label ] ;
D-FF Example ARCHITECTURE guarding OF d_ff IS BEGIN dff_blk: BLOCK (c = ‘1’ AND NOT c’STABLE) q <= GUARDED d; END BLOCK; END guarding;
D-FF with block header ARCHITECTURE guarding_h OF d_ff IS BEGIN dff_blk: BLOCK (c = ‘1’ AND NOT c’STABLE) PORT(din: IN BIT; qout: OUT BIT); PORT MAP (din => d; qo => q); qout <= GUARDED din; END BLOCK; END guarding_h;
D-FF with enable ARCHITECTURE nested_guard OF d_ff_e IS BEGIN edge: BLOCK (c = ‘1’ AND NOT c’STABLE) enable: BLOCK (e = ‘1’ AND GUARD) q <= GUARDED d; END BLOCK; END nested_guard;
Resolution Function FUNCTION anding (drivers: IN BIT_VECTOR) RETURN BIT IS VARIABLE acc: BIT := ‘1’; BEGIN FOR I IN drivers’RANGE LOOP acc := acc AND drivers(i); END LOOP; RETURN acc; END anding; … SIGNAL a: anding BIT; a <= b; a <= c; a <= d;
Configuration CONFIGURATION identifier OF entity_name IS { use_clause } FOR architecture_name { block_configuration } END FOR ; END CONFIGURATION; block_configuration ::= FOR block_specification { configuration_item }
Configuration (cont.) configuration_item ::= block_configuration | component_configuration component_configuration ::= FOR component_specification [ binding_indication ; ] [ block_configuration ] END FOR ;
Configuration Example CONFIGURATION default_c OF test_comp4 IS FOR customizable FOR a1: comp4 USE ENTITY WORK.nc4(flexible); FOR c0, c3: comp1 USE ENTITY WORK.bc1(fixed);END FOR; FOR c2to3: comp1 USE ENTITY WORK.bc1(fixed); END FOR; FOR flexible END FOR;