HTC

Example of MetaH Text


--
-- Code generated by the ArchEd code generator.
-- Configuration: default
-- Date:          23 September 1994
-- Time:          3:13:33 pm
--

port type PORT_TYPES is
    ANOTHER_TYPE : type;
    ANY_TYPE : type;
end PORT_TYPES;

port type implementation PORT_TYPES.I80960MC is
attributes
    ANY_TYPE'SourceDataSize := 16 B;
    ANY_TYPE'SourceFile := "port_types.a";
    ANOTHER_TYPE'SourceDataSize := 32 B;
    ANOTHER_TYPE'SourceFile := "port_types.a";
end PORT_TYPES.I80960MC;

with port type PORT_TYPES;
macro M is
    m_out : out port PORT_TYPES.ANY_TYPE;
    m_in : in port PORT_TYPES.ANY_TYPE;
end M;

with port type PORT_TYPES;
process P1 is
    p1_input : in port PORT_TYPES.ANY_TYPE;
    update : out port PORT_TYPES.ANOTHER_TYPE;
    feedback : in port PORT_TYPES.ANOTHER_TYPE;
end P1;

process implementation P1.EXAMPLE is
attributes
    self'Period := 25 ms;
    self'SourceFile := "p1_ports.a", "p1.a";
    self'SourceTime := 2 ms;
end P1.EXAMPLE;

with port type PORT_TYPES;
process P2 is
    p2_result : out port PORT_TYPES.ANY_TYPE;
    update : out port PORT_TYPES.ANOTHER_TYPE;
    feedback : in port PORT_TYPES.ANOTHER_TYPE;
end P2;

process implementation P2.EXAMPLE is
attributes
    self'Period := 50 ms;
    self'SourceFile := "p2_ports.a", "p2.a";
    self'SourceTime := 5 ms;
end P2.EXAMPLE;

macro implementation M.EXAMPLE is
    P2 : periodic process P2.EXAMPLE;
    P1 : periodic process P1.EXAMPLE;
connections
    P2.feedback <- P1.update; P1.feedback <- P2.update; m_out <- P2.p2_result; P1.p1_input <- m_in; end M.EXAMPLE; 

DSSA for GN&C Home Page