阅读:1948回复:2
如何实现加减可逆计数器(两个时钟)?就像74193那样的
如何用VHDL实现就像74193那样的加减可逆计数器(两个时钟)?
|
|
沙发#
发布于:2004-12-07 19:50
process(upclk,downclk,rst)
if (rst = '0') q = "0000"; --异步清零 else if (upclk'event and upclk = '1') then q = q + 1; end if; else if(downclk'event and downclk = '1') then q = q - 1; end if; end if; end process; |
|
|
板凳#
发布于:2004-12-08 09:41
错乐,是: process(upclk,downclk,rst) if (rst = '0') q = "0000"; --异步清零 else if (upclk'event and upclk = '1') then q = q + 1; else if(downclk'event and downclk = '1') then q = q - 1; end if; end if; end if; end process; |
|
|