-- VHDL code position: p282_ex9_23_concurrent_statement_procedure_check -- Note : This is code for explaing concurrent procedure call -- in concurrent_statement of VHDL -- -- See Also: example 9_22, 9_23, 9_24 -- Debug : no debug --------------------------------------------------------------------------------- -- 7 kinds of concurrent statement: -- 1) Concurrent Signal Assigment -- 2) Proces Statement -- 3) Block Statement -- 4) Select Signal Assigment Statement -- 5) Component Instantiations Statement -- 6) Generate Statement -- 7) Concurrent Procedure Calls Statement -- BLOCK Concurrent Statement Syntax: -- -- [ <Label> : ] [ POSTPONED ] <Procedure Name> [ ( <Actual Parameter Part> ) ] ; -- -- -- Notes: -- Label : 语句标号 -- POSTPONED : (后置代码) -- Procedure Name : 过程名称 -- Actual Parameter Part : 实参表 -- PROCEDURE check ( SIGNAL a : IN STD_LOGIC_VECTOR; SIGNAL error : OUT BOOLEAN ) IS VARIABLE found_one : BOOLEAD := FALSE; BEGIN FOR i IN a'RANGE LOOP IF a ( i ) = '1 ' THEN IF found_one THEN error <= TRUE; RETURN; END IF; found_one := TRUE; END IF; END LOOP; error <= NOT foune_one; END PROCEDURE check ;