集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 2491|回复: 6

求教:如何用VHDL编程实现两个相位相差90度的方波啊

[复制链接]
xiasitai 发表于 2011-7-30 11:05:46 | 显示全部楼层 |阅读模式
RT,如何用VHDL编程实现两个相位相差90度的方波啊,求达人指导。
liujilei311 发表于 2011-7-31 10:42:35 | 显示全部楼层
你是说两路脉冲进行正交吧,这个简单,在用modelsim仿真时对激励信号,可以人为设置其正交的。。。。。。。
 楼主| xiasitai 发表于 2011-8-1 19:42:36 | 显示全部楼层
回复 2# liujilei311


    我要的是输出额,不是激励额
liujilei311 发表于 2011-8-3 08:08:15 | 显示全部楼层
我知道,这和激励信号的设置有关的。。。。。。。。
wenlimin 发表于 2011-8-12 22:44:15 | 显示全部楼层
不知这个能不能满足你的要求
library ieee;
use ieee.std_logic_1164.all;
entity counter20 is
        port (clk:in std_logic;
                        rst:in std_logic;
                        y1ut std_logic;
                        y2ut std_logic
                        );
end counter20;
architecture hav of counter20 is
        signal y1_temp:std_logic;
        signal y2_temp:std_logic;
begin
        y1<=y1_temp;
        y2<=y2_temp;
process(clk,rst)
       
       
        variable counter:integer range 0 to 1;
        begin
        if (rst='1') then
                y1_temp<='0';
                y2_temp<='0';
                counter:=0;
        else
                if (clk'event and clk='1')then
                        if (counter=0)then
                                y1_temp<=not y1_temp;
                                counter:=counter+1;
                       
                       
                        elsif counter=1 then
                                y2_temp<=not y2_temp;
                                counter:=0;
                        end if;
             end if;
        end if;
end process;
                       
end architecture;
liujilei311 发表于 2011-8-15 07:56:03 | 显示全部楼层
恩,学习一下!!!!!!!!!!!!
 楼主| xiasitai 发表于 2011-10-10 22:39:37 | 显示全部楼层
回复 5# wenlimin


    我自己实现了,不过还是i非常感谢额
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

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

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

GMT+8, 2024-4-29 03:03 , Processed in 0.068224 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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