电子设计自动化 授课教师:何旭
电子设计自动化 电子设计自动化 授课教师:何 旭
第六章全局考虑
第六章 全局考虑
第一节范围和可视性 第二节重载
第一节 范围和可视性 第二节 重载
第一节范围和可视性 信号和变量的作用域,从其声明的 地方到其所在描述单元的结束
第一节 范围和可视性 信号和变量的作用域,从其声明的 地方到其所在描述单元的结束
ARCHITECTURE overall of test IS 例 SIGNAL first sig: bit; I BEGIN process l: PROCeSS VARIABLE process sig: bit PROCEDURE inside ( variable data: OUT bit PROCEDURE inside (variable data: OUT bit)Is VARIABLE procedure var: bit BEGIN END inside
ARCHITECTURE overall OF test IS 例 1 SIGNAL first_sig: bit; BEGIN process1: PROCESS VARIABLE process_sig: bit; PROCEDURE inside (VARIABLE data: OUT bit); PROCEDURE inside (VARIABLE data: OUT bit) IS VARIABLE procedure_var: bit; BEGIN …… END inside;
BEGIN inside(in data) END PROCESS procesSI part of architecture body END oVeral
BEGIN inside (in_data); …… END PROCESS process1; -- part of architecture body END overall;
architecture overall of test is 例2 SIGNAL first sig: bit; BEGIN process l: PROCES VARIABLE: process sig: bit VARIABLE: first sig: bit PROCEDURE inside (variable data: oUT bit) PROCEDURE inside variable data: OUT bit)IS VARIABLE procedure var: bit BEGIN END inside
ARCHITECTURE overall OF test IS 例 2 SIGNAL first_sig : bit; BEGIN process1: PROCESS VARIABLE: process_sig: bit; VARIABLE:first_sig : bit; PROCEDURE inside (VARIABLE data: OUT bit); PROCEDURE inside (VARIABLE data: OUT bit) IS VARIABLE procedure_var: bit; BEGIN …… END inside;
architecture overall of test is 例2 SIGNAL first sigl≠bit BEGIN 隐藏 process l: PROCES VARIABLE: process sig: bit VARIABLE: first sig): bit PROCEDURE inside (variable data: oUT bit) PROCEDURE inside variable data: OUT bit)IS VARIABLE procedure var: bit BEGIN END inside
ARCHITECTURE overall OF test IS 例 2 SIGNAL first_sig : bit; BEGIN 隐藏 process1: PROCESS VARIABLE: process_sig: bit; VARIABLE:first_sig : bit; PROCEDURE inside (VARIABLE data: OUT bit); PROCEDURE inside (VARIABLE data: OUT bit) IS VARIABLE procedure_var: bit; BEGIN …… END inside;
BEGIN inside(in data) first sig -process sig overall. first sig first S1g END PROCESS processI part of architecture body END overa
BEGIN inside (in_data); first_sig := process_sig; overall.first_sig <= first_sig ; END PROCESS process1; -- part of architecture body END overall;
BEGIN inside(in data) first sig): =process_sig, overall. first sigk<=( first sig END PROCESS processI part of architecture body END overa
BEGIN inside (in_data); first_sig := process_sig; overall.first_sig <= first_sig ; END PROCESS process1; -- part of architecture body END overall;