summaryrefslogtreecommitdiff
blob: 6ed2cfff4c0c48186c8d4903048fca36e3ec867f (plain)
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
(tag_existing
   (
      (pt port CNE_01100_BAD_NAME)
   )
   (exists pt2 port
      (and
;; Goes into infinity:
;;       (has_mode pt2 _)
;;       (has_mode pt2 "in")
;; Fixes all:
         (eq pt2 pt)
         (not
            (or
               (and
                  (string_matches [identifier pt] "^i_.*")
                  (has_mode pt "in")
               )
               (and
                  (string_matches [identifier pt] "^o_.*")
                  (has_mode pt "out")
               )
               (and
                  (string_matches [identifier pt] "^b_.*")
                  (has_mode pt "inout")
               )
            )
         )
      )
   )
)