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

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
查看: 2158|回复: 0

数字基带信号传输码型发生器如何在QUARTUSⅡ上仿真

[复制链接]
发表于 2016-4-27 10:24:50 | 显示全部楼层 |阅读模式

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

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

×
程序有
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity HS_UJDM is
Port (clk : in std_logic; --系统时钟
Start : in std_logic; --始能信号
dat : in std_logic_vector(15 downto 0); --二进制数据输入端
NRZ : out std_logic; --非归零信号输出端
DRZ : out std_logic; --单极性归零信号输出端
SRZ : out std_logic_vector(1 downto 0); --双极性归零信号输出端
AMI : out std_logic_vector(1 downto 0); --交替极性信号输出端
CFM : out std_logic; --差分信号输出端
CMI : out std_logic; --编码信号反转码信号输出端
FXM : out std_logic); --分相码(曼彻斯特码)信号输出端
end HS_UJDM;
architecture Behavioral of HS_UJDM is
begin
process(clk,start)
variable latch_dat : std_logic_vector(15 downto 0); --十六位二进制信号锁存器
variable latch_sig : std_logic; --高位信号锁存器
variable latch_cfm : std_logic; --差分码信号寄存器
variable latch_cnt : std_logic; --基带码同步信号
variable count_fri : integer range 0 to 8; --分频计数器(码宽定义)
variable count_mov : integer range 0 to 16; --移位计数器
begin
if start='0' then latch_cnt:='0'; --异步复位
latch_cfm:='0'; latch_sig:='0';
count_fri:=7;count_mov:=16; --异步置位
latch_dat:="0000000000000000";
elsif rising_edge(clk) then count_fri:=count_fri+1; --分频计数器+1
if count_fri=8 then count_fri:=0; --计数到8
if count_mov<16 then count_mov:=count_mov+1; --移位计数器+1
latch_sig:=latch_dat(15); --二进制码高位移入latch_sig 中
latch_dat:=latch_dat(14 downto 0)&'0'; --二进制数据向高位移动一位,低位补零
else latch_dat:=dat;count_mov:=0; --载入下一轮将发送的数据
latch_cfm:='0';latch_sig:='0';latch_cnt:='0'; --寄存器复位
end if;
if latch_sig='1' then latch_cfm:=not(latch_cfm); --差分码信号寄存器中信号取反
end if; end if;
if count_fri<4 then latch_cnt:='1'; --基带码同步信号的占空比调节
else latch_cnt:='0';
end if; end if; --码形转换部分
NRZ<=latch_sig; --非归零码信号
DRZ<=latch_sig and latch_cnt; --单极性归零码信号
SRZ(0)<=latch_cnt; --双极性归零码信号
SRZ(1)<=not(latch_sig); --SRZ(1)=‘1’表示负极性
AMI(0)<=latch_sig and latch_cnt; --极性交替码信号
AMI(1)<=not(latch_cfm); --AMI(1)=‘1’表示负极性
CFM<=latch_cfm; --差分码信号
FXM<=latch_cnt xnor latch_sig; --分相码信号
if latch_sig='1' then CMI<=latch_cfm; --编码信号反转码
else CMI<=not(latch_cnt);
end if; endprocess;
end Behavioral;
自己的QUARTUS是15.0的 在网上也下了MODELSIM 但是建工程时不知道该用什么器件就用的默认的,仿真波形时候也不知道怎么开始, 仿真后MODELSIM有个小框 最后提示** Error: Error while reopening stdout stream! Error: couldn't open "C:/Users/????/AppData/Local/Temp/VSOUT00mtzw": no such file or directory
** Fatal: vsimk is exiting with code 7.
Exit codes are defined in the "Error and Warning Messages"
appendix of the ModelSim User's Manual.

Error. 这怎么解决?或者有谁能直接仿真出来给我说说怎么做 谢谢大家了 很着急!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2025-8-5 17:33 , Processed in 0.014777 second(s), 7 queries , Gzip On, Redis On.

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