Altera_Forum
Honored Contributor
16 years agoimplementing a mux using high impedances
I have many streaming input ports that I want to connect to a single streaming output port.
Rather than using a VHDL case or lengthy ifels statement, I was wondering if I could get tricky with high impedances in order to save some logic resources. I have attached an example VHDL file showing what I would like to do. It has 4 streaming input style ports and a single streaming output port. The first architecture, "typical", implements the standard mux using a case statement, nothing fancy. The second architecture, "hi_z", implements a mux by using a register for each of the input streams and assigning "Z" to each of the registers except for the one we want to pass through. The register associated with the input stream we wish to be assigned to the output, gets assigned with its associated input. And the end I have a concurrent assignment of each of the registers to the output stream. The idea is that each of the registers will be set to high impedance, except for the one that I actually wish to pass. My question is: Will quartus synthesize this logic properly? Will it consume fewer device resources than the standard mux of architecture "typical"? thanks