[topgen] Remove suffix for mixed port connections

An intermodule signal that connects to an output port and an input on
a module is a mixed port type. These connections produce an internal net
that drives the top-level port, but the requestor module *also* drives
the top-level port (without this change).

Add the "conn_type" attribute to the intermodule signals, so the mixed
connection type is available at the both the port and signal level, and
do not use the "_o" suffix for nets connecting to the requestor module
if the top-level has a mixed connection type.

Signed-off-by: Alexander Williams <awill@google.com>
diff --git a/util/topgen/intermodule.py b/util/topgen/intermodule.py
index e8c6cba..2cbb8f4 100644
--- a/util/topgen/intermodule.py
+++ b/util/topgen/intermodule.py
@@ -494,6 +494,7 @@
             sig["top_signame"] = sig_name
         else:
             conn_type = True
+        sig["conn_type"] = conn_type
 
         if "index" not in sig:
             sig["index"] = -1
@@ -963,16 +964,28 @@
 
     # External signal handling
     if "external" in obj and obj["external"]:
-        pairs = {
-            # act , suffix: additional suffix
-            ("req", "req"): "_o",
-            ("req", "rsp"): "_i",
-            ("rsp", "req"): "_i",
-            ("rsp", "rsp"): "_o",
-            ("req", ""): "_o",
-            ("rcv", ""): "_i",
-            ("none", "io"): "_io"
-        }
+        if obj["conn_type"]:
+            pairs = {
+                # act , suffix: additional suffix
+                ("req", "req"): "",
+                ("req", "rsp"): "_i",
+                ("rsp", "req"): "_i",
+                ("rsp", "rsp"): "",
+                ("req", ""): "",
+                ("rcv", ""): "_i",
+                ("none", "io"): ""
+            }
+        else:
+            pairs = {
+                # act , suffix: additional suffix
+                ("req", "req"): "_o",
+                ("req", "rsp"): "_i",
+                ("rsp", "req"): "_i",
+                ("rsp", "rsp"): "_o",
+                ("req", ""): "_o",
+                ("rcv", ""): "_i",
+                ("none", "io"): "_io"
+            }
         suffix_s += pairs[(obj['act'], suffix)]
 
     return "{top_signame}{suffix}{index}".format(