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

multibuses affectation in vhdl

Status
Not open for further replies.

ramzitligue

Member level 1
Joined
Sep 2, 2008
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,549
multibuses in vhdl

hi,i want to do a multibuses affectation but it didn't work
this is my program:


TYPE data_port IS RECORD
en : STD_LOGIC;
write : STD_LOGIC;
internal : STD_LOGIC;
sel_dcache : STD_LOGIC;
sel_ram : STD_LOGIC;
sel_ext : STD_LOGIC;
addr : data_addr;
data : data_bus;
END RECORD;

entity multi is
in : inout data_port;
out1 : inout data_port;
out2 : inout data_port;
switch : in std_logic
);
architecture rtl of multi is
process(switch)
begin
if switch='1' then
out1<=in;
else
out2<=in;
end if;
end process;
end rtl;

what can i do ?thanks.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,489
Helped
14,051
Reputation
28,357
Reaction score
12,708
Trophy points
1,393
Location
Bochum, Germany
Activity points
276,164
Re: multibuses in vhdl

what can i do ?
Keep VHDL syntax rules.
E.g.:
- Add necessary library definitions.
- Define a package for the record type.
Code:
library ieee;
use ieee.std_logic_1164.all;
package defs is
-- your type definitions used in the below entity port
end package defs;

library ieee;
use ieee.std_logic_1164.all;

library work;
use work.defs.all;

entity multi is 
-- 
end;
architecture rtl of test is 
--
end rtl;
There are some additional detail errors, you'll be aware of, when the overall syntax is correct.
 

ramzitligue

Member level 1
Joined
Sep 2, 2008
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,549
Re: multibuses in vhdl

hi,
thanks for responding, and sorry because i don't mention that i already put all library and package.my problem is that my program didn't work when i simulated it on modelsim.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,489
Helped
14,051
Reputation
28,357
Reaction score
12,708
Trophy points
1,393
Location
Bochum, Germany
Activity points
276,164
multibuses in vhdl

In other words, your saying, that the various obvious syntax errors in your post are just arbitrary omissions. How can we know, what's else missing?

Also didn't work is still maximum unclearness... You may want to assemble an informative posting to get effective help.
 

sajal1975

Full Member level 2
Joined
Mar 25, 2005
Messages
136
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,298
Activity points
2,149
Re: multibuses in vhdl

hlp me to use multibuses
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top