集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 2942|回复: 6

三角波发生电路

[复制链接]
stulab 发表于 2010-9-3 21:37:23 | 显示全部楼层 |阅读模式
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity abc is
  port(clk,reset:in std_logic;
       q1ut std_logic_vector(7 downto 0));
end abc;
architecture delta_arc of abc is
begin
  process(clk,reset)
  variable tmp:std_logic_vector(7 downto 0);
  variable a:std_logic;
begin
  if reset='1' then
     tmp:="00000000";
     a:='0';
  elsif clk'event and clk='1' then
     if a='0' then
       if tmp="11111110" then
          tmp:="11111111";
          a:='1';
      else
         tmp:=tmp+1;
      end if;
    else
      if tmp="00000001" then
         tmp:="00000000";
         a:='0';
     else
tmp:=tmp-1;
end if;
   end if;
  end if;
q1<=tmp;
end process;
end delta_arc;


这是我写的三角波程序 仿真的时候产生很多毛刺  怎么解决   急求
七缎夕落 发表于 2010-9-30 12:18:58 | 显示全部楼层
谢谢分享,前来学习
七缎夕落 发表于 2010-9-30 12:20:06 | 显示全部楼层
产生毛刺的解决办法:采用功能仿真。
kpywe 发表于 2010-10-1 15:10:02 | 显示全部楼层
谢谢分享,为什么中间有个图标
kpywe 发表于 2010-10-1 15:10:12 | 显示全部楼层
谢谢分享,为什么中间有个图标
大鹏 发表于 2022-6-23 16:55:14 | 显示全部楼层
三角波发生电路
zxopenhl 发表于 2022-6-24 15:39:22 | 显示全部楼层
三角波发生电路
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|集成电路技术分享 ( 京ICP备20003123号-1 )

GMT+8, 2024-4-20 06:08 , Processed in 0.074413 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表