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.

How to read the output of a module in VHDL (Xilinx) and use this as input?

Status
Not open for further replies.

lgdly

Newbie level 3
Joined
Feb 16, 2017
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
41
Lets say that the top level contains module X.

Module X has inputs A, B of std_logic_vector and outputs of C and D (also std_logic_vector).

Module X contains within its architecture (using component/direct instantiation) Module Y.

Module Y has inputs M, N of std_logic_vector and outputs E, F (also std_logic_vector).


How can I write my VHDL to describe:

The output of Module X (C for example) is the input M to module Y.

ie. Module X could be a FSM, which outputs an enable signal (C), and this is connected to input M of module Y.

When this is high, module Y can now perform its role (a counter for example, with input M being an enable).

In addition the output E of module Y is wired up to be the output of D of Module X


I currently get the error that Xilinx cannot read from an output and I should use inout/buffer, but this doesn't seem to work. If this question is too abstract I will update it with code and the error messages along with a schematic.
 

a. Use VHDL 2008 which allows reading of an entity's output port
b. Create a c_local signal and use that as the local output then assign it to c for the entity's output.
 

Is there any way around point a without using VHDL 2008?

Do you mind expanding point b please? I'm new to VHDL. Thanks

ie creating a c_local signal, is this an internal signal inside module X which is then assigned to module X output?
 

d. Declare the output port as "buffer". (Although IMO it's the least preferable option...)
 

Is there any way around point a without using VHDL 2008?

Do you mind expanding point b please? I'm new to VHDL. Thanks

ie creating a c_local signal, is this an internal signal inside module X which is then assigned to module X output?

Like this - create a local internal copy of the output :


Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
signal op_i : std_logic_vector(7 downto 0);
 
.....
 
process(clk, reset)
begin
  if reset = '1' then
  elsif rising_edge(clk) then
    op_i <= some_ip;
 
    if op_i = x"AB" then
      --do something based on output
   end if;
  end if;
end process;
 
op <= op_i;    -- connect output to local internal copy of output.

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top