Produce an LSB-first list of E wire names corresponding to a particular input or output of the original Verilog module.
(esim-vl-find-io basename pat) returns a vl-emodwirelist-p.
The
Example. If your Verilog module is something like:
module mymodule (o, a, b); input [3:0] a; input b; ... endmodule
Then the resulting
:i ((a[0] a[1] a[2] a[3]) (b))
And here are some examples of using
(esim-vl-find-io "a" (gpl :i |*mymodule*|)) --> (a[0] a[1] a[2] a[3]) (esim-vl-find-io "b" (gpl :i |*mymodule*|)) --> (b) (esim-vl-find-io "c" (gpl :i |*mymodule*|)) --> NIL
On success the list of returned bits is non-empty. The least significant
bit comes first.
If
Function:
(defun esim-vl-find-io (basename pat) (declare (xargs :guard (stringp basename))) (if (esim-vl-iopattern-p pat) (esim-vl-find-io-main basename pat) (er hard? 'esim-vl-find-io "This doesn't look like a valid I/O pattern for a VL-translated ~ module: ~x0" pat)))
Theorem:
(defthm vl-emodwirelist-p-of-esim-vl-find-io (vl-emodwirelist-p (esim-vl-find-io basename pat)))
Theorem:
(defthm true-listp-of-esim-vl-find-io (true-listp (esim-vl-find-io basename pat)) :rule-classes :type-prescription)