Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

bidirectional data bus problem

Status
Not open for further replies.

umerarain

Newbie level 4
Joined
May 22, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,338
hello
iam doing my master theesis and in my theesis iam programming microprocessor using vhdl.but problem iam getting is data bus(external bus) conflict.i want to use data bus as (inout),but its not working.i have written this small program also,but its also not working.can nay one help me.

process (clk)
begin
if clk = '1' and clk 'event then
a <= Internal_bus;
b <= External_bus;

end if;
end process;

process (Output_enable,Internal_bus)
begin

if Output_enable = '1' then
External_bus <= a;

else
External_bus <= (others => 'Z');
end if;


end process;

output <= b;
 

hi u write in this way
declare internal bus as inout;

process(clk,output_enable,internal_bus)
begin
if(clk'event and clk='1')then
if(output_enable='1')then
b<=internal_bus;
elsif(output_enable='0')then
internal_bus<=a;
end if;

end if;
try this i have not checked it..

and reply me..

Regards
Shankar
 

hello
i tried this one,but no result.its not working.i declared internal bus as inout ,but still same.
please help.
umer
 

How do you know it's not working? And which FPGA are you using?
 

Which device is the master? I'm assuming you're not building multi-master systems.

The master must time the Output_enable signal to avoid inout conflicts with slaves. If there is more than one device on the bidirectional bus, then the slave's Output_enable must be conditioned (gated) so that only one slave will output to the master. As an example, most peripheral and memory chips have additional CE (chip enable) or CS (chip select) pins for this purpose.

If you only have two devices, and they both are masters, you should use request and acknowledge signals (handshaking).
 

hi
first i try this code by using simulation software (model sim) and also by simulation waveform in xilinx.in both cases iam getting nothing on data bus when i set output_enable signal high.uptill now i havent put my code into fpga as i was not sure wheather it will work or not,any way iam using fpga of xilinx (xc2v3000).
answers will be appreciated
umer
 

Hi umerarain,

You should try with this code (not in a process) :
External_bus <= a when Output_enable = '1' else (others => 'Z');

If you want to keep your process, add signal a in your sensitive list.
 

hi,
iam attaching two files,one is microsoft file from which you can see the structure which iam trying to make.u can see numbers written on the lines(i have problem in line number 4).and that is when iam putting my data back to data bus after alu operation.
second file is project files.please have a look
answers will be appreciated
umer
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top