it should already do this, for example:
signal reg : std_logic;
signal a,b,c : std_logic;
process(clk)
begin
if rising_edge(clk) then
reg <= input;
end if;
end process;
a <= reg;
b <= reg;
c <= reg;
a, b and c are all just a registered version of the input.
similarly, if you do this:
process(clk)
begin
if rising_edge(clk) then
reg1 <= input;
reg2 <= input;
end if;
end process;
a <= reg1;
b <= reg2;
c <= a;
when it is synthesised, it will probably compress reg1 and reg2 into
the same register (unless you specifically tell it not to).
otherwise you can alias signals to avoid the delta delays (in
simulation) from the above methods:
signal reg1 : std_logic;
alias a : std_logic is reg1;
IS this what you wanted?
Thanx, but i'm looking for real substitute, like in C language.
I'll write iot in pseudo-code:
if i have signal defined:
signal generic_register : integer range 0 to 1023l;
and some statements like:
up_counter IS SUBSTITUTE OF generic_register;
down_counter IS SUBSTITUTE OF generic_register;
so i can use statements like
up_counter <= down_counter+1;
and get the result as i wrote generic_register <= generic_register+1;
i'm looking for a nice and readable way to use the same generic signal
or variable which gets completely different meaning