Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Multiplexer Design Error

Status
Not open for further replies.

tri2061990

Newbie level 5
Joined
May 20, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,366
My Code

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

----------------------------------------------
entity mux3 is
port(
Sel : in std_logic_vector(1 downto 0);
Din1 : in std_logic_vector(4 downto 0);
Din2 : in std_logic_vector(4 downto 0);
Din3 : in std_logic_vector(4 downto 0);
Dout : out std_logic_vector(4 downto 0)
);
end mux3;
-----------------------------------------------
architecture rtl of mux3 is
signal s1,s2,s3:std_logic_vector(4 downto 0);

begin
s1<=Din1;s2<=Din2;s3<=Din3;
with sel select
Dout<=s1 when "01",
Dout<=s2 when "00" ,
Dout<=s3 when "10",
Dout<=s2 when "11",
Unaffected when others;

end rtl;

I have error

# ** Error: mux3.vhd(24): Type error resolving infix expression "<=" as type ieee.std_logic_1164.std_logic_vector.
# ** Error: mux3.vhd(24): Cannot read output "dout".
# ** Error: mux3.vhd(25): Type error resolving infix expression "<=" as type ieee.std_logic_1164.std_logic_vector.
# ** Error: mux3.vhd(25): Cannot read output "dout".
# ** Error: mux3.vhd(26): Type error resolving infix expression "<=" as type ieee.std_logic_1164.std_logic_vector.
# ** Error: mux3.vhd(26): Cannot read output "dout".
# ** Error: mux3.vhd(29): VHDL Compiler exiting
# C:/Modeltech_6.3f/win32/vcom failed.

please show me how to fix it,thanks

---------- Post added at 22:41 ---------- Previous post was at 22:29 ----------

I found my error,sorry
 

jimmy_tag

Member level 2
Joined
Jul 19, 2010
Messages
49
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,288
Location
India
Activity points
1,609
make these changes:
--add signal s4
begin
s1<=Din1;s2<=Din2;s3<=Din3;s4<=Din2;
with sel select
Dout<=s1 when "01",
s2 when "00" ,--remove Dout from these lines
s3 when "10",
s4 when "11",
'X' when others;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top