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.

[SOLVED] Special Mux or what else?

Status
Not open for further replies.

zorax85

Junior Member level 3
Joined
Apr 27, 2011
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,517
This is my question...
I have two modules and they share an I/O bus of 16 bits.
The first module, that we can call module A, needs to use all 16 bits in bidirectional mode.
The second module, that we can call module B, needs to use just 8 bits in output mode.

Which is the best solution in order to provide the normal use of the module A, and sometimes, using a bypass for example, enable the module B?
 

Who should manage the activation of outputs?
 

I would have modules A and B with separate inputs and outputs, and then let a seperate entity handle the Bidirectional bus and who has control of it.
 

Maybe this scheme can be useful to understanding my question.

2011-07-22_11-45-56_364.jpg
 

I stick with my idea - let A have separate input and output ports.
Then create a bus controller module.

inside an FPGA, internal tri-states are just converted to muxes, which for module A would be like having separate input and output.
 

I already have three different signals (two from A the separate input and output, and one from B)

now you mean something like that?

process(s,inp)
begin
case s is
when '0' => op <= inp_A and bus_enable <= enable_A;
when others => op <=inp_B and bus_enable <= '1';
end case;
end process;


and then I have to manage the bidir pins?
 

no, you will need tristates:

Code:
op <=      output_A  when sel = output_A
      else output_B  when sel = output_B
      else (others => 'Z');


---------- Post added at 10:19 ---------- Previous post was at 10:18 ----------

plus you need

input_A <= op;
 
Honestly speaking, I don't see any problem involved with the intention of your initial post. Preferably, you would keep the upper bus bits tristated while module B is driving out to minimize switching noise, but it's not strictly required. For an exact answer, please specify the existing control signals.
 

no, you will need tristates:

Code:
op <=      output_A  when sel = output_A
      else output_B  when sel = output_B
      else (others => 'Z');


---------- Post added at 10:19 ---------- Previous post was at 10:18 ----------

plus you need

input_A <= op;

Following your suggestion:
Data_Pin <= Out_A when ((Out_en = '1') and (sel = '1')) else
Out_B when ((Out_en = '1') and (sel = '0')) else
(others => 'Z');

In_A <= Data_Pin; 

It looks OK...isn't it?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top