File: indent_always_decl.v

package info (click to toggle)
verilog-mode 20161124.fd230e6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,764 kB
  • ctags: 5,143
  • sloc: lisp: 12,430; perl: 293; makefile: 146; sh: 35; fortran: 2
file content (34 lines) | stat: -rw-r--r-- 1,000 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module foo ();
   // Before the always block,
   // indents to here: (which I like)
   //          V
   wire [10:0] mux_output0 =
               select0[0] ? mux_input0 :
               select0[1] ? mux_input1 :
               select0[2] ? mux_input2 :
               select0[3] ? mux_input3 :
               select0[4] ? mux_input4 :
               select0[5] ? mux_input5 :
               select0[6] ? mux_input6 :
               mux_input7;
   
   reg 	       foobar;
   always @(posedge clk)
     if (reset_n) begin
        foobar <= 1'b0;
     end
   
   // After the always block,
   // indents to here:
   //                       V
   wire [10:0] mux_output1 =
               select1[0] ? mux_input8 :
               select1[1] ? mux_input9 :
               select1[2] ? mux_input10 :
               select1[3] ? mux_input11 :
               select1[4] ? mux_input12 :
               select1[5] ? mux_input13 :
               select1[6] ? mux_input14 :
               mux_input15;
endmodule