if statement - Is it possible to use synchronous process in functions? -


i=0; if rising_edge (clk) y(i)<=x(i) ; i=:i+1; end if; 

is block above, possible in function block? if not, there function-like sub-program style achieve this?

or there synthetizable 'for loop' usage instead of 'if statement'?

you can use procedures:

  procedure setbits(signal clk : in std_logic; signal y : out std_logic_vector(7 downto 0))   begin     in 7 downto 0 loop       wait until (rising_edge(clk));       y(i) <= '1';     end loop;   end procedure; 

and this

  sequential : process   begin     setbits;     wait;   end process sequential; 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -