File: indent_coverpoint.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 (29 lines) | stat: -rw-r--r-- 813 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

// here is the same code with verilog-mode indenting
// covergroup example from IEEE pg. 317
covergroup cg @(posedge clk);
   a: coverpoint v_a {
      bins a1 = { [0:63] };
      bins a2 = { [64:127] };
      bins a3 = { [128:191] };
      bins a4 = { [192:255] };
   }
   b: coverpoint v_b iff ( g )
     {
      bins b1 = {0};
      bins b2 = { [1:84] };
      bins b3 = { [85:169] };
      bins b4 = { [170:255] };
   }
   c: coverpoint v_c iff ( !g ) {
      bins c1 = {0};
      bins c2 = { [1:84] };
      bins c3 = { [85:169] };
      bins c4 = { [170:255] };
   }
   d: cross a , b, c {
      bins c1 = ! binsof(a) intersect {[100:200]}; // 4 cross products
      bins c2 = binsof(a.a2) || binsof(b.b2); // 7 cross products
      bins c3 = binsof(a.a1) && binsof(b.b4); // 1 cross product
   }
endgroup