VHDL Programming
42 Chapter Three c <= temp AFTER 6 ns; ELSIF (temp = ‘ 0 ’) THEN c <= temp AFTER 5 ns; ELSE c <= temp AFTER 6 ns; END I ...
Sequential Processing 43 I0 I1 A B Q MUX4 ABQ 00I0 10I1 01I2 11I3 I3 I2 Figure 3-1 Four Input Mux Sym- bol and Function. Let’s l ...
44 Chapter Three q : OUT std_logic); END mux; ARCHITECTURE wrong of mux IS SIGNAL muxval : INTEGER; BEGIN PROCESS ( i0, i1, i2, ...
Sequential Processing 45 is executed, the value of signal muxvalis whatever was last propagated to it. The new value scheduled f ...
46 Chapter Three q <= I1 AFTER 10 ns; WHEN 2 => q <= I2 AFTER 10 ns; WHEN 3 => q <= I3 AFTER 10 ns; WHEN OTHERS = ...
Sequential Processing 47 IF Statements In Appendix A of the VHDL Language Reference Manual, all VHDL con- structs are described ...
48 Chapter Three is no ELSEclause, so no statements are executed in the IFstatement. In- stead, control is transferred to the st ...
Sequential Processing 49 sequence_of_statements sequence_of_statements ::= {sequential_statement} choices ::= choice{| choice} c ...
50 Chapter Three OTHERSclause is executed. It is an error if an OTHERSclause does not ex- ist,and the choices given do not cover ...
Sequential Processing 51 LOOP_parameter_specification ::= identifier IN discrete_range The LOOP statement has an optional label, ...
52 Chapter Three another variable of the same name exists in the process, function, or procedure, then these two variables are t ...
Sequential Processing 53 In this example, the range is specified by the type. By specifying the type as the range, the compiler ...
54 Chapter Three The process statement contains one LOOPstatement. This LOOPstate- ment logically “and”s the bits of arrays aand ...
Sequential Processing 55 Inside this process statement, the value of int_ais always assumed to be a positive value greater than ...
56 Chapter Three If the EXITstatement has an optional WHENcondition, then the EXIT statement only exits the loop if the conditio ...
Sequential Processing 57 Assertions of severity level error are used to alert the designer of con- ditions that will cause the m ...
58 Chapter Three Let’s look at a practical example of an ASSERTstatement to illustrate how it works. The example performs a data ...
Sequential Processing 59 then we know that a rising edge has occurred. Whenever a rising edge occurs on signal clk, we need to c ...
60 Chapter Three WAITstatements can be used for a number of different purposes. The most common use today is for specifying cloc ...
Sequential Processing 61 q <= ‘ 0 ’; ELSIF clock’EVENT AND clock = ‘ 1 ’ THEN q <= d; END IF; WAIT ON reset, clock; END PR ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf