在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 1826|回复: 1

[求助] 锯齿波分段函数程序仿真结果不对,坐等高手指点

[复制链接]
发表于 2015-9-17 09:46:05 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
library IEEE;
use IEEE.Std_logic_1164.all;
USE ieee.std_logic_unsigned.ALL;

entity adclk_pwm_gen is
   port( clock : in Std_logic;   

datain:in std_logic_vector(15 downto 0);
   
data_us_testut std_logic_vector(15 downto 0)

);   

end adclk_pwm_gen;

architecture V2 of adclk_pwm_gen is


SIGNAL data_us: std_logic_vector(15 downto 0);

SIGNAL data_us_2: std_logic_vector(15 downto 0);



begin
process(clock)
begin
if clock='1' and clock'event then

if (datain>=x"0000" and datain<x"0800")then

data_us<=datain;

else if (datain>=x"0800" and datain<x"1000") then

data_us<=datain-x"0800";

else if (datain>=x"1000" and datain<x"1800")then

data_us<=datain-x"1000";

else if (datain>=x"1800" and datain<x"2000")then

data_us<=datain-x"1800";


end if;

end if;


end if;

end if;

end if;
end process;
data_us_test<=data_us;
end v2;
 楼主| 发表于 2015-9-17 09:52:51 | 显示全部楼层
仿真结果:,data_us在datain大于等于0800以后一直不变
2015-09-17_100212.png
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

X

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-6-27 14:28 , Processed in 0.016929 second(s), 12 queries , Gzip On, MemCached On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表