11/*****************************************************************************
2- * Function: Inout Port Short
2+ * Function: Simulation Friendly IO Alias Module
33 * Copyright: Lambda Project Authors. All rights Reserved.
44 * License: MIT (see LICENSE file in Lambda repository)
55 *
66 * Docs:
77 *
8- * Workaround for unsupported tran, alias, and port aliasing in Verilator.
8+ * Instantiates the la_pt inout alias module and adds a loop breaking
9+ * logic for some tools that don's support tran, alias,and port aliasing.
910 *
10- * Useful for making connections between ports without hard coding the
11- * connection in RTL.
11+ * WARNING: The port list alias features is in the verilog standard,
12+ * but not well supported by open source tools. Not recommended for
13+ * portable designs.
1214 *
1315 ****************************************************************************/
1416module la_ioshort (inout a,
@@ -17,16 +19,12 @@ module la_ioshort (inout a,
1719 );
1820
1921`ifdef VERILATOR
20- // Using direction to break the loop
21- assign a = ~ a2b ? b : 1'bz ;
22- assign b = a2b ? a : 1'bz ;
22+ // Using direction to break the loop
23+ assign a = ~ a2b ? b : 1'bz ;
24+ assign b = a2b ? a : 1'bz ;
2325`else
24- // single port pass through short/hack
2526 // verilog_lint: waive-start module-port
26- la_pt la_pt (
27- a,
28- b
29- );
27+ la_pt la_pt (a,b);
3028 // verilog_lint: waive-end module-port
3129`endif
3230
0 commit comments