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 PartsW-Bit Multiplexer (mux1)W-Bit Multiplexer (mux1)This part selects one of the bits from the input data bus din and places it on thescalar output port dout.The selection is based on the value of input port sel which is interpreted as azero-based index. The output port selerror is asserted if the value of the inputport sel exceeds the width of input bus port din.If only one of dout and selerror is connected, the HDL code for theunconnected port is optimized away.This part is equivalent to the gate count of an n-bit multiplexer where n is thewidth of the port din.Functiondout = din(sel)= Xselerror = 0= 1if sel < width of dinotherwiseif sel < width of dinotherwiseTruth TableExample (8 to 3-bit):Table 4-20. W-Bit Multiplexer Truth Tabledin sel dout00110100 000 000110100 001 000110100 010 100110100 011 000110100 100 100110100 101 100110100 110 000110100 111 078<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!