quartus II 自动生成testbench
-- Copyright (C) - Altera Corporation
-- Your use of Altera Corporation's design tools, logic functions
-- and other software and tools, and its AMPP partner logic
-- functions, and any output files from any of the foregoing
-- (including device programming or simulation files), and any
-- associated documentation or information are expressly subject
-- to the terms and conditions of the Altera Program License
-- Subscription Agreement, Altera MegaCore Function License
-- Agreement, or other applicable license agreement, including,
-- without limitation, that your use is for the sole purpose of
-- programming logic devices manufactured by Altera and sold by
-- Altera or its authorized distributors. Please refer to the
-- applicable agreement for further details. -- ***************************************************************************
-- This file contains a Vhdl test bench template that is freely editable to
-- suit user's needs .Comments are provided in each section to help the user
-- fill out necessary details.
-- ***************************************************************************
-- Generated on "12/01/2015 20:34:30" -- Vhdl Test Bench template for design : f_adder
--
-- Simulation tool : ModelSim-Altera (VHDL)
-- LIBRARY ieee;
USE ieee.std_logic_1164.all; ENTITY f_adder_vhd_tst IS
END f_adder_vhd_tst;
ARCHITECTURE f_adder_arch OF f_adder_vhd_tst IS
-- constants
-- signals
SIGNAL ain : STD_LOGIC;
SIGNAL bin : STD_LOGIC;
SIGNAL cin : STD_LOGIC;
SIGNAL cout : STD_LOGIC;
SIGNAL sum : STD_LOGIC; --所要信号的声明
COMPONENT f_adder
PORT (
ain : IN STD_LOGIC;
bin : IN STD_LOGIC;
cin : IN STD_LOGIC;
cout : OUT STD_LOGIC;
sum : OUT STD_LOGIC
);
END COMPONENT;
BEGIN
i1 : f_adder
PORT MAP (
-- list connections between master ports and signals
ain => ain,
bin => bin,
cin => cin,
cout => cout,
sum => sum
);
init : PROCESS
-- variable declarations
BEGIN
-- code that executes only once
WAIT;
END PROCESS init;
always : PROCESS
-- optional sensitivity list
-- ( )
-- variable declarations
BEGIN
-- code executes for every event on sensitivity list
WAIT;
END PROCESS always;
END f_adder_arch;
这个时候若是直接把该文件进行仿真是不行的,因为里面的激励信号没有初始化(仿真出来的波形会是红色的不确定值)
可以根据需要把信号初始化,例如下面这种:
SIGNAL ain : STD_LOGIC :='';
SIGNAL bin : STD_LOGIC :='';
SIGNAL cin : STD_LOGIC :='';
SIGNAL cout : STD_LOGIC;
SIGNAL sum : STD_LOGIC;
quartus II 自动生成testbench的更多相关文章
- Quartus II 软件生成FFT、NCO、FIR等IP核时卡住不动的解决办法
据网友表示,遇到这个问题时,在任务管理器中手动关闭quartus_map进程就可以了,由于我的电脑最近一直没有出问题,因此也无法验证.欢迎大家针对这个问题讨论,提出肯定.否定的说法. 另外,很多人表示 ...
- Quartus ii 12.0 和ModelSim 10.1 SE安装及连接
quartus ii 10.0后就没有自带的仿真软件,每次写完一个VerilogHDL都想简单仿真一下,结果发现没有了自带仿真软件.这时候就需要第三方仿真软件ModelSim 10.1 SE. Qua ...
- Quartus 中调用modelsim的流程及*.vt或*.vht自动生成
一.自动生成验证程序testbench的方法,setting-EDA Tool->simylation->选择对应的语言(verilog对应*.vt,VHDL对应*.vht)process ...
- 关于网上quartus ii 生成fft核出现问题解决
------------恢复内容开始------------ 关于网上quartus ii 生成fft核出现问题解决 1:必须把软件破解啦 2:必须把IP核破解啦 破解步骤网上也有可以直接看,一定要全 ...
- FPGA —— Quartus II 15.0 使用 ModelSim SE-64 2019.2 软件进行仿真
Quartus II 15.0 使用 ModelSim SE-64 2019.2 软件进行仿真 ModelSim 仿真 Verilog HDL 时需要编写一个 TestBench 仿真文件,通过仿真文 ...
- 能否使用GHDL+GTKWave代替Quartus ii
能否使用GHDL+GTKWave代替Quartus ii macOS High Sierra系统 10.13.6 [toc] 先给出答案 可以替代一部分功能 如果你是一个学工科的学生,正在学习EDA. ...
- Quartus II 与 Modelsim 联调【转】
Quartus II 9.0版本的时候软件还有自带的仿真工具,现在安装的是11.0以上版本,才发现 Quartus II 11.0以上取消了软件自带的波形仿真工具,因此需要波形仿真就要调用专业的仿真工 ...
- 【转】Quartus II调用modelsim无缝仿真
Quartus II调用modelsim无缝仿真 ★emouse 思·睿博客文章★ 原创文章转载请注明:http://emouse.cnblogs.com 本篇文章为转载,写的不错,最近在学mode ...
- 关于Quartus II 13.0对应开发NIOS II软件程序时报错Symbol 'NULL' could not be resolved问题的解决方法
关于Quartus II 13.0对应开发NIOS II软件程序时报错Symbol 'NULL' could not be resolved问题的解决方法 近期在评估使用NIOS II处理器进行项目的 ...
随机推荐
- 使用FileZilla Server轻松搭建个人FTP服务器
Linux平台下快速搭建FTP服务器 服务器FTP Server环境搭建 针对以上遇到的问题的解决方案如下: 1)如何上传文件到云服务器上 关于这个问题,我首先想到的是使用FileZ ...
- Python字符串编码问题
编码问题:Unicode把所有语言都统一到一套编码里,这样就不会再有乱码问题了. ASCII编码和Unicode编码的区别:ASCII编码是1个字节,而Unicode编码通常是2个字节.字母A用ASC ...
- Python之模块篇
简介 你已经学习了如何在你的程序中定义一次函数而重用代码.如果你想要在其他程序中重用很多函数,那么你该如何编写程序呢?你可能已经猜到了,答案是使用模块.模块基本上就是一个包含了所有你定义的函数和变量的 ...
- &&运算符和||运算符的优先级问题
package priority; public class TestAndOrPriority { /* * &&的优先级高就不代表 他会先运行 ||的右边 而是说会把右边用& ...
- C语言字符串查找函数
#include <string.h> #include <stdio.h> char * string_search(char long_str[], char short_ ...
- Compass被墙后如何安装安装
今天安装 Compass 多时候发现竟然安装不了,且什么提示也没有,让人纳闷.安装代码如下: $ gem install compass 运行该段代码后发现没反应,也没有提示,后来网上查了才知道,竟然 ...
- struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
好久没有搞struts2,今天配置strut2.2.1,启动时遇到个小问题.记录下. tomcat启动报错: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...
- I.MX6 U-boot GPIO hacking
/******************************************************************************* * I.MX6 U-boot GPIO ...
- 【转】 当程序崩溃的时候怎么办 Part-2
转自:http://www.tairan.com/archives/1143 欢迎回到当程序崩溃的时候怎么办 教程! 在这个教程的第一部分,我们介绍了SIGABRT和EXC_BAD_ACCESS错误, ...
- 自定义 SharePoint 2010 快速启动栏和顶部链接栏
转:http://vickynuli.blog.163.com/blog/static/180438492201281434249486/ 在网上找到篇文章,自定义快速启动栏和顶部链接栏,以下为代码, ...