2056
- 收藏
- 点赞
- 分享
- 举报
MASK调制VHDL程序与仿真
基于VHDL硬件描述语言,对基带信号进行MASK调制
[hide]
library ieee;
use ieee.std_logic_arith.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity PL_MASK is
port(clk :in std_logic; --系统时钟
start :in std_logic; --开始调制信号
x :in std_logic; --基带信号
y :out std_logic_vector(7 downto 0)); --8位DAC数据
end PL_MASK;
architecture behav of PL_MASK is
signal q:integer range 0 to 7; --计数器
signal qq:integer range 0 to 3; --计数器
signal xx:std_logic_vector(3 downto 0); --并行数据寄存器
signal yy:std_logic_vector(7 downto 0); --8位DAC数据寄存器
begin
process(clk) --此进程完成基带信号的串并转换,完成4位并行数据到8位DAC数据的译码
begin
if clk'event and clk='1' then
if start='0' then q<=0;
elsif q=0 then q<=1;xx(3)<=x;
if xx(3)='1' then yy<=xx&"1111"; --if语句完成4位并行数据到8位DAC数据转换
elsif xx(2)='1' then yy<=xx&"1011";
elsif xx(1)='1' then yy<=xx&"0111";
elsif xx(0)='1' then yy<=xx&"0011";
else yy<=xx&"0000";
end if;
elsif q=2 then q<=3;xx(2)<=x;
elsif q=4 then q<=5;xx(1)<=x;
elsif q=6 then q<=7;xx(0)<=x;
else q<=q+1;
end if;
end if;
end process;
process(clk) --对8位DAC数据进行ASK调制
begin
if clk'event and clk='1' then
if start='0' then qq<=0;
elsif qq<2 then qq<=qq+1;y<="00000000";
elsif qq=2 then qq<=3;y<=yy;
else qq<=0;
end if;
end if;
end process;
end behav;
3. MASK调制程序仿真图及注释
MASK调制程序仿真图及注释如图8.12.6所示。
(a)MASK调制VHDL程序仿真仿真全图
(b)MASK调制VHDL程序仿真局部放大图
图8.12.6 MASK调制VHDL程序仿真图及注释
[/hide]
[hide]
library ieee;
use ieee.std_logic_arith.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity PL_MASK is
port(clk :in std_logic; --系统时钟
start :in std_logic; --开始调制信号
x :in std_logic; --基带信号
y :out std_logic_vector(7 downto 0)); --8位DAC数据
end PL_MASK;
architecture behav of PL_MASK is
signal q:integer range 0 to 7; --计数器
signal qq:integer range 0 to 3; --计数器
signal xx:std_logic_vector(3 downto 0); --并行数据寄存器
signal yy:std_logic_vector(7 downto 0); --8位DAC数据寄存器
begin
process(clk) --此进程完成基带信号的串并转换,完成4位并行数据到8位DAC数据的译码
begin
if clk'event and clk='1' then
if start='0' then q<=0;
elsif q=0 then q<=1;xx(3)<=x;
if xx(3)='1' then yy<=xx&"1111"; --if语句完成4位并行数据到8位DAC数据转换
elsif xx(2)='1' then yy<=xx&"1011";
elsif xx(1)='1' then yy<=xx&"0111";
elsif xx(0)='1' then yy<=xx&"0011";
else yy<=xx&"0000";
end if;
elsif q=2 then q<=3;xx(2)<=x;
elsif q=4 then q<=5;xx(1)<=x;
elsif q=6 then q<=7;xx(0)<=x;
else q<=q+1;
end if;
end if;
end process;
process(clk) --对8位DAC数据进行ASK调制
begin
if clk'event and clk='1' then
if start='0' then qq<=0;
elsif qq<2 then qq<=qq+1;y<="00000000";
elsif qq=2 then qq<=3;y<=yy;
else qq<=0;
end if;
end if;
end process;
end behav;
3. MASK调制程序仿真图及注释
MASK调制程序仿真图及注释如图8.12.6所示。
(a)MASK调制VHDL程序仿真仿真全图
(b)MASK调制VHDL程序仿真局部放大图
图8.12.6 MASK调制VHDL程序仿真图及注释
[/hide]
我来回答
回答0个
时间排序
认可量排序

或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片
相关问答
-
2008-10-02 20:25:24
-
2008-10-02 20:26:30
-
2008-10-02 20:51:40
-
2008-10-02 20:52:33
-
2008-10-02 20:20:48
-
2008-10-02 20:42:12
-
2008-10-02 20:56:22
-
2013-08-28 12:11:15
-
2018-10-19 10:31:13
-
2008-10-02 20:40:04
-
2012-12-24 15:01:43
-
2008-10-02 20:47:54
-
2013-12-02 22:02:26
-
2008-10-02 20:46:03
-
2008-10-02 20:17:49
-
2008-10-02 20:17:06
-
2019-12-17 17:14:24
-
2012-12-24 14:41:40
-
2008-10-02 20:15:51
无更多相似问答 去提问

点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认