I am having trouble adding another process; if the countup and countdown are equal to one, it will report the device is on.
The question is, Where should I add another process that when the variable reaches "1" it will print "the device is on"?
architecture sim of T09_SensitivityListTb is signal CountUp : integer :=0; --counter signal CountDown : integer :=10; --counter begin process is begin CountUp <= CountUp + 1; --increment the countup signal CountDown <= CountDown - 1; --decrement the countdown signal wait for 10 ns; --remember no process can be left without the wait statement end process; process is -- process triggered using wait on begin if CountUp = CountDown then --the program will evaluated on this part report "Process A: Jackpot!"; end if; wait on CountUp, CountDown; --but will pause until either of the signals change and loop back to the evaluated process end process; --equivalent process using sensitivity list process (CountUp, CountDown) --write here the signals you want the process to be sensitive begin if CountUp = CountDown then report "Process B Jackpot!"; end if; end process; end architecture;
https://stackoverflow.com/questions/66746010/idea-on-how-to-add-another-process March 22, 2021 at 08:26PM
没有评论:
发表评论