AHDL


- 2


out : OUTPUT;

)

BEGIN

out = (ss_in == s2) OR (ss_in == s4);

END;

 

top1.tdf, , ss_def ss_use. ss_def ss_use MACHINE, .

 

FUNCTION ss_def (clk, reset, count)

RETURNS (MACHINE ss_out);

FUNCTION ss_use (MACHINE ss_in)

RETURNS (out);

 

SUBDESIGN top1

(

sys_clk, /reset, hold : INPUT;

sync_out : OUTPUT;

)

VARIABLE

ss_ref: MACHINE; % %

BEGIN

ss_ref = ss_def(sys_clk, !/reset, !hold);

sync_out = ss_use(ss_ref);

END;

 

TDF Variable. top2.tdf, , , top1.tdf, , .

 

FUNCTION ss_def (clk, reset, count)

RETURNS (MACHINE ss_out);

FUNCTION ss_use (MACHINE ss_in)

RETURNS (out);

 

SUBDESIGN top2

(

sys_clk, /reset, hold : INPUT;

sync_out : OUTPUT;

)

VARIABLE

sm_macro : ss_def;

sync : ss_use;

BEGIN

sm_macro.(clk, reset, count) = (sys_clk, !/reset, !hold);

sync.ss_in = sm_macro.ss_out;

sync_out = sync.out;

END;