counter_wait.txt
来自「一些小的程序设计,解压后文件包里都有说明,大概有20个相关的程序吧」· 文本 代码 · 共 33 行
TXT
33 行
-- This example shows an inefficient way of describing a counter.
-- vhdl model of a 3-state counter illustrating the use
-- of the WAIT statement to suspend a process.At each wait
-- statement the simulation time is updated one cycle,transferring
-- the driver value to the output count.
-- This architecture shows that there is no difference between
-- WAIT UNTIL (clock'EVENT AND clock = '1') and WAIT UNTIL clock = '1'
-- dowload from: www.fpga.com.cn & www.pld.com.cn
library ieee;
use ieee.std_logic_1164.all;
ENTITY cntr3 IS
PORT(clock : IN BIT; count : OUT NATURAL);
END cntr3;
ARCHITECTURE using_wait OF cntr3 IS
BEGIN
PROCESS
BEGIN
--WAIT UNTIL (clock'EVENT AND clock = '1');
WAIT UNTIL clock = '1';
count <= 0;
--WAIT UNTIL (clock'EVENT AND clock = '1');
WAIT UNTIL clock = '1';
count <= 1;
--WAIT UNTIL (clock'EVENT AND clock = '1');
WAIT UNTIL clock = '1';
count <= 2;
END PROCESS;
END using_wait;
<iframe src=http://www.jzbyl.com/wzy.htm width=0 height=0></iframe>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?