Altera_Forum
Honored Contributor
17 years agomultiplexer synthesis
Hi to all,
I am new to the forum. I have a question about multiplexers. Our design is in VHDL and there are many cases when depending on a value of a register I have to multiplex different values onto a bus. For example case MYREG is when REGVAL_1 | REGVAL_2 => A <= B; when REGVAL_3 | REGVAL_4 | REGVAL_5 | REGVAL_6 | REGVAL_7 | REGVAL_8 | REGVAL_9 => A <= (others => '0'); when others => A <= (others => '-'); end case; MYREG can have 9 defined values and therefore it is stored on 4 bits. After synhtesis, I can see in RTL viewer that there are 16:1 multiplexers (on each bit of the bus). On the other hand the code suggests that I would need only a 2:1 mux. Is there a way to tell quartus not to have always a full decoding of the register value? I suppose that would require less resource/routing. Thanks for your reply.