From: Eddie Hung Date: Thu, 5 Sep 2019 18:55:14 +0000 (-0700) Subject: Use filter instead of index; support wide enable muxes X-Git-Tag: working-ls180~1039^2~196 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7bd55f379ca3bf8f79c290e9851d14b20c1f5c28;p=yosys.git Use filter instead of index; support wide enable muxes --- diff --git a/passes/pmgen/xilinx_dsp.pmg b/passes/pmgen/xilinx_dsp.pmg index d7632da6f..cee1906d6 100644 --- a/passes/pmgen/xilinx_dsp.pmg +++ b/passes/pmgen/xilinx_dsp.pmg @@ -66,9 +66,11 @@ endcode match ffAmux if ffA select ffAmux->type.in($mux) + filter GetSize(port(ffAmux, \Y)) >= GetSize(sigA) + slice offset GetSize(port(ffAmux, \Y)) + filter offset+GetSize(sigA) <= GetSize(port(ffAmux, \Y)) && port(ffAmux, \Y).extract(offset, GetSize(sigA)) == sigA choice AB {\A, \B} - index port(ffAmux, \Y) === sigA - index port(ffAmux, AB) === sigffAmux + filter offset+GetSize(sigffAmux) <= GetSize(port(ffAmux, \Y)) && port(ffAmux, AB).extract(offset, GetSize(sigffAmux)) == sigffAmux set ffAmuxAB AB semioptional endmatch @@ -105,9 +107,11 @@ endcode match ffBmux if ffB select ffBmux->type.in($mux) + filter GetSize(port(ffBmux, \Y)) >= GetSize(sigB) + slice offset GetSize(port(ffBmux, \Y)) + filter offset+GetSize(sigB) <= GetSize(port(ffBmux, \Y)) && port(ffBmux, \Y).extract(offset, GetSize(sigB)) == sigB choice AB {\A, \B} - index port(ffBmux, \Y) === sigB - index port(ffBmux, AB) === sigffBmux + filter offset+GetSize(sigffBmux) <= GetSize(port(ffBmux, \Y)) && port(ffBmux, AB).extract(offset, GetSize(sigffBmux)) == sigffBmux set ffBmuxAB AB semioptional endmatch