Shared Variable

SCL allows the reading and writing of variables from the software running on the processor, by name. To access these variables, you have to tell SCL about the variables by declaring shared variables in the configuration section.

shared variable varName;

At this time, shared variables have to be global and static.

Here is an example.

configuration for "PIC16F877" is
   shared variable stateVar;
   end configuration;
testbench for "PIC16F877" is
   process is
      if stateVar == 0 then
         RD0 <= 1;
         RD1 <= 0;
      end if;
      end process;
   end testbench;