ECE 448Lecture 13.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ECE 448Lecture 13.ppt

Sources Simple Testbench Advanced Testbench Assert Assert is a non-synthesizable statement whose purpose is to write out messages on the screen when problems are found during simulation. Depending on the severity of the problem, The simulator is instructed to continue simulation or halt. Assert - syntax ASSERT condition [REPORT message [SEVERITY severity_level ]; The message is written when the condition is FALSE. Severity_level can be: Note, Warning, Error (default), or Failure. Assert - Examples assert initial_value = max_value report initial value too large severity error; assert packet_length /= 0 report empty network packet received severity warning; assert false report Initialization complete severity ?note”; Report - syntax REPORT message [SEVERITY severity_level ]; The message is always written. Severity_level can be: Note (default), Warning, Error, or Failure. Report - Examples report Initialization complete; report Current time = timeimage(now); report Incorrect branch severity error; Report - Examples library IEEE; use IEEE.STD_LOGIC_1164.all; entity example_1_tb is end example_1_tb; architecture behavioral of example_1_tb is signal clk : std_logic := 0; begin clk = not clk after 100 ns; process begin wait for 1000 ns; report Initialization complete; report Current time = timeimage(now); wait for 1000 ns; report SIMULATION COMPLETED severity failure; end process; end behavioral; Records type opcodes is (add, sub, and, or); type reg_number is range 0 to 8; type instruction is record opcode : opcodes; source_reg1 : reg_number; source_reg2 : reg_number; dest_reg : reg_number; end record instruction; constant add_instr_1_3 : instruction:= (opcode = add, source_reg1 | dest_reg = 1, source_reg2 = 3); Variable – Example (1) LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY Numbits IS PORT ( X : IN STD_LOGIC_VECTOR(15 DOWNTO 0) ; Coun

文档评论(0)

gshshxx + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档