13.07.2015 Views

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Combinatorial PartsN-Input One-hot Multiplexer (omux)N-Input One-hot Multiplexer (omux)This part selects one of the input data ports (din0 to dinN) and passes it to theoutput port dout.The default part has two inputs din0 and din1 and sel is 2-bits wide.However, you can resize the component instance to implement parts withfour, eight (or any other multiple of two) input ports with a correspondingwidth sel port.The selection is based on the value of the N-bit wide input port sel and one ofthe two select modes controlled by the enumerated parameter sel_priority(Enabled, Disabled) associated with this port.In priority disabled mode, the scalar output port selerror will be assertedwhen the data on the port sel is not in one-hot encoded format. The polarityof selerror is controlled by the enumerated parameter selerror_type(ActiveHigh, ActiveLow).The parameter selerror_type has no effect in priority enabled mode andselerror is ignored.If only one of dout and selerror is connected, the HDL code for theunconnected port is optimized away.FunctionIf sel_priority = enabled:dout= din(i)= 'X…' (all bits are X)If sel_priority = disabled and selerror_type = ActiveHigh:if sel(i) = 1 and i = minimum(0,1, .. N-1)otherwiseselerror = 'X' always (irrespective of selerror_type)dout = din(i)= 'X…' (all bits are X)selerror = 0= 1if sel(i) = 1 and sel(j) = 0 for every j ≠ iOtherwiseif sel(i) = 1 and sel(j) = 0 for every j ≠ iOtherwiseIf sel_priority = disabled and selerror_type = ActiveLow:dout = din(i)= 'X... ' (all bits are X)selerror = 1= 0if sel(i) = 1 and sel(j) = 0 for every j ≠ iOtherwiseif sel(i) = 1 and sel(j) = 0 for every j ≠ iOtherwise74<strong>ModuleWare</strong> <strong>Reference</strong> Manual, Library Version 1.9September 18, 2008

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!