खोज…
परिचय
कोई भी सभ्य प्रोग्रामिंग भाषा टिप्पणियों का समर्थन करती है। VHDL में वे विशेष रूप से महत्वपूर्ण हैं क्योंकि VHDL कोड को समझना, यहां तक कि मध्यम रूप से परिष्कृत, अक्सर चुनौतीपूर्ण होता है।
एकल पंक्ति टिप्पणियाँ
एक एकल पंक्ति टिप्पणी दो हाइफ़न ( --
) से शुरू होती है और लाइन के अंत तक फैली हुई है। उदाहरण :
-- This process models the state register
process(clock, aresetn)
begin
if aresetn = '0' then -- Active low, asynchronous reset
state <= IDLE;
elsif rising_edge(clock) then -- Synchronized on the rising edge of the clock
state <= next_state;
end if;
end process;
डिलीट की गई टिप्पणियाँ
VHDL 2008 के साथ शुरू, एक टिप्पणी भी कई लाइनों पर विस्तार कर सकती है। मल्टी-लाइन्स टिप्पणियां /*
शुरू होती हैं और */
साथ समाप्त होती हैं। उदाहरण :
/* This process models the state register.
It has an active low, asynchronous reset
and is synchronized on the rising edge
of the clock. */
process(clock, aresetn)
begin
if aresetn = '0' then
state <= IDLE;
elsif rising_edge(clock) then
state <= next_state;
end if;
end process;
विलंबित टिप्पणियों का उपयोग एक पंक्ति से कम पर भी किया जा सकता है:
-- Finally, we decided to skip the reset...
process(clock/*, aresetn*/)
begin
/*if aresetn = '0' then
state <= IDLE;
els*/if rising_edge(clock) then
state <= next_state;
end if;
end process;
नेस्टेड टिप्पणियाँ
एक टिप्पणी (सिंगल लाइन या सीमांकित) के अंदर एक नई टिप्पणी (एकल पंक्ति या सीमांकित) शुरू करने का कोई प्रभाव नहीं होता है और इसे अनदेखा किया जाता है। उदाहरण:
-- This is a single-line comment. This second -- has no special meaning.
-- This is a single-line comment. This /* has no special meaning.
/* This is not a
single-line comment.
And this -- has no
special meaning. */
/* This is not a
single-line comment.
And this second /* has no
special meaning. */
Modified text is an extract of the original Stack Overflow Documentation
के तहत लाइसेंस प्राप्त है CC BY-SA 3.0
से संबद्ध नहीं है Stack Overflow