VHDL断言语句及报告语句.pptxVIP

  • 21
  • 0
  • 约小于1千字
  • 约 10页
  • 2017-06-10 发布于福建
  • 举报
VHDL语句;REPORT 语句; 例: RS触发器的VHDL描述中REPORT语句的使用。;BEGIN IF(s =‘1’AND r =‘1’)THEN REPORT “Both s and r equal to‘1’.”; ELSIF (s =‘0’AND r =‘0’)THEN last_state:= last_state; ELSIF (s =‘0’AND r =‘1’)THEN last_state := 0; ELSE last_state := 1; END IF; q = last_state; qb = not(last_state); END PROCESS; END rtl; ;断言语句(Assert);断言语句的使用规则:;例: RS触发器的VHDL描述中断言语句的使用;ARCHITECTURE rtl OF rsff IS BEGIN PROCESS(s,r) VARIABLE last_state :BIT; BEGIN ASSERT(NOT(s =‘1’AND r =‘1’)) REPORT “Both s and r equal to‘1’.” SEVERITY ERROR;; IF(s =‘0’AND r =‘0’)THEN last_state := last_state; ELSIF(s =‘0’AND r =‘1’)THEN last_state := 0; ELSE last_state := 1; END IF; q = last_state; qb = not(last_state); END PROCESS; END rtl;;谢谢观赏

文档评论(0)

1亿VIP精品文档

相关文档