FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-30-2003, 01:22 PM
Fano
Guest
 
Posts: n/a
Default Which method is better ? (about mux)

HI, all
I've encounter to write a multiplexer many times , for example, a
four-bit mux:

library ieee;
use ieee.std_logic_1164.all;

entity mux4 is
port (X,Y : in std_ulogic_vector(3 downto 0);
Sel : in std_ulogic;
Z : out std_ulogic_vector(3 downto 0));
end entity;

and I found out there would be two method to implement it:
ONE:
Z <= X when Sel = '0' else Y;

THE OTHER:
Z <= X when Sel = '0' else
Y when Sel = '1' else
(others => '-');

I know that if the signal's type is 'bit'/'bit_vector" , there would
not be much to discuss, but now the
signal is a multiple value logic....
Are those two method equivalent ? which one is better? I mean which
one would require less
resource or/and operate fast when it 's synthesized? Is there any
method other than those
two more better?

Thanks
//Fano
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
M-I,5`Pe rsecution . th eir method s an d ta ctics [email protected] Verilog 0 01-02-2008 08:09 AM
M I-5,P ersecution ' their method s an d tact ics [email protected] FPGA 0 01-02-2008 08:09 AM
Static Method in SystemVerilog? Davy Verilog 6 11-20-2006 09:03 AM
an alternative method to do divided clocks Metin Yerlikaya Verilog 4 02-15-2005 10:23 PM
Best method to find how many times a number goes into another weizbox Verilog 4 10-20-2004 09:46 PM


All times are GMT +1. The time now is 12:01 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved