title: Variable or signal in vhdl for shared value between different process
body: <p>I need to share a value (a <code>real</code>) between two process, but when I try to run my code, <code>quartus</code> gives me an error.</p>
  
  <pre><code>library IEEE;
  USE ieee.std_logic_1164.all; 
  USE ieee.std_logic_arith.all; 
  USE ieee.std_logic_unsigned.all; 
  use IEEE.MATH_REAL.ALL;
  
  entity de0nano is
  port (
   CLOCK_50      : in  std_logic;
  KEY           : in  std_logic_vector(1 downto 0);
   SW            : in  std_logic_vector(3 downto 0);
   LED           : out std_logic_vector(7 downto 0);
   GPIO           : inout std_logic_vector(35 downto 0)
  
  
    );
  end de0nano;
  
  architecture struct of de0nano is
  --declarations
  signal   PN                 :  real :=0.0 ;
  signal   PR                 :  real :=0.0 ;
  signal   RC             :  integer :=1;
  signal   NC             :  integer :=1;
  signal   BET                :  integer :=1;
  
  
  begin
  count : process (CLOCK_50, GPIO)
  begin 
   --A &lt;= KEY(0);
   GPIO(24) &lt;= '1';
  --functional coding
  LED &lt;= "00011000";
   if (pn &gt; pr) then
  GPIO(26) &lt;= '1';
  LED &lt;= "00000001";
  else
  GPIO(26) &lt;= '0';                    
      end if;
   if (pn = pr) then
  GPIO(26) &lt;= '1';
  LED &lt;= "00000010";
  else
  GPIO(26) &lt;= '0';                    
  end if;
   if (pn &lt; pr) then
  GPIO(26) &lt;= '1';
  LED &lt;= "00000011";
  else
  GPIO(26) &lt;= '0';                    
  end if;
  
  end process;
  
  probabilityController : process (CLOCK_50, KEY)
  begin
  --stato iniziale
  if((RC + NC + BET)=1) then
  pr &lt;= 0.5;
  pn &lt;= 0.5;
  end if;
  --sequenza rossi consecutivi
  if(RC&gt;0) then
  pr &lt;= (5)**RC;
  pn &lt;= 1- (5)**RC;
  end if;
  --sequenza neri consecutivi
  if(NC&gt;0) then
  pr &lt;= (5)**NC;
  pn &lt;= 1- (5)**NC;
  end if;
  
  end process;
  
  betController : process (CLOCK_50)
  begin
  
  end process;
  
  colorController : process (CLOCK_50, KEY)
  begin
  if(KEY(0)='1') then
  NC&lt;=0;
  RC &lt;= RC+1;
  end if;
  
  if(KEY(1)='1') then
  RC&lt;=0;
  NC &lt;= NC+1;
  end if;
  
  
  end process;
  
  end str
  </code></pre>
  
  <p>How can I operate in the same signal/variable from two different processes?</p>