wtr
Full Member level 5
Hello all,
This following is a derived from my desire to keep a signal declaration local to a specific block, but use it in a different block. I know if I was to move the "scope" of the signal declaration to the architecture I would be able to apply visibility by selection.
Can a signal local to a specific block ever be used elsewhere? I'm experimenting with visibility by selection.
See the following. I would like to assign signal b to the a_block.a.
This following is a derived from my desire to keep a signal declaration local to a specific block, but use it in a different block. I know if I was to move the "scope" of the signal declaration to the architecture I would be able to apply visibility by selection.
Can a signal local to a specific block ever be used elsewhere? I'm experimenting with visibility by selection.
See the following. I would like to assign signal b to the a_block.a.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 library ieee; use ieee.std_logic_1164.all; entity tb is end entity tb; architecture ar_tb of tb is signal a : std_logic_vector(3 downto 0); begin process is begin wait for 1 ns; a <= x"0"; wait for 49 ns; a <= x"1"; wait for 97 ns; a <= x"2"; wait for 17 ns; a <= x"3"; wait for 10 ns; wait; end process; a_block : block signal a : std_logic_vector(3 downto 0); begin process(ar_tb.a) is -- , work.ar_tb.b_block.b) is -- , ar_tb.b_block.b) begin if ar_tb.a'event then a <= ar_tb.a ; end if; --if ar_tb.b_block.b'event then --a <= ar_tb.b_block.b; --end if; end process; end block a_block; b_block : block signal b : std_logic_vector(3 downto 0); begin process begin wait for 5 ns; b <= X"F"; wait for 9 ns; b <= X"E"; wait for 99 ns; b <= X"9"; wait; end process; end block b_block; process begin wait for 1 us; report "" severity failure; end process; end architecture;