VHDL Questions and Answers – Signal Kind Attributes

This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “Signal Kind Attributes”.

1. What is the basic use of signal kind attributes?
a) To check any event on signals
b) To check if a function is called
c) To check if a signal is IN or OUT mode
d) To check a clock signal
View Answer

Answer: a
Explanation: Signal kind attributes can provide information about any signals. These attributes can be used to report whether a signal has changed its value, what was the last value and after what time the signal changed, etc.

2. Which of the following returns the Boolean type always?
a) ‘LAST_VALUE
b) ‘LAST_EVENT
c) ‘EVENT
d) ‘STABLE
View Answer

Answer: c
Explanation: ‘EVENT is an attribute which returns a Boolean value always. It returns true if any transition has taken place on the given signal during the current delta. Otherwise, it returns false. It always takes a signal as its object and detects any change on the value.

3. Signal kind attributes can’t have variables as their objects.
a) True
b) False
View Answer

Answer: a
Explanation: Signal kind attributes are called so because they provide information about any signal. Unlike value kind and function kind in which variables can be used objects with attributes, it is not possible to use any data object with signal kind attributes except signals.
advertisement
advertisement

4. Refer to the statement given below, it is used for detecting _________

IF (clk’EVENT and clk =0)

a) Rising edge of the clock signal
b) Falling edge of the clock signal
c) Clock signal frequency
d) Time period of clock signal
View Answer

Answer: b
Explanation: As described earlier, ‘EVENT will detect any change on the clock signal. This attribute is here used in conjunction with a condition that clock signal should be zero. So, the statement is used to detect the trailing or falling edge of the clock signal.

5. s’ACTIVE will return true if _________
a) Any transition from 0 to 1 on signal s during the current delta
b) Any transition from 1 to 0 on signal s during the current delta
c) Any change has occurred on the signal s during last 2 delta’s
d) Any change has occurred on the signal s during the current delta
View Answer

Answer: d
Explanation: s’ACTIVE is an attribute which always returns the Boolean value always. It returns true if the signal is active during the current delta. It means the value will be true if any change has occurred on the signal during the current delta. Otherwise, it returns false.
advertisement

6. Attribute s‘LAST_EVENT has a return value of ______ type.
a) BOOLEAN
b) TIME
c) INTEGER
d) Same as signal s type
View Answer

Answer: b
Explanation: s’LAST_EVENT is an attribute which returns the time elapsed since the previous event occurred on the signals. This attribute is very useful for implementing timing checks like pulse width check, hold check etc.

7. What is the type of value returned by the s’DELAYED(time) attribute?
a) TIME
b) BOOLEAN
c) INTEGER
d) Same as signal s
View Answer

Answer: d
Explanation: s’DELAYED attribute is used to create a delayed version of same signal, delayed by an amount specified in the argument. It creates the signal delayed by ‘time’ value. So, the return type will be same as that of signals.
advertisement

8. Which of the following statement is correct to check the violation of hold time?
a) IF(clk’DELAYED(hold_time)’EVENT) THEN
b) IF(clk’DELAYED(hold_time) = ‘1’) THEN
c) IF(clk’DELAYED(hold_time) = ‘0’) THEN
d) IF(clk’DELAYED(hold_time) = ‘1’ AND clk’DELAYED(hold_time)’EVENT) THEN
View Answer

Answer: d
Explanation: The signal is created by ‘DELAYED attribute which is delayed by hold time and then it must be used in conjunction with the ‘EVENT attribute to check any event on the signal generated. By doing this, one may check the hold time.

9. The attribute s’TRANSACTION creates a signal of type ______
a) BOOLEAN
b) BIT
c) INTEGER
d) Same as signal s
View Answer

Answer: b
Explanation: s’TRANSACTION creates a signal of time BIT that toggles its value for every transaction of the signal it is attachted to. Whenever there is some change in signal s, the value of BIT signal is toogled either from 1 to 0 or from 0 to 1.

10. What is the use of s’TRANSACTION attribute?
a) Check the continuity
b) Check the hold time
c) Interrupt handling by using WAIT
d) Create a square wave
View Answer

Answer: c
Explanation: The ‘TRANSACTION attribute is generally used with the WAIT statement to handle the interrupts. Without ‘TRANSACTION attribute, the WAIT statement is sensitive to the events only, but with ‘TRANSACTION it can be activated on every transaction on the BIT signal output of attribute.

Sanfoundry Global Education & Learning Series – VHDL.

To practice all areas of VHDL, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.