[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  Schedule::Load
  SVN::S4
  Synopsys-modes
  SystemPerl
  Verilog-Pli
  Voneline
  Vregs
General Info
  Papers

Issue #324

verilog-mode constraint indentation is not correct

Added by Eric Mastromarchi over 1 year ago. Updated over 1 year ago.

Status:Assigned Start date:02/03/2011
Priority:Normal Due date:
Assignee:Michael McNamara % Done:

0%

Category:Indents
Target version:-

Description

The constraint indentation for SV is not correct for verilog-mode version 648 to 662. Here is an example:

class myclass; 
   constraint c {
                 foreach (items[i]) {
                                     if (write) {
      items[i].op_code == WRITE;
   } else if (read) {
      items[i].op_code == READ;      
   }
                                     }
                 }
endclass

Matching C, I would have expected:

class myclass; 
   constraint c {
     foreach (items[i]) {
       if (write) {
         items[i].op_code == WRITE;
       } else if (read) {
         items[i].op_code == READ;      
       }
     }
   }
endclass

Or, I could see producing something like the below... since some people prefer the code to line up with the {}

class myclass; 
   constraint c {
                 foreach (items[i]) {
                                     if (write) {
                                                 items[i].op_code == WRITE;
                                                } else if (read) {
                                                 items[i].op_code == READ;      
                                                }
                                     }
                 }
endclass

If I don't like the previous output lining up with {}, I can place the {}'s on their own line... but I get this:

class myclass; 
   constraint c 
     {
      foreach (items[i]) 
      {
       if (write) 
       {
      items[i].op_code == WRITE;
   } 
       else if (read) 
       {
      items[i].op_code == READ;      
   }
       }
      }
endclass

History

Updated by Wilson Snyder over 1 year ago

  • Category set to Indents
  • Status changed from New to Assigned
  • Assignee set to Michael McNamara

Also available in: Atom