[topgen] Add Module Name When Prefixing Signals

This commit adds the module name into the signal information when
generating top_earlgrey.gen.hjson. This makes it much easier to, for
example, map a PLIC interrupt signal back to the module it
corresponds to, without having to split the signal name again.

Signed-off-by: Sam Elliott <selliott@lowrisc.org>
diff --git a/util/topgen/lib.py b/util/topgen/lib.py
index b33d31f..6ee4fc7 100644
--- a/util/topgen/lib.py
+++ b/util/topgen/lib.py
@@ -117,15 +117,16 @@
     return result
 
 
-def add_prefix_to_signal(signal, prefix):
-    """Add prefix to module signal format { name: "sig_name", width: NN }
+def add_module_prefix_to_signal(signal, module):
+    """Add module prefix to module signal format { name: "sig_name", width: NN }
     """
     result = deepcopy(signal)
 
     if "name" not in signal:
         raise SystemExit("signal {} doesn't have name field".format(signal))
 
-    result["name"] = prefix + "_" + signal["name"]
+    result["name"] = module + "_" + signal["name"]
+    result["module_name"] = module
 
     return result