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.

transfer data from process1 to process2

Status
Not open for further replies.

EDA_hg81

Advanced Member level 2
Joined
Nov 25, 2005
Messages
507
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,808
I have two processes running under the same clock domain.

Code:
Process1  ( refclk ) 
	begin
           if (rising_edge(refclk)) then
          end if;   
end process;

process2 ( refclk ) 
	begin
           if  (falling_edge(refclk)) then
         end if;   
end process;

I want to transfer data from process1 to process2.

How I can make sure data can be transferred reliably?

Thanks
 

Hi!
You can use signals to carry data from one process to other. This is the simplest solution i guess.
entity
architecture
signal a: std_logic;
begin
process(clk)
begin
if(clk' event and clk='1') then
a<=x;
end if;
end process;

process(clk)
begin
if(clk' event and clk='0') then
y<=a;
end if;
end process;
end architecture;
And in order to varify that the data has been properly transfered you should write a test bench.
And remember generally the value of a signal is updated after the complete execution of process.
I hope this will work
regrards.
Awais
 

    EDA_hg81

    Points: 2
    Helpful Answer Positive Rating
What I want to do is when process1 is done; the data is transferred to process2.

What are the possible reasons the data is lost?

Thanks.
 

There is a way to complete it .You can use handshake.
 

HI!
There seems no reason of data loss. Well if you can put a pieace of code that can help to understand the problem.
One more thing try taking data on the next rising edge of the clock in process2, i mean instead of initiating process2 on falling edge make it a rising edge as well. then check the results.
Other wise put your code here so that we can discuss.
 

See,I am not so sure about using falling edge to read the data in process2 ....As it's not a good thing to use both rising and falling edge of the same clk. Instead,use one clk delay and read the data...You won't miss any.....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top