Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Comment block in ModelSim?

Altera_Forum
Honored Contributor II
4,812 Views

Hi  

 

Is there a way to comment out a section in a .do file in modelsim? I can comment out a line using "#" but was wondering what is the syntax for commenting out a section (/*........ */ in C) 

 

Thanks
6 Replies
Altera_Forum
Honored Contributor II
2,333 Views

What HDL? Verilog supports blocks using /* */, or line by line using //. VHDL uses -- for each line. Modelsim may let you select a bunch of text and insert --'s, but it's been awhile since I've used it.

Altera_Forum
Honored Contributor II
2,333 Views

This is for a .do file (not a vhdl or verilog file) 

 

Thanks
Altera_Forum
Honored Contributor II
2,333 Views

Use a condition that is always false  

 

if {0} { # code that never gets executed }  

 

Cheers, 

Dave
Altera_Forum
Honored Contributor II
2,333 Views

Thanks Dave for your reply however its not quite what I wanted. I wanted to put in several lines of comments for instruction to me for when I open it again months later and have forgotten what I was doing :confused: . Its just a pain to manually add "#" to each line! 

 

 

 

 

--- Quote Start ---  

Use a condition that is always false  

 

if {0} { # code that never gets executed }  

 

Cheers, 

Dave 

--- Quote End ---  

Altera_Forum
Honored Contributor II
2,333 Views

its not really that much of a bother is it? 

Just write the words, then use a good text editor with column edit to add in all the#
Altera_Forum
Honored Contributor II
2,333 Views

Yeah I guess. I just thought I was missing something and there was an easy way to do it. I guess not

Reply