SCHEMA connectivity_structure_model; (* ** The connectivity_structure_model schema describes the structural ** connectivity information of a connectivity view. That includes definitions ** of connectivity_bus, connectivity_net and connectivity_ripper. *) REFERENCE FROM connectivity_view_model (internal_connectivity_view); REFERENCE FROM documentation_model (documentation); REFERENCE FROM edif_information_model (global_port, global_port_bundle); REFERENCE FROM hierarchy_model (instance_group_port, instance_group_port_bundle, instance_port, instance_port_bundle, interconnect_delay, master_port, master_port_bundle); REFERENCE FROM logical_connectivity_model (signal, signal_group); REFERENCE FROM support_definition_model (belongs_to_one, integer_token, name_information, not_defined, not_exists, property, there_exists, usedin_one_role); (* ** A connectivity_generic_net can be either a connectivity_net or a ** connectivity_sub_net. A connectivity_generic_net is used in the model ** because of the similarity between a connectivity_net and a ** connectivity_sub_net. A connectivity_net may be divided into ** connectivity_sub_nets and a connectivity_sub_net itself may also be divided ** into connectivity_sub_nets. No two connectivity_sub_nets at a given level ** may join to the same set of ports and rippers. *) ENTITY connectivity_generic_net ABSTRACT SUPERTYPE OF (ONEOF(connectivity_net, connectivity_sub_net)); associated_signal : signal; -- reference criticality : integer_token; delays : OPTIONAL SET [1:?] OF interconnect_delay; document : OPTIONAL SET [1:?] OF documentation; joined_global_ports : OPTIONAL SET [1:?] OF global_port; -- reference joined_instance_group_ports -- reference : OPTIONAL SET [1:?] OF instance_group_port; joined_instance_ports : OPTIONAL SET [1:?] OF instance_port; -- reference joined_master_ports : OPTIONAL SET [1:?] OF master_port; -- reference joined_rippers : OPTIONAL SET [1:?] OF -- reference connectivity_ripper; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; sub_nets : OPTIONAL SET [1:?] OF connectivity_sub_net; WHERE valid_sub_nets : (* No two connectivity_sub_nets may refer to the same set of ports and rippers. *) not_exists(QUERY(net1 <* sub_nets | there_exists(QUERY(net2 <* sub_nets - net1 | (net1.joined_global_ports = net2.joined_global_ports) AND (net1.joined_instance_group_ports = net2.joined_instance_group_ports) AND (net1.joined_instance_ports = net2.joined_instance_ports) AND (net1.joined_master_ports = net2.joined_master_ports) AND (net1.joined_rippers = net2.joined_rippers))))); END_ENTITY; (* ** A connectivity_net is defined as a structured representation of connectivity ** in a connectivity view. It is only allowed in an ** internal_connectivity_view. Its associated signal must be defined in its ** containing view. At most one connectivity_net may be defined for a given ** signal. The global_ports, instance_ports and master_ports joined by a ** connectivity_net must be a subset of the ones joined by its associated ** signal. Also, all joined connectivity_rippers must be defined in the ** containing view. If a connectivity_net joins to ports on instance_groups, ** then all joined instance_groups must be defined in the containing view. ** Furthermore, the list of instance_ports joined implicitly (via joining ** instance_group_port) must be a subset of the instance_ports joined by its ** associated signal. *) ENTITY connectivity_net SUBTYPE OF (connectivity_generic_net); DERIVE containing_view : internal_connectivity_view -- reference := usedin_one_role(SELF, 'connectivity_view_model.internal_connectivity_view.nets'); UNIQUE unique_net_constraint : (* At most one connectivity_net may be defined for a given signal.*) associated_signal; WHERE containment_constraint : (* A connectivity_net belongs to one internal_connectivity_view. *) belongs_to_one(SELF, 'connectivity_view_model.internal_connectivity_view.nets'); valid_associated_signal : (* The signal associated with a connectivity_net is defined in the containing internal_connectivity_view. *) associated_signal IN containing_view.signals; valid_joined_instance_group_ports : (* The joined instance_group_ports must reference to instance_groups which are defined in the containing internal_connectivity_view. *) not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (instanceGroupPort.referenced_instance_group IN containing_view.instance_groups))); valid_joined_instance_group_ports_in_associated_signal : (* The flattened list of instance_ports of each joined instance_group_port must be a subset of the instance_ports joined by the associated signal of the connectivity_net. *) not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (instanceGroupPort.flattened_port_list <= associated_signal.joined_instance_ports))); valid_joined_ports : (* The ports joined by a connectivity_net must be a subset of the connectivity of the associated signal of the connectivity_net. *) (joined_global_ports <= associated_signal.joined_global_ports) AND (joined_instance_ports <= associated_signal.joined_instance_ports) AND (joined_master_ports <= associated_signal.joined_master_ports); valid_joined_rippers : (* The rippers joined by a connectivity_net must be defined in the containing internal_connectivity_view. *) joined_rippers <= containing_view.rippers; END_ENTITY; (* ** A connectivity_sub_net must only join to ports and rippers which are already ** joined by its immediately containing connectivity_generic_net. In addition, ** its associated signal must be the same as its immediately containing ** connectivity_generic_net. *) ENTITY connectivity_sub_net SUBTYPE OF (connectivity_generic_net); DERIVE containing_net : connectivity_generic_net -- reference := usedin_one_role(SELF, 'connectivity_structure_model.connectivity_generic_net.sub_nets'); WHERE containment_constraint : (* A connectivity_sub_net belongs to one connectivity_generic_net. *) belongs_to_one(SELF, 'connectivity_structure_model.connectivity_generic_net.sub_nets'); valid_associated_signal : (* The signal associated with a connectivity_sub_net is same as its immediately containing connectivity_generic_net. *) associated_signal :=: containing_net.associated_signal; valid_joined_ports_and_rippers : (* The ports and rippers joined by a connectivity_sub_net must be a subset of the ports and rippers joined by its immediately containing connectivity_generic_net. *) (joined_global_ports <= containing_net.joined_global_ports) AND (joined_instance_group_ports <= containing_net.joined_instance_group_ports) AND (joined_instance_ports <= containing_net.joined_instance_ports) AND (joined_master_ports <= containing_net.joined_master_ports) AND (joined_rippers <= containing_net.joined_rippers); END_ENTITY; (* ** A connectivity_generic_bus can be either a connectivity_bus, a ** connectivity_bus_slice or a connectivity_sub_bus. A ** connectivity_generic_bus is used in the model because of the similarity ** between a connectivity_bus, a connectivity_bus_slice and a ** connectivity_sub_bus. They may all contain connectivity_bus_slices and ** connectivity_sub_busses. No two connectivity_bus_slices at a given level ** may be associated with the same signal_group. No two ** connectivity_sub_busses at a given level may join to the same set of ports ** and rippers. All joined ports or port_bundles (including global_ports, ** global_port_bundles, instance_ports, instance_port_bundles, master_ports and ** master_port_bundles) must be the same size as the flattened signal_group. ** Each single port of the joined port_bundles must be mentioned in the ** corresponding signal within the flattened signal_group. ** However, when a connectivity_generic_bus joins to ports or port_bundles on ** instance_groups, there are two ways of interpreting the underlying ** connectivity. The first way, similar as above, each joined port or ** port_bundles (via instance_group_port and instance_group_port_bundle) must ** be the same size as the flattened signal_group. The second way requires ** flattening the joined ports or port_bundles on instance_groups. Each ** flattened instance_group_port and instance_group_port_bundle must be the ** same size as the flattened signal_group. When an instance_group_port is ** flattened (refer to the function flattened_instance_group_port in the ** hierarchy_model), it returns a list of instance_ports which the size of the ** list must be equal to the instance_group size (that is, the number of ** member_instances within the instance_group). On the other hand, when an ** instance_group_port_bundle is flattened (refer to the function ** flattened_instance_group_port_bundle in the hierarchy_model), it returns a ** list of instance_ports which the size of the list must be equal to the ** product of the instance_group size and the port_bundle size. The ordering ** for flattening is that instances vary slowest and ports vary fastest. ** Finally, each instance_port of the flattened instance_port list must be ** mentioned in the corresponding signal within the flattened signal_group. ** For example, if a bus structure is associated with a signal_group of width ** 8, it is valid to join to the following ports of various sizes: ** flattened_instance_group_port (instance_group size = 8, port width = 1) ** flattened_instance_group_port_bundle (instance_group size = 2, ** port_bundle width = 4) ** flattened_instance_group_port_bundle (instance_group size = 4, ** port_bundle width = 2) ** instance_group_port_bundle (port_bundle width = 8) ** global_port_bundle (width = 8) ** instance_port_bundle (width 8) ** master_port_bundle (width 8) *) ENTITY connectivity_generic_bus ABSTRACT SUPERTYPE OF (ONEOF(connectivity_bus, connectivity_bus_slice, connectivity_sub_bus)); associated_signal_group : signal_group; -- reference bus_slices : OPTIONAL SET [1:?] OF connectivity_bus_slice; containing_bus : OPTIONAL connectivity_generic_bus; -- reference criticality : integer_token; delays : OPTIONAL SET [1:?] OF interconnect_delay; document : OPTIONAL SET [1:?] OF documentation; joined_flattened_instance_group_ports -- reference : OPTIONAL SET [1:?] OF instance_group_port; joined_flattened_instance_group_port_bundles -- reference : OPTIONAL SET [1:?] OF instance_group_port_bundle; joined_global_ports : OPTIONAL SET [1:?] OF global_port; -- reference joined_global_port_bundles -- reference : OPTIONAL SET [1:?] OF global_port_bundle; joined_instance_group_ports -- reference : OPTIONAL SET [1:?] OF instance_group_port; joined_instance_group_port_bundles -- reference : OPTIONAL SET [1:?] OF instance_group_port_bundle; joined_instance_ports : OPTIONAL SET [1:?] OF instance_port; -- reference joined_instance_port_bundles -- reference : OPTIONAL SET [1:?] OF instance_port_bundle; joined_master_ports : OPTIONAL SET [1:?] OF master_port; -- reference joined_master_port_bundles -- reference : OPTIONAL SET [1:?] OF master_port_bundle; joined_rippers : OPTIONAL SET [1:?] OF -- reference connectivity_ripper; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; sub_busses : OPTIONAL SET [1:?] OF connectivity_sub_bus; DERIVE signal_group_width : INTEGER := SIZEOF(associated_signal_group.flattened_signal_list); WHERE valid_joined_port_size : (* All joined global_ports, global_port_bundles, instance_group_ports, instance_group_port_bundles, instance_ports, instance_port_bundles, master_ports and master_port_bundles must have the same port size as the flattened signal_group. Moreover, the size of each joined flattened instance_group_port or instance_group_port_bundle must be equal to the size of the flattened signal_group. *) (not_exists(QUERY(joinedPort <* joined_global_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_global_port_bundles | joinedPortBundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_instance_group_ports | joinedPort.referenced_master_port.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <*joined_instance_group_port_bundles| joinedPortBundle.referenced_master_port_bundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_instance_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_instance_port_bundles | joinedPortBundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_master_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_master_port_bundles | joinedPortBundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_flattened_instance_group_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_flattened_instance_group_port_bundles | joinedPortBundle.width <> signal_group_width))); valid_joined_simple_ports : (* Each simple port must be mentioned in the corresponding signal within the flattened signal_group. Moreover, the flattened list of instance_ports of each joined instance_group_port must be mentioned in the corresponding signal within the flattened signal_group. *) (joined_global_ports <= associated_signal_group.flattened_signal_list[1].joined_global_ports) AND (joined_instance_ports <= associated_signal_group.flattened_signal_list[1].joined_instance_ports) AND (joined_master_ports <= associated_signal_group.flattened_signal_list[1].joined_master_ports) AND not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (instanceGroupPort.flattened_port_list <= associated_signal_group.flattened_signal_list[1].joined_instance_ports))); valid_joined_port_bundles : (* Each single port of the joined wide ports must be mentioned in the corresponding signal within the flattened signal_group. *) bus_joined_ports_in_parallel(associated_signal_group.flattened_signal_list, joined_flattened_instance_group_ports, joined_flattened_instance_group_port_bundles, joined_global_port_bundles, joined_instance_group_port_bundles, joined_instance_port_bundles, joined_master_port_bundles); valid_bus_slices : (* No two bus_slices within a connectivity_generic_bus may refer to the same signal_group. *) not_exists(QUERY(busSlice1 <* bus_slices | there_exists(QUERY(busSlice2 <* bus_slices - busSlice1 | busSlice1.associated_signal_group :=: busSlice2.associated_signal_group)))); valid_sub_busses : (* No two sub_busses within a connectivity_generic_bus may refer to the same set of ports and rippers. *) not_exists(QUERY(bus1 <* sub_busses | there_exists(QUERY(bus2 <* sub_busses - bus1 | (bus1.joined_flattened_instance_group_ports = bus2.joined_flattened_instance_group_ports) AND (bus1.joined_flattened_instance_group_port_bundles = bus2.joined_flattened_instance_group_port_bundles) AND (bus1.joined_global_ports = bus2.joined_global_ports) AND (bus1.joined_global_port_bundles = bus2.joined_global_port_bundles) AND (bus1.joined_master_ports = bus2.joined_master_ports) AND (bus1.joined_master_port_bundles = bus2.joined_master_port_bundles) AND (bus1.joined_instance_group_ports = bus2.joined_instance_group_ports) AND (bus1.joined_instance_group_port_bundles = bus2.joined_instance_group_port_bundles) AND (bus1.joined_instance_ports = bus2.joined_instance_ports) AND (bus1.joined_instance_port_bundles = bus2.joined_instance_port_bundles) AND (bus1.joined_rippers = bus2.joined_rippers))))); END_ENTITY; (* ** A connectivity_bus is defined as a structured representation of the ** connectivity of a connectivity view. It is only allowed in an ** internal_connectivity_view. Its associated signal_group must be defined in ** its containing view. At most one connectivity_bus may be defined for a ** given signal_group. A connectivity_bus may be subdivided into two ** orthogonal ways. It may be divided into connectivity_bus_slices or into ** connectivity_sub_busses. Also, all joined connectivity_rippers must be ** defined in the containing view. If a connectivity_bus joins to ports or ** port_bundles on instance_groups, then all joined instance_groups must be ** defined in the containing view. *) ENTITY connectivity_bus SUBTYPE OF (connectivity_generic_bus); DERIVE containing_view : internal_connectivity_view -- reference := usedin_one_role(SELF, 'connectivity_view_model.internal_connectivity_view.busses'); UNIQUE unique_bus_constraint : (* At most one connectivity_bus may be defined for a given signal_group.*) associated_signal_group; WHERE containment_constraint : (* A connectivity_bus belongs to one internal_connectivity_view. *) belongs_to_one(SELF, 'connectivity_view_model.internal_connectivity_view.busses'); valid_associated_signal_group : (* The signal_group associated with a connectivity_bus is defined in the containing internal_connectivity_view. *) associated_signal_group IN containing_view.signal_groups; valid_joined_instance_group_ports_or_port_bundles : (* The joined instance_group_ports and instance_group_port_bundles must reference to instance_groups which are defined in the containing internal_connectivity_view. *) not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (instanceGroupPort.referenced_instance_group IN containing_view.instance_groups))) AND not_exists(QUERY(instanceGroupPortBundle <* joined_instance_group_port_bundles| NOT (instanceGroupPortBundle.referenced_instance_group IN containing_view.instance_groups))); valid_joined_rippers : (* Rippers joined by a connectivity_bus must be defined in the containing internal_connectivity_view. *) joined_rippers <= containing_view.rippers; END_ENTITY; (* ** A connectivity_bus_slice is used to define part of a connectivity_bus that ** has a width less than the width of the immediately enclosing ** connectivity_generic_bus. Its associated signal_group must be a member of ** the signal_group associated with its immediately containing ** connectivity_generic_bus. All joined connectivity_rippers must be defined ** in the containing view. *) ENTITY connectivity_bus_slice SUBTYPE OF (connectivity_generic_bus); DERIVE containing_bus : connectivity_generic_bus -- reference := usedin_one_role(SELF, 'connectivity_structure_model.connectivity_generic_bus.bus_slices'); containing_view : internal_connectivity_view -- reference := containing_view_of_connectivity_bus_structure(SELF); WHERE containment_constraint : (* A connectivity_bus_slice belongs to one connectivity_generic_bus. *) belongs_to_one(SELF, 'connectivity_structure_model.connectivity_generic_bus.bus_slices'); valid_associated_signal_group : (* The signal_group associated with a connectivity_bus_slice is a member of the signal_group associated with its immediately containing connectivity_generic_bus.*) not_defined; valid_joined_rippers : (* Rippers joined by a connectivity_bus_slice must be defined in the containing internal_connectivity_view. *) joined_rippers <= containing_view.rippers; END_ENTITY; (* ** A connectivity_sub_bus has the same width as the connectivity_generic_bus ** immediately containing it. It associated signal_group is the same as its ** immediately containing connectivity_generic_bus. A connectivity_sub_bus ** must only join to ports and rippers which are already joined by its ** immediately containing connectivity_generic_bus. *) ENTITY connectivity_sub_bus SUBTYPE OF (connectivity_generic_bus); DERIVE containing_bus : connectivity_generic_bus -- reference := usedin_one_role(SELF, 'connectivity_structure_model.connectivity_generic_bus.sub_busses'); WHERE containment_constraint : (* A connectivity_sub_bus belongs to one connectivity_generic_bus. *) belongs_to_one(SELF, 'connectivity_structure_model.connectivity_generic_bus.sub_busses'); valid_associated_signal_group : (* The signal_group associated with a connectivity_sub_bus is same as its immediately containing connectivity_generic_bus. *) associated_signal_group :=: containing_bus.associated_signal_group; valid_joined_ports_and_rippers : (* The ports and rippers joined by a connectivity_sub_bus must be a subset of the ports and rippers joined by its immediately containing connectivity_generic_bus. *) (joined_flattened_instance_group_ports <= containing_bus.joined_flattened_instance_group_ports) AND (joined_flattened_instance_group_port_bundles <= containing_bus.joined_flattened_instance_group_port_bundles) AND (joined_global_ports <= containing_bus.joined_global_ports) AND (joined_global_port_bundles <= containing_bus.joined_global_port_bundles) AND (joined_instance_group_ports <= containing_bus.joined_instance_group_ports) AND (joined_instance_group_port_bundles <= containing_bus.joined_instance_group_port_bundles) AND (joined_instance_ports <= containing_bus.joined_instance_ports) AND (joined_instance_port_bundles <= containing_bus.joined_instance_port_bundles) AND (joined_master_ports <= containing_bus.joined_master_ports) AND (joined_master_port_bundles <= containing_bus.joined_master_port_bundles) AND (joined_rippers <= containing_bus.joined_rippers); END_ENTITY; (* ** The bus_joined_ports_in_parallel function returns true if all wide ports are ** joined in parallel. That is, each single port of the joined wide ports must ** be mentioned in the corresponding signal of the flattened signal_group. *) FUNCTION bus_joined_ports_in_parallel (flattenedSignalList : LIST OF signal; flattenedInstanceGroupPorts : SET OF instance_group_port; flattenedInstanceGroupPortBundles : SET OF instance_group_port_bundle; globalPortBundles : SET OF global_port_bundle; instanceGroupPortBundles : SET OF instance_group_port_bundle; instancePortBundles : SET OF instance_port_bundle; masterPortBundles : SET OF master_port_bundle) : BOOLEAN; LOCAL instanceIndex, portIndex, signalIndex : INTEGER; currentSignal : signal; END_LOCAL; REPEAT signalIndex := 1 TO HIINDEX(flattenedSignalList); currentSignal := flattenedSignalList[signalIndex]; REPEAT portIndex := 1 TO HIINDEX(flattenedInstanceGroupPorts); IF NOT (flattenedInstanceGroupPorts[portIndex] .flattened_port_list[signalIndex] IN currentSignal.joined_instance_ports) THEN RETURN(FALSE); END_IF; END_REPEAT; -- checking all flattened instance_group_ports REPEAT portIndex := 1 TO HIINDEX(flattenedInstanceGroupPortBundles); IF NOT (flattenedInstanceGroupPortBundles[portIndex] .flattened_port_list[signalIndex] IN currentSignal.joined_instance_ports) THEN RETURN(FALSE); END_IF; END_REPEAT; -- checking all flattened instance_group_port_bundles REPEAT portIndex := 1 TO HIINDEX(globalPortBundles); IF NOT (globalPortBundles[portIndex].flattened_port_list[signalIndex] IN currentSignal.joined_global_ports) THEN RETURN(FALSE); END_IF; END_REPEAT; -- checking all global_port_bundles REPEAT portIndex := 1 TO HIINDEX(instanceGroupPortBundles); REPEAT instanceIndex := 1 TO HIINDEX(instanceGroupPortBundles[portIndex].member_instances); IF NOT (instanceGroupPortBundles[portIndex] .flattened_port_list[instanceIndex*signalIndex] IN currentSignal.joined_instance_ports) THEN RETURN(FALSE); END_IF; END_REPEAT; END_REPEAT; -- checking all instance_group_port_bundles REPEAT portIndex := 1 TO HIINDEX(instancePortBundles); IF NOT (instancePortBundles[portIndex].flattened_port_list[signalIndex] IN currentSignal.joined_instance_ports) THEN RETURN(FALSE); END_IF; END_REPEAT; -- checking all instance_port_bundles REPEAT portIndex := 1 TO HIINDEX(masterPortBundles); IF NOT (masterPortBundles[portIndex].flattened_port_list[signalIndex] IN currentSignal.joined_master_ports) THEN RETURN(FALSE); END_IF; END_REPEAT; -- checking all master_port_bundles END_REPEAT; -- checking all signals RETURN(TRUE); END_FUNCTION; (* ** A connectivity_ripper is used to define a relationship between net and ** bus structures. *) ENTITY connectivity_ripper; DERIVE related_nets : SET OF connectivity_generic_net -- reference := usedin_one_role(SELF, 'connectivity_structure_model.connectivity_generic_net.joined_rippers'); related_busses : SET [1:?] OF connectivity_generic_bus -- reference := usedin_one_role(SELF, 'connectivity_structure_model.connectivity_generic_bus.joined_rippers'); WHERE containment_constraint : (* A connectivity_ripper belongs to one internal_connectivity_view. *) belongs_to_one(SELF, 'connectivity_view_model.internal_connectivity_view.rippers'); valid_related_busses_and_nets : (* All related bus/net structures must belong to the same view. For each related bus/net structure, there exists at least another bus/net structure which shares at least one common signal. *) not_defined; END_ENTITY; (* ** The containing_view_of_connectivity_bus_structure returns the connectivity ** view containing the connectivity bus structure. *) FUNCTION containing_view_of_connectivity_bus_structure (busStructure : connectivity_generic_bus) : internal_connectivity_view; IF 'connectivity_structure_model.connectivity_bus' IN TYPEOF(busStructure) THEN RETURN(busStructure.containing_view); ELSE RETURN(containing_view_of_connectivity_bus_structure -- recursion (busStructure.containing_bus)); END_IF; END_FUNCTION; END_SCHEMA; SCHEMA connectivity_view_model; (* ** The connectivity_view_model schema describes what information can be found ** in an EDIF connectivity view. The connectivity view conveys hierarchical ** and connectivity information. It corresponds to the netlist viewtype in ** EDIF Version 2 0 0. *) REFERENCE FROM hierarchy_model (external_cell_representation, instance, instance_group, internal_cell_representation, timing); REFERENCE FROM logical_connectivity_model (global_port_scope, signal, signal_group); REFERENCE FROM connectivity_structure_model (connectivity_bus, connectivity_net, connectivity_ripper); REFERENCE FROM support_definition_model (belongs_to_one, capacitance_unit, not_defined, not_exists, there_exists, time_unit); (* ** An internal_connectivity_view is a cell representation which describes ** connectivity. It conveys hierarchy information and connectivity ** information. The hierarchy information describes how a circuit is broken ** down into a number of cells. The connectivity information defines how ** circuits are connected. No connectivity implementation details are ** specified in a internal_connectivity_view. *) ENTITY internal_connectivity_view SUBTYPE OF (internal_cell_representation); busses : OPTIONAL SET [1:?] OF connectivity_bus; global_port_scopes : OPTIONAL SET [1:?] OF global_port_scope; instances : OPTIONAL SET [1:?] OF instance; instance_groups : OPTIONAL SET [1:?] OF instance_group; nets : OPTIONAL SET [1:?] OF connectivity_net; rippers : OPTIONAL SET [1:?] OF connectivity_ripper; signals : OPTIONAL SET [1:?] OF signal; signal_groups : OPTIONAL SET [1:?] OF signal_group; timings : OPTIONAL SET [1:?] OF timing; units : connectivity_units; WHERE valid_instances : (* An internal_connectivity_view should not contain instances of clusters of the containing_cell either directly or indirectly. *) not_defined; valid_instance_groups : (* All member instances of each instance_group must be defined in the containing internal_connectivity_view. *) not_defined; valid_signals : (* All signals are disjoint. That is only one signal may connect to a particular master_port or instance_port. *) not_exists(QUERY(signal_1 <* signals | there_exists(QUERY(signal_2 <* signals - signal_1 | there_exists(signal_1.joined_ports * signal_2.joined_ports))))); END_ENTITY; (* ** An external_connectivity_view is a connectivity view found in an ** external_cell. *) ENTITY external_connectivity_view SUBTYPE OF (external_cell_representation); units : connectivity_units; END_ENTITY; ENTITY connectivity_units; set_capacitance : capacitance_unit; set_time : time_unit; END_ENTITY; END_SCHEMA; SCHEMA geometry_model; REFERENCE FROM support_definition_model (integer_distance_value, not_defined, number_distance_value); (* ** A geometry_element describes geometry definition in EDIF. This includes ** dot, circle, polygon, rectangle, shape, openShape and path. In addition, ** property is removed from geometry definition, which differs from EDIF ** Version 2 0 0. *) ENTITY geometry_element ABSTRACT SUPERTYPE OF (ONEOF(dot, closed_area_element, open_element)); END_ENTITY; ENTITY dot SUBTYPE OF (geometry_element); position : integer_point; END_ENTITY; ENTITY closed_area_element ABSTRACT SUPERTYPE OF (ONEOF(circle, polygon, rectangle, shape)) SUBTYPE OF (geometry_element); END_ENTITY; ENTITY open_element ABSTRACT SUPERTYPE OF (ONEOF(path, open_shape)) SUBTYPE OF (geometry_element); END_ENTITY; ENTITY circle SUBTYPE OF (closed_area_element); diameter : line_segment; END_ENTITY; ENTITY polygon SUBTYPE OF (closed_area_element); segments : LIST [3:?] OF line_segment; WHERE joined_segments : (* All adjacent segments are joined. *) connected(segments); closed_element : (* The first segment is joined with the last segment. *) segments[1].start_point = segments[HIINDEX(segments)].end_point; not_self_intersecting : (* A polygon may not intersect or touch itself, nor have coincidence segments. *) not_defined; END_ENTITY; ENTITY rectangle SUBTYPE OF (closed_area_element); diagonal : line_segment; DERIVE segments : LIST [4:4] OF line_segment := find_segments(diagonal.start_point, diagonal.end_point); END_ENTITY; ENTITY shape SUBTYPE OF (closed_area_element); segments : LIST [2:?] OF arc_or_line_segment; WHERE joined_segments : (* All adjacent segments are joined. *) connected(segments); closed_element : (* the first segment is joined with the last segment. *) segments[1].start_point = segments[HIINDEX(segments)].end_point; not_self_intersecting : (* A shape must not intersect or touch itself, nor have coincidence segments. *) not_defined; END_ENTITY; ENTITY path SUBTYPE OF (open_element); segments : LIST [1:?] OF line_segment; WHERE joined_segments : (* All adjacent segments are joined. *) connected(segments); END_ENTITY; ENTITY open_shape SUBTYPE OF (open_element); segments : LIST [1:?] OF arc_or_line_segment; WHERE joined_segments : (* All adjacent segments are joined. *) connected(segments); END_ENTITY; (* ** An arc_or_line_segment is used to describe the concept of curve in EDIF. ** Curve is described by a list of arc_or_line_segment. *) TYPE arc_or_line_segment = SELECT (arc, line_segment); END_TYPE; ENTITY arc ; start_point : integer_point; through_point : number_point; end_point : integer_point; WHERE distinct_points : (* The three points of the arc specification must be distinct. *) (start_point <> through_point) AND (through_point <> end_point) AND (start_point <> end_point); the_three_points_should_not_lie_on_a_straight_line : not_defined; END_ENTITY; (* ** A line_segment is defined by two points which specify the starting point and ** the end point of a line segment. The starting and the end points need not ** be distinct. *) ENTITY line_segment; start_point : integer_point; end_point : integer_point; END_ENTITY; ENTITY integer_point; x_coordinate, y_coordinate : integer_distance_value; END_ENTITY; ENTITY number_point; x_coordinate, y_coordinate : number_distance_value; END_ENTITY; FUNCTION connected (segments : LIST OF arc_or_line_segment) : BOOLEAN; LOCAL i : INTEGER; END_LOCAL; REPEAT i := 1 TO HIINDEX(segments)-1; IF segments[i].end_point <> segments[i+1].start_point THEN RETURN(FALSE); END_IF; END_REPEAT; RETURN(TRUE); END_FUNCTION; FUNCTION find_segments (p1, p2 : integer_point) : AGGREGATE OF line_segment; -- points p1, p2 and points p3, p4 are end-points of two diagonals LOCAL lines : LIST OF line_segment := [ ]; p3, p4 : integer_point; END_LOCAL; p3.x_coordinate := p2.x_coordinate; p3.y_coordinate := p1.y_coordinate; p4.x_coordinate := p1.x_coordinate; p4.y_coordinate := p2.y_coordinate; lines[1].start_point := p1; lines[1].end_point := p3; lines[2].start_point := p3; lines[2].end_point := p2; lines[3].start_point := p2; lines[3].end_point := p4; lines[4].start_point := p4; lines[4].end_point := p1; RETURN(lines); END_FUNCTION; END_SCHEMA; SCHEMA hierarchy_model; (* ** The hierarchy_model schema describes the hierarchical information of a cell, ** which is the basic unit of design. *) REFERENCE FROM connectivity_structure_model (connectivity_generic_bus, connectivity_generic_net); REFERENCE FROM connectivity_view_model (external_connectivity_view, internal_connectivity_view); REFERENCE FROM design_management_model (copyright, written); REFERENCE FROM display_model (display); REFERENCE FROM documentation_model (documentation); REFERENCE FROM library_model (library); REFERENCE FROM schematic_implementation_model (schematic_generic_bus, schematic_generic_net); REFERENCE FROM schematic_view_model (external_schematic_symbol, external_schematic_view, internal_schematic_symbol, internal_schematic_view); REFERENCE FROM support_definition_model (belongs_to_one, capacitance_unit, capacitance_value, either_belongs_to_one, name_information, not_defined, not_exists, number_token, positive_integer_token, private_property, property, property_override, string_token, there_exists, time_unit, time_value, undefined_type, usedin_one_role); REFERENCE FROM unfinished_view_model; (* ** A cell contains clusters which may be instantiated later in another cell to ** build a design hierarchy. A cell is allowed to have multiple symbols as ** well as multiple views of the same type. Views and symbols which share the ** same interface are grouped into a cluster. Views and symbols may also be ** grouped into a view_group to indicate a particularly close relationship to ** each other. A cell is classified into internal_cell and external_cell. *) ENTITY cell ABSTRACT SUPERTYPE OF (ONEOF(internal_cell, external_cell)); clusters : OPTIONAL SET [1:?] OF cluster; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; view_groups : OPTIONAL SET [1:?] OF view_group; DERIVE containing_library : library -- reference := usedin_one_role(SELF, 'library_model.library.cells'); END_ENTITY; ENTITY internal_cell SUBTYPE OF (cell); SELF\cell.clusters : OPTIONAL SET [1:?] OF internal_cluster; SELF\cell.view_groups : OPTIONAL SET [1:?] OF internal_view_group; WHERE containment_constraint : (* An internal_cell belongs to one internal_library. *) belongs_to_one(SELF, 'library_model.internal_library.cells'); END_ENTITY; ENTITY external_cell SUBTYPE OF (cell); SELF\cell.clusters : OPTIONAL SET [1:?] OF external_cluster; SELF\cell.view_groups : OPTIONAL SET [1:?] OF external_view_group; WHERE containment_constraint : (* An external_cell belongs to one external_library. *) belongs_to_one(SELF, 'library_model.external_library.cells'); END_ENTITY; (* ** A cluster is a group of views and symbols which have the same interface. ** Those views and symbols must belong to the same cell. *) ENTITY cluster ABSTRACT SUPERTYPE OF (ONEOF(internal_cluster, external_cluster)); cell_representations : OPTIONAL SET [1:?] OF cell_representation; view_configurations : OPTIONAL SET [1:?] OF view_configuration; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; interface : cluster_interface; properties : OPTIONAL SET [1:?] OF property; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; DERIVE containing_cell : cell -- reference := usedin_one_role(SELF, 'hierarchy_model.cell.clusters'); WHERE valid_view_configurations : (* All view_configurations must choose cell_representations which are defined in the cluster and the chosen cell_representations must be view representations. *) not_exists(QUERY(configuration <* view_configurations | NOT (configuration.chosen_representation IN cell_representations))) AND not_exists(QUERY(configuration <* view_configurations | TYPEOF(configuration.chosen_representation) IN ['hierarchy_model.internal_schematic_symbol', 'hierarchy_model.external_schematic_symbol'])); END_ENTITY; ENTITY internal_cluster SUBTYPE OF (cluster); SELF\cluster.cell_representations : OPTIONAL SET [1:?] OF internal_cell_representation; WHERE containment_constraint : (* An internal_cluster belongs to one internal_cell. *) belongs_to_one(SELF, 'hierarchy_model.internal_cell.clusters'); END_ENTITY; ENTITY external_cluster SUBTYPE OF (cluster); SELF\cluster.cell_representations : OPTIONAL SET [1:?] OF external_cell_representation; WHERE containment_constraint : (* An external_cluster belongs to one external_cell. *) belongs_to_one(SELF, 'hierarchy_model.external_cell.clusters'); END_ENTITY; ENTITY view_configuration; chosen_representation : cell_representation; -- reference instance_configurations : OPTIONAL SET [1:?] OF instance_configuration; WHERE containment_constraint : (* A view_configuration belongs to one cluster. *) belongs_to_one(SELF, 'hierarchy_model.cluster.view_configurations'); valid_instance_configurations : (* The expanded instances are defined in the chosen cell_representation. *) not_defined; END_ENTITY; ENTITY instance_configuration; chosen_instance : instance; -- reference chosen_configuration : view_configuration; -- reference WHERE valid_chosen_configuration : (* The chosen view_configuration is defined in the instantiated cluster of the chosen instance. *) chosen_configuration IN chosen_instance.instantiated_cluster.view_configurations; END_ENTITY; (* ** A view_group is a group of views and symbols which belong to the same cell. ** There are various reasons for grouping. It is used to express a relationship ** between any number of views of any type. *) ENTITY view_group SUPERTYPE OF (ONEOF(internal_view_group, external_view_group)); cell_representations : OPTIONAL SET [1:?] OF -- reference cell_representation; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; nested_view_groups : OPTIONAL SET [1:?] OF view_group; -- reference properties : OPTIONAL SET [1:?] OF private_property; reason : OPTIONAL string_token; DERIVE containing_cell : cell -- reference := usedin_one_role(SELF, 'hierarchy_model.cell.view_groups'); WHERE valid_cell_representations : (* All member views and symbols are defined in the containing cell of the view_group. *) not_exists(QUERY(member_representation <* cell_representations | member_representation.containing_cell :<>: containing_cell)); valid_nested_view_groups : (* All cell_representations within nested_view_groups must belong to the containing cell of the view_group. *) not_defined; END_ENTITY; ENTITY internal_view_group SUBTYPE OF (view_group); SELF\view_group.cell_representations : OPTIONAL SET [1:?] OF -- reference internal_cell_representation; SELF\view_group.nested_view_groups : OPTIONAL SET [1:?] OF -- reference internal_view_group; WHERE containment_constraint : (* An internal_view_group belongs to one internal_cell. *) belongs_to_one(SELF, 'hierarchy_model.internal_cell.view_groups'); END_ENTITY; ENTITY external_view_group SUBTYPE OF (view_group); SELF\view_group.cell_representations : OPTIONAL SET [1:?] OF -- reference external_cell_representation; SELF\view_group.nested_view_groups : OPTIONAL SET [1:?] OF -- reference external_view_group; WHERE containment_constraint : (* An external_view_group belongs to one external_cell. *) belongs_to_one(SELF, 'hierarchy_model.external_cell.view_groups'); END_ENTITY; (* ** A cluster_interface defines objects which can be seen and relationships ** which are guaranteed to be true for all views and symbols within a cluster. ** It includes definitions of master_ports and master_port_bundles. *) ENTITY cluster_interface; designator : OPTIONAL string_token; joined_port_sets : OPTIONAL SET [1:?] OF joined_port_set; must_join_port_sets : OPTIONAL SET [1:?] OF must_join_port_set; permutables : OPTIONAL SET [1:?] OF permutable_relationship; port_bundles : OPTIONAL SET [1:?] OF master_port_bundle; ports : OPTIONAL SET [1:?] OF master_port; timings : OPTIONAL SET [1:?] OF timing; units : cluster_interface_units; weak_joined_port_sets : OPTIONAL SET [1:?] OF weak_joined_port_set; DERIVE containing_cluster : cluster -- reference := usedin_one_role(SELF, 'hierarchy_model.cluster.interface'); WHERE containment_constraint : (* A cluster_interface belongs to one cluster. *) belongs_to_one(SELF, 'hierarchy_model.cluster.interface'); valid_permutables : (* A port may be referenced at most once within a permutable or non_permutable in an interface. *) not_defined; valid_port_relationships : (* A port may be referenced at most once in joined, must_join and weak_joined. *) not_defined; END_ENTITY; ENTITY cluster_interface_units; set_capacitance : capacitance_unit; set_time : time_unit; END_ENTITY; (* ** A master_port can be defined within the interface of a cluster. The width ** of a master_port is always one. A master_port may optionally have a ** direction characteristic, which can be input, output or bidirectional. It ** also has information about its external load capacitance, delays for the ** given set of transitions and its designator name. *) ENTITY master_port ABSTRACT SUPERTYPE OF (ONEOF(input_master_port, output_master_port, bidirectional_master_port, unspecified_direction_master_port)); ac_load : OPTIONAL capacitance_value; delays : OPTIONAL SET [1:?] OF port_delay; designator : OPTIONAL string_token; load_delays : OPTIONAL SET [1:?] OF port_load_delay; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; schematic_port_style : schematic_port_style; unused_internally : BOOLEAN; DERIVE containing_interface : cluster_interface -- reference := usedin_one_role(SELF, 'hierarchy_model.cluster_interface.ports'); width : INTEGER := 1; WHERE containment_constraint : (* A master_port belongs to one cluster_interface. *) belongs_to_one(SELF, 'hierarchy_model.cluster_interface.ports'); END_ENTITY; ENTITY input_master_port SUBTYPE OF (master_port); dc_fanout_load : OPTIONAL load_value; dc_max_fanin : OPTIONAL load_value; END_ENTITY; ENTITY output_master_port SUBTYPE OF (master_port); dc_fanin_load : OPTIONAL load_value; dc_max_fanout : OPTIONAL load_value; END_ENTITY; ENTITY bidirectional_master_port SUBTYPE OF (master_port); dc_fanin_load : OPTIONAL load_value; dc_fanout_load : OPTIONAL load_value; dc_max_fanin : OPTIONAL load_value; dc_max_fanout : OPTIONAL load_value; END_ENTITY; ENTITY unspecified_direction_master_port SUBTYPE OF (master_port); END_ENTITY; (* ** A schematic_port_style describes the style of a master_port or a ** master_port_bundle. *) TYPE schematic_port_style = ENUMERATION OF (narrow_port, wide_port); END_TYPE; (* ** A master_port_bundle can be defined within the interface of a cluster. It ** provides a structuring mechanism to describe a wide port. The width of a ** master_port_bundle is greater than or equal to one. A master_port_bundle ** can contain nested master_port_bundles. *) ENTITY master_port_bundle; member_ports : LIST [1:?] OF UNIQUE -- reference master_port_or_master_port_bundle; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; schematic_port_style : schematic_port_style; DERIVE containing_interface : cluster_interface -- reference := usedin_one_role(SELF, 'hierarchy_model.cluster_interface.port_bundles'); flattened_port_list : LIST [1:?] OF UNIQUE master_port -- reference := flatten_master_port_bundle(member_ports); width : INTEGER := SIZEOF(flattened_port_list); WHERE containment_constraint : (* A master_port_bundle belongs to one cluster_interface. *) belongs_to_one(SELF, 'hierarchy_model.cluster_interface.port_bundles'); valid_member_ports_in_same_interface : (* All member ports or port_bundles are defined in the same interface as the containing port_bundle. *) not_exists(QUERY(member_port <* member_ports | member_port.containing_interface :<>: containing_interface)); valid_member_ports : (* A master_port_bundle cannot contain itself either directly or indirectly. *) not_defined; END_ENTITY; TYPE master_port_or_master_port_bundle = SELECT (master_port, master_port_bundle); END_TYPE; (* ** The flatten_master_port_bundle function returns the flattened list of ** master_ports of a master_port_bundle. *) FUNCTION flatten_master_port_bundle (bundle_members : LIST OF master_port_or_master_port_bundle) : LIST OF master_port; LOCAL i : INTEGER; position : INTEGER := 1; port_list : LIST OF master_port := [ ]; member_list : LIST OF master_port := [ ]; END_LOCAL; REPEAT i := 1 TO HIINDEX(bundle_members); IF 'master_port' IN TYPEOF(bundle_members[i]) THEN INSERT(port_list, bundle_members[i], position); position := position + 1; ELSE member_list:=flatten_master_port_bundle(bundle_members[i].member_ports); INSERT(port_list, member_list, position); position := position + SIZEOF(member_list); END_IF; END_REPEAT; RETURN(port_list); END_FUNCTION; (* ** A permutable_relationship is used to describe ports or groups of ports which ** can be interchanged. *) ENTITY permutable_relationship ABSTRACT SUPERTYPE OF (ONEOF(permutable_structure, permutable_port_set)); size : INTEGER; WHERE containment_constraint : (* A permutable_relationship belongs to either one cluster_interface, one permutable_structure or one non_permutable_structure. *) either_belongs_to_one(SELF, ['hierarchy_model.cluster_interface.permutables', 'hierarchy_model.permutable_structure.permutable_members', 'hierarchy_model.non_permutable_structure.permutable_members']); END_ENTITY; (* ** A permutable_port_set is used to describe a relationship between a set of ** master_ports in which each member of the set is interchangeable. *) ENTITY permutable_port_set SUBTYPE OF (permutable_relationship); members : OPTIONAL SET [1:?] OF master_port; -- reference DERIVE size : INTEGER := SIZEOF(members); END_ENTITY; (* ** A permutable_structure is used to indicate that its member structures may be ** exchanged as a whole but not partially. *) ENTITY permutable_structure SUBTYPE OF (permutable_relationship); non_permutable_members : OPTIONAL SET [1:?] OF non_permutable_relationship; permutable_members : OPTIONAL SET [1:?] OF permutable_relationship; DERIVE size : INTEGER := permutable_structure_size (non_permutable_members, permutable_members); WHERE same_member_size : (* Each permutable_member and non_permutable_member within a permutable_structure must be the same size. *) permutable_structure_equal_member_size(non_permutable_members, permutable_members); END_ENTITY; (* ** The permutable_structure_size function returns the size of a ** permutable_structure. The size is the sum of all its member structure ** sizes. *) FUNCTION permutable_structure_size (non_permutable_members : SET OF non_permutable_relationship; permutable_members : SET OF permutable_relationship) : INTEGER; LOCAL i : INTEGER; temp_size : INTEGER := 0; END_LOCAL; REPEAT i := 1 TO HIINDEX(permutable_members); temp_size := temp_size + permutable_members[i].size; END_REPEAT; REPEAT i := 1 TO HIINDEX(non_permutable_members); temp_size := temp_size + non_permutable_members[i].size; END_REPEAT; RETURN(temp_size); END_FUNCTION; (* ** The permutable_structure_equal_member_size function returns true if all ** member structures of a permutable_structure has the same size. *) FUNCTION permutable_structure_equal_member_size (non_permutable_members : SET OF non_permutable_relationship; permutable_members : SET OF permutable_relationship) : BOOLEAN; LOCAL i : INTEGER; valid_size : INTEGER; END_LOCAL; IF there_exists(non_permutable_members) THEN valid_size:= non_permutable_members[1].size; ELSE IF there_exists(permutable_members) THEN valid_size := permutable_members[1].size; END_IF; END_IF; RETURN(not_exists(QUERY(non_permutable_member <* non_permutable_members | non_permutable_member.size <> valid_size)) AND not_exists(QUERY(permutable_member <* permutable_members | permutable_member.size <> valid_size))); END_FUNCTION; (* ** A non_permutable_relationship is used to describe ports or groups of ports ** which cannot be interchanged. *) ENTITY non_permutable_relationship ABSTRACT SUPERTYPE OF (ONEOF(non_permutable_structure, non_permutable_port_set)); size : INTEGER; WHERE containment_constraint : (* A non_permutable_relationship belongs to one permutable_structure. *) belongs_to_one(SELF, 'hierarchy_model.permutable_structure.non_permutable_members'); END_ENTITY; (* ** A non_permutable_port_set is used to describe a relationship in which a set ** of master_ports cannot be interchanged. *) ENTITY non_permutable_port_set SUBTYPE OF (non_permutable_relationship); members : OPTIONAL SET [1:?] OF master_port; -- reference DERIVE size : INTEGER := SIZEOF(members); END_ENTITY; ENTITY non_permutable_structure SUBTYPE OF (non_permutable_relationship); permutable_members : OPTIONAL SET [1:?] OF permutable_relationship; DERIVE size : INTEGER := non_permutable_structure_size(permutable_members); END_ENTITY; (* ** The non_permutable_structure_size function returns the size of a ** non_permutable_structure. The size is the sum of all its member structure ** sizes. *) FUNCTION non_permutable_structure_size (permutable_members : SET OF permutable_relationship) : INTEGER; LOCAL i : INTEGER; temp_size : INTEGER := 0; END_LOCAL; REPEAT i:= 1 TO HIINDEX(permutable_members); temp_size := temp_size + permutable_members[i].size; END_REPEAT; RETURN(temp_size); END_FUNCTION; (* ** A joined_port_set is used to specify that certain master_ports are shorted ** together. Since the ports are shorted internally, a connection to one of ** them implies that a connection has been made to any of the other ports. *) ENTITY joined_port_set; member_ports : OPTIONAL SET [1:?] OF master_port; -- reference WHERE containment_constraint : either_belongs_to_one(SELF, ['hierarchy_model.cluster_interface.joined_port_sets', 'hierarchy_model.must_join_port_set.nested_joined_sets', 'hierarchy_model.weak_joined_port_set.nested_joined_sets']); END_ENTITY; (* ** A weak_joined_port_set is used to specify that certain master_ports are ** shorted internally so that an external connection can be made to any one of ** them, but they cannot be used as feedthroughs. *) ENTITY weak_joined_port_set; member_ports : OPTIONAL SET [1:?] OF master_port; -- reference nested_joined_sets : OPTIONAL SET [1:?] OF joined_port_set; WHERE containment_constraint : either_belongs_to_one(SELF, ['hierarchy_model.cluster_interface.weak_joined_port_sets', 'hierarchy_model.must_join_port_set.nested_weak_joined_sets']); END_ENTITY; (* ** A must_join_port_set is used to specify that certain master_ports must be ** connected externally for correct operation. *) ENTITY must_join_port_set; member_ports : OPTIONAL SET [1:?] OF master_port; -- reference nested_joined_sets : OPTIONAL SET [1:?] OF joined_port_set; nested_weak_joined_sets : OPTIONAL SET [1:?] OF weak_joined_port_set; WHERE containment_constraint : belongs_to_one(SELF, 'hierarchy_model.cluster_interface.must_join_port_sets'); END_ENTITY; (* ** A cell_representation specifies a representation, or perspective of a cell. ** It is classified into internal_cell_representation and ** external_cell_representation. An internal_cell_representation belongs to ** one internal_cell and may include implementation details. An ** external_cell_representation belongs to one external_cell and is not allowed ** to have implementation information. A cell_representation may be derived ** from another cell_representation. It may also be a new version of another ** cell_representation. *) ENTITY cell_representation ABSTRACT SUPERTYPE OF (ONEOF(internal_cell_representation, external_cell_representation)); derived_from : OPTIONAL related_cell_representation; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; previous_version : OPTIONAL related_cell_representation; properties : OPTIONAL SET [1:?] OF property; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; DERIVE interface : cluster_interface -- reference (* The interface is inherited from the containing cluster. *) := containing_cluster.interface; containing_cluster : cluster -- reference := usedin_one_role(SELF, 'hierarchy_model.cluster.cell_representations'); WHERE non_recursive_derive_from : (* A cell_representation cannot derive from itself either directly or indirectly. *) not_defined; non_recursive_previous_version : (* A cell_representation cannot be a new version of itself either directly or indirectly. *) not_defined; valid_derive_from : (* The cell_representation and its derived cell_representation are defined in the same cell. *) containing_cluster.containing_cell :=: derived_from.related_representation.containing_cluster.containing_cell; valid_previous_version : (* The cell_representation and its previous version are defined in the same cell and they must be of the same type. *) (containing_cluster.containing_cell :=: previous_version .related_representation .containing_cluster .containing_cell ) AND (TYPEOF(SELF) = TYPEOF(previous_version)); valid_status_in_previous_version : (* The earliest timestamp of the cell_representation is later than the latest timestamp of its previous version. *) not_defined; END_ENTITY; ENTITY internal_cell_representation ABSTRACT SUPERTYPE OF (ONEOF(internal_behavior_view, internal_connectivity_view, internal_logicmodel_view, internal_masklayout_view, internal_pcblayout_view, internal_schematic_symbol, internal_schematic_view, internal_symboliclayout_view)) SUBTYPE OF (cell_representation); DERIVE containing_cluster : internal_cluster -- reference := usedin_one_role(SELF, 'hierarchy_model.internal_cluster.cell_representations'); WHERE containment_constraint : (* An internal_cell_representation belongs to one internal_cluster. *) belongs_to_one(SELF, 'hierarchy_model.internal_cluster.cell_representations'); END_ENTITY; ENTITY external_cell_representation ABSTRACT SUPERTYPE OF (ONEOF(external_behavior_view, external_connectivity_view, external_logicmodel_view, external_masklayout_view, external_pcblayout_view, external_schematic_symbol, external_schematic_view, external_symboliclayout_view)) SUBTYPE OF (cell_representation); DERIVE containing_cluster : external_cluster -- reference := usedin_one_role(SELF, 'hierarchy_model.external_cluster.cell_representations'); WHERE containment_constraint : (* An external_cell_representation belongs to one external_cluster. *) belongs_to_one(SELF, 'hierarchy_model.external_cluster.cell_representations'); END_ENTITY; ENTITY related_cell_representation; reason : OPTIONAL string_token; related_representation : cell_representation; -- reference END_ENTITY; (* ** An instance allows a cluster to be referenced within another view to create ** the instance hierarchy of a design. *) ENTITY instance ABSTRACT SUPERTYPE OF (ONEOF(external_cluster_instance, internal_cluster_instance)); instantiated_cluster : cluster; -- reference name : OPTIONAL name_information; overriding_cell_properties : OPTIONAL SET [1:?] OF property_override; overriding_cluster_properties : OPTIONAL SET [1:?] OF property_override; overriding_designator : OPTIONAL string_token; overriding_port_attributes : OPTIONAL SET [1:?] OF instance_port_attributes; overriding_timings : OPTIONAL SET [1:?] OF timing; properties : OPTIONAL SET [1:?] OF property; WHERE containment_constraint : (* An instance belongs to either one internal_connectivity_view or one internal_schematic_view. *) either_belongs_to_one(SELF, ['connectivity_view_model.internal_connectivity_view.instances', 'schematic_view_model.internal_schematic_view.instances']); used_by_at_most_one_instance_group : (* An instance may only be used as a member of an instance_group once. *) SIZEOF(USEDIN(SELF,'hierarchy_model.instance_group.member_instances')) <= 1; valid_overriding_cell_properties : (* The overridden properties are defined in the containing cell of the instantiated_cluster. *) not_exists(QUERY(cell_property_override <* overriding_cell_properties | NOT(cell_property_override.overridden_property IN instantiated_cluster.containing_cell.properties))); valid_overriding_cluster_properties : (* The overridden properties are defined in the instantiated_cluster. *) not_exists(QUERY(cluster_property_override<*overriding_cluster_properties| NOT(cluster_property_override.overridden_property IN instantiated_cluster.properties))); valid_overriding_port_attributes : (* The overridden ports are defined in the interface of the instantiated_cluster. *) not_exists(QUERY(port_attribute_override <* overriding_port_attributes | NOT(port_attribute_override.overridden_port IN instantiated_cluster.interface.ports))); END_ENTITY; ENTITY external_cluster_instance SUBTYPE OF (instance); SELF\instance.instantiated_cluster : external_cluster; -- reference END_ENTITY; ENTITY internal_cluster_instance SUBTYPE OF (instance); SELF\instance.instantiated_cluster : internal_cluster; -- reference END_ENTITY; (* ** The instance_port_attributes is used to attach or modify properties and ** attributes of the occurrence of a port within an instance. *) ENTITY instance_port_attributes ABSTRACT SUPERTYPE OF (ONEOF(input_instance_port_attributes, output_instance_port_attributes, bidirectional_instance_port_attributes, unspecified_direction_instance_port_attributes)); overridden_port : master_port; -- reference overriding_ac_load : OPTIONAL capacitance_value; overriding_delays : OPTIONAL SET [1:?] OF port_delay; overriding_designator : OPTIONAL string_token; overriding_load_delays : OPTIONAL SET [1:?] OF port_load_delay; overriding_properties : OPTIONAL SET [1:?] OF property_override; unused_externally : BOOLEAN; WHERE containment_constraint : (* An instance_port_attributes belongs to one instance. *) belongs_to_one(SELF, 'hierarchy_model.instance.port_attributes'); END_ENTITY; ENTITY input_instance_port_attributes SUBTYPE OF (instance_port_attributes); SELF\instance_port_attributes.overridden_port -- reference : input_master_port; overriding_dc_fanout_load : OPTIONAL load_value; overriding_dc_max_fanin : OPTIONAL load_value; END_ENTITY; ENTITY output_instance_port_attributes SUBTYPE OF (instance_port_attributes); SELF\instance_port_attributes.overridden_port -- reference : output_master_port; overriding_dc_fanin_load : OPTIONAL load_value; overriding_dc_max_fanout : OPTIONAL load_value; END_ENTITY; ENTITY bidirectional_instance_port_attributes SUBTYPE OF (instance_port_attributes); SELF\instance_port_attributes.overridden_port -- reference : bidirectional_master_port; overriding_dc_fanin_load : OPTIONAL load_value; overriding_dc_fanout_load : OPTIONAL load_value; overriding_dc_max_fanin : OPTIONAL load_value; overriding_dc_max_fanout : OPTIONAL load_value; END_ENTITY; ENTITY unspecified_direction_instance_port_attributes SUBTYPE OF (instance_port_attributes); SELF\instance_port_attributes.overridden_port -- reference : unspecified_direction_master_port; END_ENTITY; (* ** An instance_port is used to reference a master_port on an instance. *) ENTITY instance_port; referenced_master_port : master_port; -- reference referenced_instance : instance; -- reference DERIVE width : INTEGER := 1; UNIQUE uniqueness_constraint : (* There is only one instance_port for a particular master_port on an instance. *) referenced_master_port, referenced_instance; WHERE valid_port_and_instance : (* The referenced master_port must be defined in the interface of the instantiated cluster of the referenced instance. *) referenced_master_port IN referenced_instance.instantiated_cluster.interface.ports; END_ENTITY; (* ** An instance_port_bundle is used to reference a master_port_bundle on an ** instance. *) ENTITY instance_port_bundle; referenced_master_port_bundle : master_port_bundle; -- reference referenced_instance : instance; -- reference DERIVE flattened_port_list : LIST [1:?] OF UNIQUE instance_port := flatten_instance_port_bundle(SELF); width : INTEGER := SIZEOF(flattened_port_list); UNIQUE uniqueness_constraint : (* There is only one instance_port_bundle for a particular master_port_bundle on an instance. *) referenced_master_port_bundle, referenced_instance; WHERE valid_port_and_instance : (* The referenced master_port_bundle must be defined in the interface of the instantiated cluster of the referenced instance. *) referenced_master_port_bundle IN referenced_instance.instantiated_cluster.interface.port_bundles; END_ENTITY; (* ** The flatten_instance_port_bundle function returns the flattened list of ** instance_ports of an instance_port_bundle. When flattened, the size of the ** list of instance_ports returned must be the same as the size of the ** referenced master_port_bundle. *) FUNCTION flatten_instance_port_bundle (instancePortBundle : instance_port_bundle) : LIST OF UNIQUE instance_port; LOCAL flattenedMasterPorts : LIST OF UNIQUE master_port := instancePortBundle.referenced_master_port_bundle.flattened_port_list; portList : LIST OF UNIQUE instance_port := []; END_LOCAL; REPEAT i := 1 TO SIZEOF(flattenedMasterPorts); portList[i].referenced_master_port := flattenedMasterPorts[i]; portList[i].referenced_instance := instancePortBundle.referenced_instance; END_REPEAT; RETURN(portList); END_FUNCTION; (* ** An instance_group provides a structuring mechanism for instances. All ** instances within an instance_group must be unique and they must instantiate ** the same cluster. *) ENTITY instance_group; instantiated_cluster : cluster; -- reference member_instances : LIST [1:?] OF UNIQUE instance; -- reference name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; WHERE containment_constraint : (* An instance_group belongs to either one internal_connectivity_view or one internal_schematic_view. *) either_belongs_to_one(SELF, ['connectivity_view_model.internal_connectivity_view.instance_groups', 'schematic_view_model.internal_schematic_view.instance_groups']); valid_member_instances_instantiated_cluster : (* All member instances must instantiate the same cluster. *) not_exists(QUERY(member_instance <* member_instances | member_instance.instantiated_cluster :<>: instantiated_cluster)); END_ENTITY; (* ** An instance_group_port is used to reference a master_port on an ** instance_group. *) ENTITY instance_group_port; referenced_master_port : master_port; -- reference referenced_instance_group : instance_group; -- reference DERIVE flattened_port_list : LIST [1:?] OF UNIQUE instance_port := flattened_instance_group_port(SELF); width : INTEGER := SIZEOF(flattened_port_list); UNIQUE uniqueness_constraint : (* There is only one instance_group_port for a particular master_port on an instance_group. *) referenced_master_port, referenced_instance_group; WHERE valid_port_and_instance : (* The referenced master_port must be defined in the interface of the instantiated cluster of the referenced instance_group. *) referenced_master_port IN referenced_instance_group.instantiated_cluster.interface.ports; END_ENTITY; (* ** The flatten_instance_group_port function returns the flattened list of ** instance_ports of an instance_group_port. When flattened, the size of the ** list of instance_ports returned must be the same as the size of the ** member_instances of the referenced instance_group. *) FUNCTION flattened_instance_group_port (instanceGroupPort : instance_group_port) : LIST OF UNIQUE instance_port; LOCAL instanceList : LIST OF UNIQUE instance := instanceGroupPort.referenced_instance_group.member_instances; portList : LIST OF UNIQUE instance_port := []; END_LOCAL; REPEAT i := 1 TO SIZEOF(instanceList); portList[i].referenced_master_port := instanceGroupPort.referenced_master_port; portList[i].referenced_instance := instanceList[i]; END_REPEAT; RETURN(portList); END_FUNCTION; (* ** An instance_group_port_bundle is used to reference a master_port_bundle on ** an instance_group. *) ENTITY instance_group_port_bundle; referenced_master_port_bundle : master_port_bundle; -- reference referenced_instance_group : instance_group; -- reference DERIVE flattened_port_list : LIST [1:?] OF UNIQUE instance_port := flattened_instance_group_port_bundle(SELF); width : INTEGER := SIZEOF(flattened_port_list); UNIQUE uniqueness_constraint : (* There is only one instance_group_port_bundle for a particular master_port_bundle on an instance_group. *) referenced_master_port_bundle, referenced_instance_group; WHERE valid_port_and_instance : (* The referenced master_port_bundle must be defined in the interface of the instantiated cluster of the referenced instance_group. *) referenced_master_port_bundle IN referenced_instance_group.instantiated_cluster.interface.port_bundles; END_ENTITY; (* ** The flatten_instance_group_port_bundle function returns the flattened list ** of instance_ports of an instance_group_port_bundle. When flattened, the ** size of the list of instance_ports returned must be the same as the product ** between the size of the member_instances of the referenced instance_group ** and the size of the referenced master_port_bundle. The ordering for ** flattening is that instances vary slowest and ports vary fastest. *) FUNCTION flattened_instance_group_port_bundle (instanceGroupPortBundle : instance_group_port_bundle) : LIST OF UNIQUE instance_port; LOCAL instanceList : LIST OF UNIQUE instance := instanceGroupPortBundle.referenced_instance_group.member_instances; flattenedMasterPorts : LIST OF UNIQUE master_port := instanceGroupPortBundle.referenced_master_port_bundle.flattened_port_list; portList : LIST OF UNIQUE instance_port := []; END_LOCAL; REPEAT i := 1 TO SIZEOF(instanceList); REPEAT j := 1 TO SIZEOF(flattenedMasterPorts); portList[i*j].referenced_master_port := flattenedMasterPorts[j]; portList[i*j].referenced_instance := instanceList[i]; END_REPEAT; END_REPEAT; RETURN(portList); END_FUNCTION; (* ** A referenced_interconnect is used to reference a net structure or a bus ** structure in a connectivity view or on a schematic page. *) TYPE referenced_interconnect = SELECT (connectivity_generic_net, connectivity_generic_bus, schematic_generic_net, schematic_generic_bus); END_TYPE; (* ** A load_value is used in defining dcFaninLoad, dcFanoutLoad, dcMaxFanin ** and dcMaxFanout of a port. *) TYPE load_value = number_token; WHERE constraint_on_value : (* The load_value must not be negative. *) SELF >= 0; END_TYPE; (* ** A derivation_type is used to specify how a value has been derived. It may ** have been calculated, measured or is a required value. *) TYPE derivation_type = ENUMERATION OF (calculated, measured, required); END_TYPE; (* ** A port_delay is used to specify the amount of delay associated with a port ** and its derivation for the given set of transitions. *) ENTITY port_delay; becomes_or_transition : undefined_type; derivation : derivation_type; time_delay : time_value; END_ENTITY; ENTITY port_delay_display; displayed_delay : port_delay; -- reference display_information : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A port_load_delay specifies a load-dependent propagation delay associated ** with a port. *) ENTITY port_load_delay; ac_load_time_factor : time_value; ac_load_capacitance_factor : capacitance_value; becomes_or_transition : undefined_type; derivation : derivation_type; END_ENTITY; ENTITY port_load_delay_display; displayed_delay : port_load_delay; -- reference display_information : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** An interconnect_delay is used to specify the amount of delay associated with ** a net structure or a bus structure, and its derivation for the given set of ** transitions. *) ENTITY interconnect_delay; becomes_or_transition : undefined_type; derivation : derivation_type; time_delay : time_value; WHERE valid_time_delay : (* The time_delay must not be negative. *) not_defined; END_ENTITY; ENTITY interconnect_delay_display; displayed_delay : interconnect_delay; -- reference display_information : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A timing is used to provide a set of path delays or simulation timing ** constraints. It is not fully defined in the model. *) ENTITY timing; derivation : derivation_type; END_ENTITY; ENTITY timing_display; displayed_timing : timing; -- reference display_information : OPTIONAL BAG [1:?] OF display; END_ENTITY; END_SCHEMA; SCHEMA schematic_view_model; (* ** The schematic_view_model schema describes what information can be found in ** an EDIF schematic view. The schematic view conveys hierarchy, connectivity ** and implementation. The hierarchy information describes how a circuit is ** broken down into a number of cells. The connectivity information defines ** how circuits are connected. The implementation of a schematic view is split ** into pages, which form a graphical representation of its structure. *) REFERENCE FROM display_model (colour, comment_graphics, display, display_override, figure, string_display, transform); REFERENCE FROM geometry_model (rectangle); REFERENCE FROM hierarchy_model (external_cell_representation, instance, instance_group, internal_cell_representation, master_port_or_master_port_bundle, port_delay_display, port_load_delay_display, timing, timing_display); REFERENCE FROM instantiatable_object_model (schematic_figure_macro, schematic_symbol_port_representation_template, symbol_border_template); REFERENCE FROM logical_connectivity_model (global_port_scope, signal, signal_group); REFERENCE FROM schematic_implementation_model (page); REFERENCE FROM support_definition_model (angle_unit, belongs_to_one, capacitance_unit, integer_distance_value, integer_token, name_information, not_defined, not_exists, property, property_display, property_display_override, property_override, there_exists, time_unit, usedin_one_role); (* ** An internal_schematic_view is a cell representation which describes the ** connectivity of a cell and the representation of the cell on a schematic. ** The implementation of an internal_schematic_view is split into pages. *) ENTITY internal_schematic_view SUBTYPE OF (internal_cell_representation); global_port_scopes : OPTIONAL SET [1:?] OF global_port_scope; instances : OPTIONAL SET [1:?] OF instance; instance_groups : OPTIONAL SET [1:?] OF instance_group; pages : OPTIONAL SET [1:?] OF page; signals : OPTIONAL SET [1:?] OF signal; signal_groups : OPTIONAL SET [1:?] OF signal_group; timings : OPTIONAL SET [1:?] OF timing; total_pages : OPTIONAL integer_token; units : schematic_units; WHERE valid_instances : (* An internal_schematic_view should not contain instances of clusters of the containing_cell either directly or indirectly. *) not_defined; valid_instance_groups : (* All member instances of each instance_group must be defined in the containing internal_schematic_view. *) not_defined; valid_signals : (* All signals are disjoint. That is, only one signal may connect to a particular master_port or instance_port. *) not_exists(QUERY(signal_1 <* signals | there_exists(QUERY(signal_2 <* signals - signal_1 | there_exists(signal_1.joined_ports * signal_2.joined_ports))))); END_ENTITY; (* ** An internal_schematic_symbol describes a symbol for representation of a cell ** on a schematic. *) ENTITY internal_schematic_symbol SUBTYPE OF (internal_cell_representation); annotate : OPTIONAL BAG [1:?] OF string_display; background_colour : colour; border : OPTIONAL symbol_border; cell_name_display : OPTIONAL BAG [1:?] OF display; cell_property_displays : OPTIONAL BAG [1:?] OF property_display; cluster_property_displays : OPTIONAL BAG [1:?] OF property_display; comment_graphics_info : OPTIONAL BAG [1:?] OF comment_graphics; designator_display : OPTIONAL BAG [1:?] OF display; figures : OPTIONAL BAG [1:?] OF figure; figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; implementation_name_display_slot: OPTIONAL BAG [1:?] OF display; instance_name_display_slot : OPTIONAL BAG [1:?] OF display; page_size : OPTIONAL rectangle; symbol_name_display : OPTIONAL BAG [1:?] OF display; symbol_port_representations : OPTIONAL SET [1:?] OF schematic_symbol_port_representation; symbol_property_displays : OPTIONAL BAG [1:?] OF property_display; units : schematic_units; WHERE valid_cell_property_displays : (* The displayed properties are defined in the containing internal_cell.*) not_exists(QUERY(cell_property_display <* cell_property_displays | NOT (cell_property_display.displayed_property IN SELF\internal_cell_representation .containing_cluster.containing_cell.properties))); valid_cluster_property_displays : (* The displayed properties are defined in the containing internal_cluster. *) not_exists(QUERY(cluster_property_display <* cluster_property_displays | NOT (cluster_property_display.displayed_property IN SELF\internal_cell_representation.containing_cluster.properties))); valid_symbol_port_representations : (* Ports referenced in symbol_port_representations are master ports defined in the cluster interface. *) not_defined; valid_symbol_property_displays : (* The displayed properties are defined in the internal_schematic_symbol.*) not_exists(QUERY(symbol_property_display <* symbol_property_displays | NOT (symbol_property_display.displayed_property IN SELF\internal_cell_representation.properties))); END_ENTITY; ENTITY external_schematic_view SUBTYPE OF (external_cell_representation); units : schematic_units; END_ENTITY; ENTITY external_schematic_symbol SUBTYPE OF (external_cell_representation); background_colour : colour; page_size : OPTIONAL rectangle; units : schematic_units; END_ENTITY; (* ** The schematic_units is used to set the scaling for a schematic view. In a ** schematic view, it is appropriate to set an angle scale, a capacitance ** scale, a distance scale and a timing scale. The distance scale is specified ** in terms of typical spacing between adjacent pins. The hotspot_grid is ** specified in terms of integer distance value. If the hotspot_grid is not ** present, it implies the schematic view has no grid specified. *) ENTITY schematic_units; hotspot_grid : OPTIONAL integer_distance_value; set_angle : angle_unit; set_capacitance : capacitance_unit; set_distance_in_typical_pin_spacing : integer_token; set_time : time_unit; END_ENTITY; ENTITY symbol_border; instantiated_template : symbol_border_template; -- reference overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; template_position : transform; DERIVE containing_symbol : internal_schematic_symbol -- reference := usedin_one_role(SELF, 'schematic_view_model.internal_schematic_symbol.border'); WHERE containment_constraint : (* A symbol_border belongs to one internal_schematic_symbol. *) belongs_to_one(SELF, 'schematic_view_model.internal_schematic_symbol.border'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); END_ENTITY; ENTITY schematic_symbol_port_representation; instantiated_template : -- reference schematic_symbol_port_representation_template; name : OPTIONAL name_information; referenced_master_port : master_port_or_master_port_bundle; -- reference overriding_ac_load_display : OPTIONAL display_override; overriding_dc_fanin_load_display : OPTIONAL display_override; overriding_dc_fanout_load_display : OPTIONAL display_override; overriding_dc_max_fanin_display : OPTIONAL display_override; overriding_dc_max_fanout_display : OPTIONAL display_override; overriding_designator_display : OPTIONAL display_override; overriding_implementation_name_display: OPTIONAL display_override; overriding_port_name_display : OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; delay_displays : OPTIONAL BAG [1:?] OF port_delay_display; load_delay_displays : OPTIONAL BAG [1:?] OF port_load_delay_display; port_property_displays: OPTIONAL BAG [1:?] OF property_display; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; WHERE containment_constraint : (* A schematic_symbol_port_representation belongs to one internal_schematic_symbol. *) belongs_to_one(SELF, 'schematic_view_model.internal_schematic_symbol.symbol_port_representations'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_port_property_displays : (* The displayed properties are defined in the referenced_master_port. *) not_defined; matching_direction : (* The direction of the referenced_master_port must be compatible with the direction_indicator of the symbol_port_template. *) not_defined; matching_type : (* The schematic_port_affinity of the instantiated schematic_symbol_port_template must agree with the schematic_port_style of the referenced_master_port.*) not_defined; END_ENTITY; END_SCHEMA; SCHEMA design_hierarchy_model; REFERENCE FROM design_management_model (copyright, written); REFERENCE FROM documentation_model (documentation); REFERENCE FROM hierarchy_model (bidirectional_master_port, cell, cell_representation, input_master_port, instance, instance_configuration, interconnect_delay, port_delay, port_load_delay, load_value, output_master_port, master_port, referenced_interconnect, timing, unspecified_direction_master_port, view_configuration); REFERENCE FROM support_definition_model (belongs_to_one, capacitance_unit, capacitance_value, integer_token, name_information, not_defined, not_exists, private_property, property_override, string_token, time_unit, usedin_one_role); (* ** A design identifies the cell at the top level of the hierarchy of a ** particular design within a library. *) ENTITY design; design_hierarchies : OPTIONAL SET [1:?] OF design_hierarchy; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; top_cell : cell; -- reference units : design_units; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; WHERE containment_constraint : (* A design belongs to one edif file. *) belongs_to_one(SELF, 'edif_information_model.edif.designs'); valid_design_hierarchies : (* All design hierarchies start with view_configurations which are defined in the clusters of the top cell. *) not_exists(QUERY(expanded_hierarchy <* design_hierarchies | NOT (expanded_hierarchy.chosen_configuration.containing_cluster IN top_cell.clusters))); END_ENTITY; ENTITY design_units; set_capacitance : capacitance_unit; set_time : time_unit; END_ENTITY; ENTITY design_hierarchy; chosen_configuration : view_configuration; -- reference instance_annotates : OPTIONAL SET [1:?] OF instance_annotate; interconnect_annotates : OPTIONAL SET [1:?] OF interconnect_annotate; master_port_annotates : OPTIONAL SET [1:?] OF master_port_annotate; overriding_cell_properties : OPTIONAL SET [1:?] OF property_override; overriding_cluster_properties : OPTIONAL SET [1:?] OF property_override; overriding_view_properties : OPTIONAL SET [1:?] OF property_override; timings : OPTIONAL SET [1:?] OF timing; DERIVE containing_design : design := usedin_one_role(SELF, 'design_hierarchy_model.design.design_hierarchies'); WHERE containment_constraint : (* A design_hierarchy belongs to one design. *) belongs_to_one(SELF, 'design_hierarchy_model.design.design_hierarchies'); valid_instance_annotates : (* The annotated instances are defined in the chosen cell_representation of the chosen view_configuration. *) not_defined; valid_interconnect_annotates : (* The annotated interconnects are defined in the chosen cell_representation of the chosen view_configuration. *) not_defined; valid_master_port_annotates : (* The annotated master_ports are defined in the interface of the chosen cell_representation of the chosen view_configuration. *) not_exists(QUERY(port_annotate <* master_port_annotates | NOT (port_annotate.overridden_port IN chosen_configuration.chosen_representation.interface.ports))); valid_overriding_cell_properties : (* The overridden properties are defined in the top_cell of the containing design. *) not_exists(QUERY(cell_property_override <* overriding_cell_properties | NOT (cell_property_override.overridden_property IN containing_design.top_cell.properties))); valid_overriding_cluster_properties : (* The overridden properties are defined in the cluster containing the chosen view_configuration. *) not_exists(QUERY(cluster_property_override <* overriding_cluster_properties| NOT (cluster_property_override.overridden_property IN chosen_configuration.containing_cluster.properties))); valid_overriding_view_properties : (* The overridden properties are defined in the chosen cell_representation of the chosen view_configuration. *) not_exists(QUERY(view_property_override <* overriding_view_properties | NOT (view_property_override.overridden_property IN chosen_configuration.chosen_representation.properties))); END_ENTITY; ENTITY instance_annotate; annotated_object : instance_configuration; -- reference instance_annotates : OPTIONAL SET [1:?] OF instance_annotate; interconnect_annotates : OPTIONAL SET [1:?] OF interconnect_annotate; master_port_annotates : OPTIONAL SET [1:?] OF master_port_annotate; overriding_cell_properties : OPTIONAL SET [1:?] OF property_override; overriding_cluster_properties : OPTIONAL SET [1:?] OF property_override; overriding_designator : OPTIONAL string_token; overriding_instance_properties : OPTIONAL SET [1:?] OF property_override; overriding_view_properties : OPTIONAL SET [1:?] OF property_override; timings : OPTIONAL SET [1:?] OF timing; WHERE valid_instance_annotates : (* The annotated instances are defined in the chosen view_configuration of the annotated_object. *) not_defined; valid_interconnect_annotates : (* The annotated interconnects are defined in the chosen view_configuration of the annotated_object. *) not_defined; valid_master_port_annotates : (* The annotated master_ports are defined in the interface of the instantiated cluster of the annotated instance. *) not_exists(QUERY(port_annotate <* master_port_annotates | NOT (port_annotate.overridden_port IN annotated_object.chosen_instance.instantiated_cluster.interface.ports))); valid_overriding_cell_properties : (* The overridden properties are defined in the containing cell of the instantiated cluster of the annotated instance. *) not_exists(QUERY(cell_property_override <* overriding_cell_properties | NOT (cell_property_override.overridden_port IN annotated_object.chosen_instance .instantiated_cluster.containing_cell.properties))); valid_overriding_cluster_properties : (* The overridden properties are defined in the instantiated cluster of the annotated instance. *) not_exists(QUERY(cluster_property_override <* overriding_cluster_properties| NOT (cluster_property_override.overridden_property IN annotated_object.chosen_instance.instantiated_cluster.properties))); valid_overriding_instance_properties : (* The overridden properties are defined in the annotated instance. *) not_exists(QUERY(instance_property_override <* overriding_instance_properties| NOT (instance_property_override.overridden_property IN annotated_object.chosen_instance.properties))); valid_overriding_view_properties : (* The overridden properties are defined in the chosen view_configuration of the annotated instance. *) not_exists(QUERY(view_property_override <* overriding_view_properties | NOT (view_property_override.overridden_property IN annotated_object.chosen_configuration.chosen_representation.properties))); END_ENTITY; (* ** A master_port_annotate is used to attach or modify properties and attributes ** which are associated with a master_port within an instance hierarchy. *) ENTITY master_port_annotate ABSTRACT SUPERTYPE OF (ONEOF(input_master_port_annotate, output_master_port_annotate, bidirectional_master_port_annotate, unspecified_direction_master_port_annotate)); overridden_port : master_port; -- reference overriding_ac_load : OPTIONAL capacitance_value; overriding_delays : OPTIONAL SET [1:?] OF port_delay; overriding_designator : OPTIONAL string_token; overriding_load_delays : OPTIONAL SET [1:?] OF port_load_delay; overriding_properties : OPTIONAL SET [1:?] OF property_override; WHERE valid_overriding_properties : (* The overridden properties are defined in the overridden port. *) not_exists(QUERY(port_property_override <* overriding_properties | NOT(port_property_override.overridden_property IN overridden_port.properties))); END_ENTITY; ENTITY input_master_port_annotate SUBTYPE OF (master_port_annotate); SELF\master_port_annotate.overridden_port -- reference : input_master_port; overriding_dc_fanout_load : OPTIONAL load_value; overriding_dc_max_fanin : OPTIONAL load_value; END_ENTITY; ENTITY output_master_port_annotate SUBTYPE OF (master_port_annotate); SELF\master_port_annotate.overridden_port -- reference : output_master_port; overriding_dc_fanin_load : OPTIONAL load_value; overriding_dc_max_fanout : OPTIONAL load_value; END_ENTITY; ENTITY bidirectional_master_port_annotate SUBTYPE OF (master_port_annotate); SELF\master_port_annotate.overridden_port -- reference : bidirectional_master_port; overriding_dc_fanin_load : OPTIONAL load_value; overriding_dc_fanout_load : OPTIONAL load_value; overriding_dc_max_fanin : OPTIONAL load_value; overriding_dc_max_fanout : OPTIONAL load_value; END_ENTITY; ENTITY unspecified_direction_master_port_annotate SUBTYPE OF (master_port_annotate); SELF\master_port_annotate.overridden_port -- reference : unspecified_direction_master_port; END_ENTITY; (* ** An interconnect_annotate is used to associate physical net characteristics ** with a net structure or a bus structure within an instance hierarchy. *) ENTITY interconnect_annotate; overridden_interconnect : referenced_interconnect; -- reference overriding_criticality : OPTIONAL integer_token; overriding_delays : OPTIONAL SET [1:?] OF interconnect_delay; overriding_properties : OPTIONAL SET [1:?] OF property_override; WHERE valid_overriding_properties : (* The overridden properties are defined in the overridden interconnect. *) not_defined; END_ENTITY; END_SCHEMA; SCHEMA design_management_model; (* ** The design_management_model schema provides the design management ** information. It records a history of modifications. It provides the ** information needed to trace back to the origin or the owner of the data, and ** also identifies the software or program name which was responsible for ** creating the data. *) REFERENCE FROM support_definition_model (either_belongs_to_one, integer_token, positive_integer_token, string_token, private_property); (* ** The copyright is used to indicate the copyright restrictions on the use of ** the EDIF file, or to a particular object within the file. *) ENTITY copyright; strings : OPTIONAL BAG [1:?] OF string_token; year : SET OF positive_integer_token; WHERE containment_constraint : either_belongs_to_one(SELF,[ 'documentation_model.documentation.status_of_copyright', 'edif_information_model.edif.status_of_copyright', 'library_model.library.status_of_copyright', 'hierarchy_model.cell_representation.status_of_copyright', 'hierarchy_model.cluster.status_of_copyright', 'hierarchy_model.cell.status_of_copyright', 'hierarchy_model.design.status_of_copyright', 'instantiatable_object_model.figure_macro_template.status_of_copyright', 'instantiatable_object_model.geometry_macro_template.status_of_copyright', 'instantiatable_object_model.schematic_template.status_of_copyright', 'schematic_implementation_model.page.status_of_copyright']); END_ENTITY; (* ** Written includes information relating to the writer or generator of the ** object with which the written is associated. It must include a time_stamp ** and may include program program identification, human or organisation ** identification, or location information to help the reader trace the origin ** of a particular part of an EDIF file. *) ENTITY written; author : OPTIONAL string_token; date : time_stamp; data_origin : OPTIONAL version_information; program : OPTIONAL version_information; WHERE containment_constraint : either_belongs_to_one(SELF, [ 'documentation_model.documentation.status_of_copyright', 'edif_information_model.edif.status_of_copyright', 'library_model.library.status_of_copyright', 'hierarchy_model.cell_representation.status_of_copyright', 'hierarchy_model.cluster.status_of_copyright', 'hierarchy_model.cell.status_of_copyright', 'hierarchy_model.design.status_of_copyright', 'instantiatable_object_model.figure_macro_template.status_of_copyright', 'instantiatable_object_model.geometry_macro_template.status_of_copyright', 'instantiatable_object_model.schematic_template.status_of_copyright', 'schematic_implementation_model.page.status_of_copyright']); END_ENTITY; (* ** A version_information is used to provide a revision code which can be used ** to keep track of the source and creator of the written EDIF data. It is ** intended for human interpretation and should serve as an aid in problem ** analysis. *) ENTITY version_information; name : string_token; version : OPTIONAL string_token; WHERE containment_constraint : either_belongs_to_one(SELF, ['design_management_model.written.data_origin', 'design_management_model.written.program']); END_ENTITY; (* ** A time_stamp identifies when the data was created or last modified. The ** time is specified in Universal Time Coordinated. *) ENTITY time_stamp; recorded_date : date; recorded_time : time; END_ENTITY; (* ** A time specifies the time in hours, minutes and seconds. *) ENTITY time; hour, minute, second : integer_token; WHERE valid_hour : (* Twenty four hours each day. *) { 0 <= hour <= 23 }; valid_minute : (* Sixty minutes each hour. *) { 0 <= minute <= 59 }; valid_second : (* Sixty seconds each minute. *) { 0 <= second <= 59 }; END_ENTITY; (* ** A date specifies the date as three integers representing the year, month and ** day. These should be consistent with each other to form a valid date. *) ENTITY date; year, month, day : positive_integer_token; WHERE check_valid_date : valid_date(year, month, day); END_ENTITY; (* ** The valid_date function checks every instance of date. It is used to check ** whether the day, month and year fields constitute a valid date or not. *) FUNCTION valid_date (yy, mm, dd : positive_integer_token) : BOOLEAN; LOCAL leap_year : BOOLEAN; valid : BOOLEAN; END_LOCAL; leap_year := (yy mod 4 = 0) AND ((yy mod 100 <> 0) OR (yy mod 400 = 0)); CASE mm OF 1, 3, 5, 7, 8, 10, 12 : valid := dd <= 31; 4, 6, 9, 11 : valid := dd <= 30; 2 : IF leap_year THEN valid := dd <= 29; ELSE valid := dd <= 28; END_IF; OTHERWISE : valid := false; END_CASE; RETURN(valid); END_FUNCTION; END_SCHEMA; SCHEMA display_model; (* ** The display_model schema defines the geometry_display elements which can be ** used to describe "dumb graphics", schematic symbols, stick diagrams, ** interconnect or layout. These display elements have associated display ** attributes such as colour and fill pattern for display purposes. *) REFERENCE FROM geometry_model (closed_area_element, dot, geometry_element, integer_point, open_element, rectangle); REFERENCE FROM instantiatable_object_model (geometry_macro); REFERENCE FROM library_model (figure_group); REFERENCE FROM support_definition_model (angle_value, boolean_token, degree_value, fraction, integer_token, number_token, not_exists, positive_integer_token, property, property_override, string_token, text_measurement_value, width_value); (* ** This section describes some graphical attributes which are for display ** purposes. That includes path_corner_type, path_end_type, path_width, ** justification, colour and pixel_pattern. *) TYPE path_corner_type = ENUMERATION OF (extend, round, truncate); END_TYPE; TYPE path_end_type = ENUMERATION OF (extend, round, truncate); END_TYPE; TYPE justification = ENUMERATION OF (upperleft, uppercenter, upperright, centerleft, centercenter, centerright, lowerleft, lowercenter, lowerright); END_TYPE; (* ** A colour_intensity is used to define the intensity of each of the red, green ** and blue colours. *) TYPE colour_intensity = number_token; WHERE valid_intensity : (* Value of colour_intensity is between zero and hundred. *) { 0 <= SELF <= 100 }; END_TYPE; ENTITY colour; red, green, blue : colour_intensity; END_ENTITY; (* ** A pixel_pattern is used to describe fillpattern and borderpattern. *) ENTITY pixel_pattern; x_pixels : positive_integer_token; y_pixels : positive_integer_token; boolean_array : ARRAY [0 : SELF.x_pixels-1] OF ARRAY [0 : SELF.y_pixels-1] OF boolean_token; END_ENTITY; (* ** A figure associates a group of geometry elements with a figure_group. A ** figure may override the default graphic attributes defined in the associated ** figure_group. ** ** NOTE : The figure construct is merely for grouping geometry_displays. *) ENTITY figure; associated_figure_group : figure_group; -- reference associated_geometries : OPTIONAL BAG [1:?] OF geometry_element; associated_geometry_macros : OPTIONAL BAG [1:?] OF geometry_macro; overriding_border_pattern : OPTIONAL pixel_pattern; overriding_border_width : OPTIONAL width_value; overriding_border_visible : OPTIONAL boolean_token; overriding_colour_index : OPTIONAL colour; overriding_corner_type : OPTIONAL path_corner_type; overriding_end_type : OPTIONAL path_end_type; overriding_fill_pattern : OPTIONAL pixel_pattern; overriding_fill_pattern_visible : OPTIONAL boolean_token; overriding_path_width : OPTIONAL width_value; overriding_properties : OPTIONAL SET [1:?] OF property_override; overriding_visible : OPTIONAL boolean_token; DERIVE members : BAG OF geometry_display := flatten_figure (SELF); WHERE valid_overriding_properties : (* The overridden properties are defined in the associated_figure_group.*) not_exists(QUERY(figure_group_property_override <* overriding_properties | NOT(figure_group_property_override.overridden_property IN associated_figure_group.properties))); END_ENTITY; (* ** A geometry_display is a primitive graphic element. It associates a single ** geometry element with a figure_group. The hierarchy of geometry_display is ** very similar to the hierarchy of geometry_element. It tries to describe ** what kind of graphical attributes are appropriate in each type of ** geometry_display. For example, when a dot is displayed, only colour and ** visible are meaningful graphical attributes. A geometry_display refers to a ** figure_group for default graphic attributes, however, it is able to override ** the defaults. *) ENTITY geometry_display ABSTRACT SUPERTYPE OF (ONEOF(dot_display, closed_area_display, path_display)); associated_figure_group : figure_group; -- reference has_colour : colour; has_visible : boolean_token; END_ENTITY; ENTITY dot_display SUBTYPE OF (geometry_display); geometry : dot; END_ENTITY; (* ** A path_display is used to display a path or an open_shape. When an ** open_element is displayed, the following graphical attributes are ** applicable: border pattern, border width, corner type, end type, fill ** pattern and path width. *) ENTITY path_display SUBTYPE OF (geometry_display); geometry : open_element; has_border_pattern : pixel_pattern; has_border_width : width_value; has_border_visible : boolean_token; has_corner_type : path_corner_type; has_end_type : path_end_type; has_fill_pattern : pixel_pattern; has_fill_pattern_visible : boolean_token; has_path_width : width_value; END_ENTITY; (* ** A closed_area_display is used to display circle, polygon, rectangle, shape. ** When a closed_area_element is displayed, the following graphical attributes ** are applicable : borderpattern, borderwidth and fillpattern. *) ENTITY closed_area_display SUBTYPE OF (geometry_display); geometry : closed_area_element; has_border_pattern : pixel_pattern; has_border_width : width_value; has_border_visible : boolean_token; has_fill_pattern : pixel_pattern; has_fill_pattern_visible : boolean_token; END_ENTITY; (* ** A transform is used to locate an instance or an instantiatable object in a ** view of a cell provided that the view has an associated coordinate space. ** An origin is given to describe the translation point of an instance. The ** rotation attribute is used to specify a counter clockwise rotation angle to ** be applied as part of a transformation. Two scaling factors are specified ** in both the x direction and the y direction. *) ENTITY transform; origin : integer_point; rotation : angle_value; scale_x, scale_y : fraction; WHERE valid_scale_x : (* The specified fraction value must be positive. *) (scale_x.numerator >= 0) AND (scale_x.denominator > 0) OR (scale_x.numerator <= 0) AND (scale_x.denominator < 0); valid_scale_y : (* The specified fraction value must be positive. *) (scale_y.numerator >= 0) AND (scale_y.denominator > 0) OR (scale_y.numerator <= 0) AND (scale_y.denominator < 0); END_ENTITY; (* ** A display describes all the information to display text. *) ENTITY display; associated_figure_group : figure_group; -- reference mirror_x, mirror_y : BOOLEAN; origin : integer_point; overriding_justify : OPTIONAL justification; overriding_colour : OPTIONAL colour; overriding_text_height : OPTIONAL text_measurement_value; overriding_text_width : OPTIONAL text_measurement_value; overriding_visible : OPTIONAL boolean_token; rotation : angle_value; END_ENTITY; (* ** A display_override is used to change the default display positions for an ** attribute defined in a template. *) ENTITY display_override ABSTRACT SUPERTYPE OF (ONEOF(remove_display, alter_display)); END_ENTITY; (* ** A remove_display is used to remove display positions for an attribute that ** is to be displayed in a template but not in a particular use of the ** template. *) ENTITY remove_display SUBTYPE OF (display_override); END_ENTITY; (* ** An alter_display is used to change display positions for an attribute that ** is to be displayed. The reason of change may be to provide additional ** display positions or to replace display positions for an attribute. *) ENTITY alter_display SUBTYPE OF (display_override); display_information : OPTIONAL BAG [1:?] OF display; reason : alter_display_reason; END_ENTITY; (* ** An alter_display_reason indicates whether additional display positions or ** alternative display positions are provided for an attribute. *) TYPE alter_display_reason = ENUMERATION OF (add, replace); END_TYPE; ENTITY string_display; display_data : string_token; display_information : OPTIONAL BAG [1:?] OF display; END_ENTITY; ENTITY comment_graphics; annotate : OPTIONAL BAG [1:?] OF string_display; figures : OPTIONAL BAG [1:?] OF figure; END_ENTITY; FUNCTION flatten_figure (fig : figure) : BAG OF geometry_display; ; -- This function flattens a figure into its primitive geometry_display. END_FUNCTION; END_SCHEMA; SCHEMA documentation_model; (* ** The documentation_model describes the documentation provided for an object. *) REFERENCE FROM design_management_model (copyright, written); REFERENCE FROM display_model (colour, display, figure, string_display); REFERENCE FROM support_definition_model (angle_unit, belongs_to_one, distance_unit, either_belongs_to_one, string_token); (* ** A documentation is used to provide documentation for an object. It may ** include both text and diagrams. *) ENTITY documentation; background_colour : colour; sections : OPTIONAL LIST [1:?] OF section; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; units : documentation_units; WHERE containment_constraint : either_belongs_to_one(SELF, ['edif_information_model.edif.document', 'hierarchy_model.cell.document', 'hierarchy_model.cell_representation.document', 'hierarchy_model.cluster.document', 'hierarchy_model.design.document', 'hierarchy_model.view_group.document', 'instantiatable_object_model.geometry_macro_template.document', 'instantiatable_object_model.schematic_template.document', 'library_model.library.document', 'schematic_implementation_model.page.document']); END_ENTITY; ENTITY documentation_units; set_angle : angle_unit; set_distance : distance_unit; END_ENTITY; (* ** A section is used to divide a document into sections. An EDIF string_token ** is used to give a title to a section. Sections may be nested with other ** sections. The body of the section is constructed using any number of EDIF ** string_tokens. *) ENTITY section; contents : OPTIONAL BAG [1:?] OF string_token; diagrams : OPTIONAL SET [1:?] OF diagram; sub_sections : OPTIONAL LIST [1:?] OF section; title : string_token; WHERE containment_constraint : (* A section belongs to either one documentation, or another section. *) either_belongs_to_one(SELF, ['documentation_model.documentation.sections', 'documentation_model.section.sub_sections']); END_ENTITY; (* ** A diagram is used to add graphical information to a section within ** documentation. *) ENTITY diagram; annotate : OPTIONAL BAG [1:?] OF string_display; figures : OPTIONAL BAG [1:?] OF figure; WHERE containment_constraint : (* A diagram belongs to one section. *) belongs_to_one(SELF, 'documentation_model.section.diagrams'); END_ENTITY; END_SCHEMA; SCHEMA edif_information_model; REFERENCE FROM connectivity_view_model (connectivity_units); REFERENCE FROM design_hierarchy_model (design); REFERENCE FROM design_management_model (copyright, written); REFERENCE FROM documentation_model (documentation, documentation_units); REFERENCE FROM instantiatable_object_model (geometry_macro_units); REFERENCE FROM library_model (library); REFERENCE FROM schematic_view_model (schematic_units); REFERENCE FROM support_definition_model (belongs_to_one, name_information, not_defined, not_exists, private_property, property, string_token, unit, usedin_one_role); (* ** An EDIF file may contain several designs and several libraries of cell ** definitions. The reason that units are defined at this level is to allow the ** same unit to be used in more than one library. *) ENTITY edif; character_encoding : character_encoding; designs : OPTIONAL SET [1:?] OF design; document : OPTIONAL SET [1:?] OF documentation; global_ports : OPTIONAL SET [1:?] OF global_port; global_port_bundles : OPTIONAL SET [1:?] OF global_port_bundle; libraries : OPTIONAL SET [1:?] OF library; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; property_declarations : OPTIONAL SET [1:?] OF property_declaration; scaling_information : physical_scaling; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; END_ENTITY; (* ** The physical_scaling is used to collect all scaling information for an ** edif file. It may provide default scales for geometry_macro_templates and ** different types of cell representation defined within an edif file. *) ENTITY physical_scaling; default_connectivity_units : connectivity_units; default_documentation_units : documentation_units; default_geometry_macro_units : geometry_macro_units; default_schematic_units : schematic_units; unit_definitions : OPTIONAL SET [1:?] OF unit; END_ENTITY; (* ** A global_port is used to establish connectivity across instances within an ** instance hierarchy without passing signals through the ports of the cells ** instantiated in the hierarchy. All signals in an instance hierarchy which ** refer to the same global_port are connected together, unless the global_port ** is scoped. *) ENTITY global_port; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; DERIVE containing_edif : edif -- reference := usedin_one_role(SELF, 'edif_information_model.edif.global_ports'); width : INTEGER := 1; WHERE containment_constraint : (* A global_port belongs to one edif. *) belongs_to_one(SELF, 'edif_information_model.edif.global_ports'); END_ENTITY; (* ** A global_port_bundle provides a structuring mechanism to describe a wide ** global port. The size of a global_port_bundle can be greater than or equal ** to one. *) ENTITY global_port_bundle; member_ports : LIST [1:?] OF UNIQUE -- reference global_port_or_global_port_bundle; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; DERIVE containing_edif : edif -- reference := usedin_one_role(SELF, 'edif_information_model.edif.global_port_bundles'); flattened_port_list : LIST [1:?] OF UNIQUE global_port -- reference := flatten_global_port_bundle(member_ports); width : INTEGER := SIZEOF(flattened_port_list); WHERE containment_constraint : (* A global_port_bundle belongs to one edif. *) belongs_to_one(SELF, 'edif_information_model.edif.global_port_bundles'); valid_member_ports_in_same_edif : (* All member global_ports or global_port_bundles are defined in the same containing_edif. *) not_exists(QUERY(member_port <* member_ports | member_port.containing_edif :<>: containing_edif)); valid_member_ports : (* A global_port_bundle cannot contain itself either directly or indirectly. *) not_defined; END_ENTITY; TYPE global_port_or_global_port_bundle = SELECT (global_port, global_port_bundle); END_TYPE; (* ** The flatten_global_port_bundle function returns the flattened list of ** global_ports of a global_port_bundle. *) FUNCTION flatten_global_port_bundle (bundle_members : LIST OF global_port_or_global_port_bundle) : LIST OF global_port; LOCAL i : INTEGER; position : INTEGER := 1; port_list : LIST OF global_port := [ ]; member_list : LIST OF global_port := [ ]; END_LOCAL; REPEAT i := 1 TO HIINDEX(bundle_members); IF 'global_port' IN TYPEOF(bundle_members[i]) THEN INSERT(port_list, bundle_members[i], position); position := position + 1; ELSE member_list:=flatten_global_port_bundle(bundle_members[i].member_ports); INSERT(port_list, member_list, position); position := position + SIZEOF(member_list); END_IF; END_REPEAT; RETURN(port_list); END_FUNCTION; (* ** A constraint is required for entity edif to check that there is only one ** instance of edif in the information base. *) RULE only_one_instance FOR (edif); WHERE valid_size : (* There is only one instance of edif in the information base. *) SIZEOF(edif) = 1; END_RULE; TYPE character_encoding = ENUMERATION OF (ascii, iso8859_part_1, iso8859_part_2, iso8859_part_3, iso8859_part_4, iso8859_part_5, iso8859_part_6, iso8859_part_7, iso8859_part_8, jisx0201, jisx0208); END_TYPE; ENTITY property_declaration ABSTRACT SUPERTYPE OF (ONEOF(boolean_property_declaration, integer_property_declaration, minomax_property_declaration, number_property_declaration, point_property_declaration, string_property_declaration, untyped_property_declaration)); name : OPTIONAL name_information; owner : OPTIONAL string_token; properties : OPTIONAL SET [1:?] OF property; WHERE valid_properties : (* A property_declaration cannot contain properties which reference itself, either directly or indirectly. *) not_defined; END_ENTITY; ENTITY boolean_property_declaration SUBTYPE OF (property_declaration); END_ENTITY; ENTITY integer_property_declaration SUBTYPE OF (property_declaration); referenced_unit : OPTIONAL unit; -- reference END_ENTITY; ENTITY minomax_property_declaration SUBTYPE OF (property_declaration); referenced_unit : OPTIONAL unit; -- reference END_ENTITY; ENTITY number_property_declaration SUBTYPE OF (property_declaration); referenced_unit : OPTIONAL unit; -- reference END_ENTITY; ENTITY point_property_declaration SUBTYPE OF (property_declaration); referenced_unit : OPTIONAL unit; -- reference END_ENTITY; ENTITY string_property_declaration SUBTYPE OF (property_declaration); END_ENTITY; ENTITY untyped_property_declaration SUBTYPE OF (property_declaration); END_ENTITY; END_SCHEMA; SCHEMA instantiatable_object_model; (* ** The instantiatable_object_model schema describes a class of reusable ** templates which are defined once and may be used many times. Some templates ** can be used in many view types, for example, geometry_macro_template. Some ** other templates may only be used in certain view types. For example, ** templates for schematic_figure_macro, schematic_offpageconnector, ** schematic_onpageconnector and schematic_master_port_representation may be ** used in schematic views only. *) REFERENCE FROM design_management_model (copyright, date, written); REFERENCE FROM display_model (colour, comment_graphics, display, figure, string_display, transform); REFERENCE FROM documentation_model (documentation); REFERENCE FROM geometry_model (geometry_element, integer_point, rectangle); REFERENCE FROM schematic_implementation_model (schematic_ripper); REFERENCE FROM schematic_view_model (schematic_units); REFERENCE FROM support_definition_model (angle_unit, belongs_to_one, boolean_token, capacitance_unit, current_unit, distance_unit, either_belongs_to_one, integer_token, name_information, not_defined, not_exists, private_property, property, property_display, string_token, time_unit, usedin_one_role, voltage_unit); TYPE internal_template = SELECT (internal_geometry_macro_template, internal_page_border_template, internal_page_title_block_template, internal_schematic_figure_macro_template, internal_schematic_global_port_representation_template, internal_schematic_junction_template, internal_schematic_master_port_representation_template, internal_schematic_offpageconnector_template, internal_schematic_onpageconnector_template, internal_schematic_ripper_template, internal_schematic_symbol_port_representation_template, internal_schematic_terminator_template, internal_symbol_border_template); WHERE containment_constraint : (* An internal_template belongs to one internal_library. *) belongs_to_one(SELF, 'library_model.internal_library.templates'); END_TYPE; TYPE external_template = SELECT (external_geometry_macro_template, external_page_border_template, external_page_title_block_template, external_schematic_figure_macro_template, external_schematic_global_port_representation_template, external_schematic_junction_template, external_schematic_master_port_representation_template, external_schematic_offpageconnector_template, external_schematic_onpageconnector_template, external_schematic_ripper_template, external_schematic_symbol_port_representation_template, external_schematic_terminator_template, external_symbol_border_template); WHERE containment_constraint : (* An external_template belongs to one external_library. *) belongs_to_one(SELF, 'library_model.external_library.templates'); END_TYPE; (* ** The port_direction_indicator is used to give the direction information of ** the schematic_master_port_representation_template and ** schematic_symbol_port_representation_template. It indicates whether the ** template is suitable for association with an input port, output port, ** bidirectional port or unspecified direction port. If the direction ** indicator of template is unrestricted, the template may be associated with a ** port of any direction. *) TYPE port_direction_indicator = ENUMERATION OF (input, output, bidirectional, unspecified, unrestricted, mixed_direction); END_TYPE; (* ** The schematic_wire_affinity is used to indicate whether the hotspot is ** suitable for association with a narrow or wide wire structure. *) TYPE schematic_wire_affinity = ENUMERATION OF (narrow_wire, wide_wire, unrestricted); END_TYPE; (* ** The schematic_port_affinity is used to indicate whether the template is ** suitable for association with a narrow or wide port structure. *) TYPE schematic_port_affinity = ENUMERATION OF (narrow_port, wide_port, unrestricted); END_TYPE; (* ** A hotspot defines the connection point for various types of templates. *) ENTITY hotspot; hotspot_name : OPTIONAL name_information; hotspot_name_display_slot : OPTIONAL BAG [1:?] OF display; position : integer_point; schematic_wire_affinity : schematic_wire_affinity; END_ENTITY; ENTITY schematic_template ABSTRACT SUPERTYPE OF (ONEOF(page_border_template, page_title_block_template, schematic_figure_macro_template, schematic_global_port_representation_template, schematic_junction_template, schematic_master_port_representation_template, schematic_offpageconnector_template, schematic_onpageconnector_template, schematic_ripper_template, schematic_symbol_port_representation_template, schematic_terminator_template, symbol_border_template)); background_colour : colour; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; units : schematic_units; WHERE valid_property_displays : (* The displayed properties are defined in the template. *) not_exists(QUERY(template_property_display <* property_displays | NOT (template_property_display.displayed_property IN properties))); END_ENTITY; (* ** A schematic_offpageconnector_template contains information which is used in ** the definition of an offpageconnector on a schematic page. *) ENTITY schematic_offpageconnector_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_offpageconnector_template, internal_schematic_offpageconnector_template)) SUBTYPE OF (schematic_template); hotspot : hotspot; END_ENTITY; ENTITY external_schematic_offpageconnector_template SUBTYPE OF (schematic_offpageconnector_template); END_ENTITY; ENTITY internal_schematic_offpageconnector_template SUBTYPE OF (schematic_offpageconnector_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; associated_interconnect_name_display_slot : OPTIONAL BAG [1:?] OF display; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_onpageconnector_template contains information which is used in ** the definition of an onpageconnector on a schematic page. *) ENTITY schematic_onpageconnector_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_onpageconnector_template, internal_schematic_onpageconnector_template)) SUBTYPE OF (schematic_template); hotspot : hotspot; END_ENTITY; ENTITY external_schematic_onpageconnector_template SUBTYPE OF (schematic_onpageconnector_template); END_ENTITY; ENTITY internal_schematic_onpageconnector_template SUBTYPE OF (schematic_onpageconnector_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; associated_interconnect_name_display_slot : OPTIONAL BAG [1:?] OF display; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_master_port_representation_template contains information which ** is used in the definition of a representation of a master port on a ** schematic page. *) ENTITY schematic_master_port_representation_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_master_port_representation_template, internal_schematic_master_port_representation_template)) SUBTYPE OF (schematic_template); direction_indicator : port_direction_indicator; hotspot : hotspot; schematic_port_affinity : schematic_port_affinity; END_ENTITY; ENTITY external_schematic_master_port_representation_template SUBTYPE OF (schematic_master_port_representation_template); END_ENTITY; ENTITY internal_schematic_master_port_representation_template SUBTYPE OF (schematic_master_port_representation_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; ac_load_display_slot : OPTIONAL BAG [1:?] OF display; dc_fanin_load_display_slot : OPTIONAL BAG [1:?] OF display; dc_fanout_load_display_slot : OPTIONAL BAG [1:?] OF display; dc_max_fanin_display_slot : OPTIONAL BAG [1:?] OF display; dc_max_fanout_display_slot : OPTIONAL BAG [1:?] OF display; designator_display_slot : OPTIONAL BAG [1:?] OF display; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; port_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_symbol_port_representation_template contains information which ** is used in the definition of a representation of a master port in an ** internal_schematic_symbol. *) ENTITY schematic_symbol_port_representation_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_symbol_port_representation_template, internal_schematic_symbol_port_representation_template)) SUBTYPE OF (schematic_template); direction_indicator : port_direction_indicator; hotspot : hotspot; schematic_port_affinity : schematic_port_affinity; END_ENTITY; ENTITY external_schematic_symbol_port_representation_template SUBTYPE OF (schematic_symbol_port_representation_template); END_ENTITY; ENTITY internal_schematic_symbol_port_representation_template SUBTYPE OF (schematic_symbol_port_representation_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; ac_load_display_slot : OPTIONAL BAG [1:?] OF display; dc_fanin_load_display_slot : OPTIONAL BAG [1:?] OF display; dc_fanout_load_display_slot : OPTIONAL BAG [1:?] OF display; dc_max_fanin_display_slot : OPTIONAL BAG [1:?] OF display; dc_max_fanout_display_slot : OPTIONAL BAG [1:?] OF display; designator_display_slot : OPTIONAL BAG [1:?] OF display; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; port_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_global_port_representation_template contains information which ** is used in the definition of a representation of a global_port on a ** schematic page. *) ENTITY schematic_global_port_representation_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_global_port_representation_template, internal_schematic_global_port_representation_template)) SUBTYPE OF (schematic_template); hotspot : hotspot; END_ENTITY; ENTITY external_schematic_global_port_representation_template SUBTYPE OF (schematic_global_port_representation_template); END_ENTITY; ENTITY internal_schematic_global_port_representation_template SUBTYPE OF (schematic_global_port_representation_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; global_port_name_display_slot : OPTIONAL BAG [1:?] OF display; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_ripper_template contains information which is used in the ** definition of a ripper on a schematic page. It must have at least two ** hotspots. *) ENTITY schematic_ripper_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_ripper_template, internal_schematic_ripper_template)) SUBTYPE OF (schematic_template); hotspots : SET [2 : ?] OF ripper_hotspot; END_ENTITY; ENTITY ripper_hotspot; hotspot_name : OPTIONAL name_information; hotspot_name_display_slot : OPTIONAL BAG [1:?] OF display; position : integer_point; schematic_wire_affinity : schematic_wire_affinity; DERIVE containing_template : schematic_ripper_template := usedin_one_role(SELF, 'instantiatable_object_model.schematic_ripper_template.hotspots'); containing_ripper : schematic_ripper := usedin_one_role(SELF, 'schematic_implementation_model.schematic_ripper.hotspots'); WHERE containment_constraint : (* A ripper_hotspot belongs to either one schematic_ripper_template or one schematic_ripper. *) either_belongs_to_one(SELF, ['instantiatable_object_model.schematic_ripper_template.hotspots', 'schematic_implementation_model.schematic_ripper.hotspots']); END_ENTITY; ENTITY external_schematic_ripper_template SUBTYPE OF (schematic_ripper_template); END_ENTITY; ENTITY internal_schematic_ripper_template SUBTYPE OF (schematic_ripper_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_junction_template contains information which is used in the ** definition of a junction on a schematic page. *) ENTITY schematic_junction_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_junction_template, internal_schematic_junction_template)) SUBTYPE OF (schematic_template); hotspot : hotspot; END_ENTITY; ENTITY external_schematic_junction_template SUBTYPE OF (schematic_junction_template); END_ENTITY; ENTITY internal_schematic_junction_template SUBTYPE OF (schematic_junction_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_terminator_template contains information which is used in the ** definition of a terminator on a schematic page. *) ENTITY schematic_terminator_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_terminator_template, internal_schematic_terminator_template)) SUBTYPE OF (schematic_template); hotspot : hotspot; END_ENTITY; ENTITY external_schematic_terminator_template SUBTYPE OF (schematic_terminator_template); END_ENTITY; ENTITY internal_schematic_terminator_template SUBTYPE OF (schematic_terminator_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; implementation_name_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A page_border_template is an instantiatable object which can be used to ** define a border on a schematic page. *) ENTITY page_border_template ABSTRACT SUPERTYPE OF (ONEOF(external_page_border_template, internal_page_border_template)) SUBTYPE OF (schematic_template); usable_area : SET OF rectangle; END_ENTITY; ENTITY external_page_border_template SUBTYPE OF (page_border_template); END_ENTITY; ENTITY internal_page_border_template SUBTYPE OF (page_border_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; END_ENTITY; (* ** A symbol_border_template is an instantiatable object which can be used to ** define a border for an internal_schematic_symbol. *) ENTITY symbol_border_template ABSTRACT SUPERTYPE OF (ONEOF(external_symbol_border_template, internal_symbol_border_template)) SUBTYPE OF (schematic_template); usable_area : SET OF rectangle; END_ENTITY; ENTITY external_symbol_border_template SUBTYPE OF (symbol_border_template); END_ENTITY; ENTITY internal_symbol_border_template SUBTYPE OF (symbol_border_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; END_ENTITY; (* ** A page_title_block_template is an instantiatable object which can be used to ** define a title block on a schematic page. *) ENTITY page_title_block_template ABSTRACT SUPERTYPE OF (ONEOF(external_page_title_block_template, internal_page_title_block_template)) SUBTYPE OF (schematic_template); END_ENTITY; ENTITY external_page_title_block_template SUBTYPE OF (page_title_block_template); END_ENTITY; ENTITY internal_page_title_block_template SUBTYPE OF (page_title_block_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; approved_date : OPTIONAL date; approved_date_display_slot : OPTIONAL BAG [1:?] OF display; checked_date : OPTIONAL date; checked_date_display_slot : OPTIONAL BAG [1:?] OF display; company_name : OPTIONAL string_token; company_name_display_slot : OPTIONAL BAG [1:?] OF display; contract : OPTIONAL string_token; contract_display_slot : OPTIONAL BAG [1:?] OF display; drawing_date : OPTIONAL date; drawing_date_display_slot : OPTIONAL BAG [1:?] OF display; drawing_description : OPTIONAL string_token; drawing_description_display_slot : OPTIONAL BAG [1:?] OF display; drawing_identification : OPTIONAL string_token; drawing_identification_display_slot : OPTIONAL BAG [1:?] OF display; drawing_size : OPTIONAL string_token; drawing_size_display_slot : OPTIONAL BAG [1:?] OF display; engineering_date : OPTIONAL date; engineering_date_display_slot : OPTIONAL BAG [1:?] OF display; page_identification : OPTIONAL string_token; page_identification_display_slot : OPTIONAL BAG [1:?] OF display; revision : OPTIONAL string_token; revision_display_slot : OPTIONAL BAG [1:?] OF display; title : OPTIONAL string_token; title_display_slot : OPTIONAL BAG [1:?] OF display; total_pages_display_slot : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A schematic_figure_macro_template is a grouping of dumb graphics and text. *) ENTITY schematic_figure_macro_template ABSTRACT SUPERTYPE OF (ONEOF(external_schematic_figure_macro_template, internal_schematic_figure_macro_template)) SUBTYPE OF (schematic_template); END_ENTITY; ENTITY external_schematic_figure_macro_template SUBTYPE OF (schematic_figure_macro_template); END_ENTITY; ENTITY internal_schematic_figure_macro_template SUBTYPE OF (schematic_figure_macro_template); associated_annotate : OPTIONAL BAG [1:?] OF string_display; associated_comment_graphics : OPTIONAL BAG [1:?] OF comment_graphics; associated_figures : OPTIONAL BAG [1:?] OF figure; associated_figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; WHERE non_recursive_constraint : (* An internal_schematic_figure_macro_template contains occurrences of other schematic_figure_macro_templates only. *) not_defined; END_ENTITY; ENTITY schematic_figure_macro; instantiated_template : schematic_figure_macro_template; -- reference template_position : transform; WHERE containment_constraint : (* Schematic_figure_macro is used in the context where figure can be used. *) not_defined; END_ENTITY; (* ** A geometry_macro_template is a collection of geometry primitives. An ** occurrence can be used in the definition of a figure. It may contain ** occurrences of other geometry_macro_templates. *) ENTITY geometry_macro_template ABSTRACT SUPERTYPE OF (ONEOF(external_geometry_macro_template, internal_geometry_macro_template)); background_colour : colour; document : OPTIONAL SET [1:?] OF documentation; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; units : geometry_macro_units; END_ENTITY; ENTITY geometry_macro_units; set_angle : angle_unit; END_ENTITY; ENTITY external_geometry_macro_template SUBTYPE OF (geometry_macro_template); END_ENTITY; ENTITY internal_geometry_macro_template SUBTYPE OF (geometry_macro_template); geometries : OPTIONAL BAG [1:?] OF geometry_element; geometry_macros : OPTIONAL BAG [1:?] OF geometry_macro; WHERE non_recursive_constraint : (* An internal_geometry_macro_template contains occurrences of other geometry_macro_templates only. *) not_defined; END_ENTITY; ENTITY geometry_macro; instantiated_template : geometry_macro_template; -- reference template_position : transform; WHERE containment_constraint : (* A geometry_macro is either used in an internal_geometry_macro_template or a figure. *) either_belongs_to_one(SELF, ['instantiatable_object_model.internal_geometry_macro_template.geometry_macros', 'display_model.figure.associated_geometry_macros']); END_ENTITY; END_SCHEMA; SCHEMA logical_connectivity_model; (* ** The logical_connectivity_model schema describes the logical connectivity ** information which is similar among all EDIF view types. The logical ** connectivity of a view may include signals and signal_groups. *) REFERENCE FROM edif_information_model (edif, global_port); REFERENCE FROM hierarchy_model (instance_port, cell_representation, cluster, instance, master_port); REFERENCE FROM support_definition_model (either_belongs_to_one, name_information, not_defined, not_exists, private_property, usedin_any_one_role); (* ** A signal is defined as a named object which lists all the master_ports, ** instance_ports and global_ports which are electrically common at a given ** level of hierarchy. It is always one-bit wide. *) ENTITY signal; joined_global_ports : OPTIONAL SET [1:?] OF global_port; -- reference joined_instance_ports : OPTIONAL SET [1:?] OF instance_port; -- reference joined_master_ports : OPTIONAL SET [1:?] OF master_port; -- reference name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; DERIVE containing_cluster : cluster -- reference := containing_view.containing_cluster; containing_edif : edif -- reference := containing_cluster.containing_cell.containing_library.containing_edif; containing_view : cell_representation -- reference := usedin_any_one_role(SELF, ['connectivity_view_model.internal_connectivity_view.signals', 'schematic_view_model.internal_schematic_view.signals']); WHERE containment_constraint : (* A signal belongs to either one internal_connectivity_view or one internal_schematic_view. *) either_belongs_to_one(SELF, ['connectivity_view_model.internal_connectivity_view.signals', 'schematic_view_model.internal_schematic_view.signals']); valid_joined_global_ports : (* All joined global_ports are defined in the containing edif of the signal. *) joined_global_ports <= containing_edif.global_ports; valid_joined_instance_ports : (* All joined instance_ports refer to the instances in the containing view of the signal. No joined instance_port is unused externally. *) not_exists(QUERY(port <* joined_instance_ports | NOT (port.reference_instance IN containing_view.instances))); valid_joined_master_ports : (* All joined master_ports are defined in the interface of the cluster containing the signal. No joined master_port is unused internally. *) (joined_master_ports <= containing_cluster.interface.ports) AND not_exists(QUERY(port <* joined_master_ports | port.unused_internally)); END_ENTITY; (* ** A global_port_scope establishes a scope of a global port in an instance ** hierarchy. This indicates that any reference to the referenced_global_port ** within all instances along the instance hierarchy are connected together to ** the referenced_signal. *) ENTITY global_port_scope; referenced_global_port : global_port; -- reference referenced_instance : instance; -- reference referenced_signal : signal; -- reference DERIVE containing_view : cell_representation -- reference := usedin_any_one_role(SELF, ['connectivity_view_model.internal_connectivity_view.global_port_scopes', 'schematic_view_model.internal_schematic_view.global_port_scopes']); WHERE containment_constraint : (* A global_port_scope belongs to either one internal_connectivity_view or one internal_schematic_view. *) either_belongs_to_one(SELF, ['connectivity_view_model.internal_connectivity_view.global_port_scopes', 'schematic_view_model.internal_schematic_view.global_port_scopes']); valid_referenced_instance : (* The referenced_instance must be defined in the containing view. *) referenced_instance IN containing_view.instances; valid_referenced_signal : (* The referenced_signal must be defined in the containing view. *) referenced_signal IN containing_view.signals; valid_global_port_and_instance : (* The referenced global_port must be defined in the containing edif of the instantiated cluster from which the instance is made. *) referenced_global_port IN referenced_instance .instantiated_cluster .containing_cell .containing_library .containing_edif .global_ports; END_ENTITY; (* ** A signal_group is defined as a named object which provides a grouping ** mechanism for signals. This provides a basis for the structured connectivity. *) ENTITY signal_group; members : LIST [1:?] OF -- reference signal_or_signal_group; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; DERIVE containing_view : cell_representation -- reference := usedin_any_one_role(SELF, ['connectivity_view_model.internal_connectivity_view.signal_groups', 'schematic_view_model.internal_schematic_view.signal_groups']); flattened_signal_list : LIST [1:?] OF signal -- reference := flatten_signal_group(members); UNIQUE unique_members : (* No two signal_groups have the same structure of members. *) members; WHERE containment_constraint : (* A signal_group belongs to either one internal_connectivity_view or one internal_schematic_view. *) either_belongs_to_one(SELF, ['connectivity_view_model.internal_connectivity_view.signal_groups', 'schematic_view_model.internal_schematic_view.signal_groups']); valid_members : (* All member signals or signal_groups are defined in the containing view of the signal_group. *) not_exists(QUERY(member <* members | member.containing_view :<>: containing_view)); used_by_bus_structure : (* A signal_group must be referenced by at least one bus, bus_slice or sub_bus structure in the containing view. *) not_defined; non_recursive_constraint : (* A signal_group cannot contain itself either directly or indirectly. *) not_recursive_signal_group([SELF], [SELF]); END_ENTITY; TYPE signal_or_signal_group = SELECT (signal, signal_group); END_TYPE; (* ** The flatten_signal_group function returns the flattened list of signals of a ** signal_group. *) FUNCTION flatten_signal_group (signal_group_members : LIST OF signal_or_signal_group) : LIST OF signal; LOCAL i : INTEGER; position : INTEGER := 1; signal_list : LIST OF signal := [ ]; member_list : LIST OF signal := [ ]; END_LOCAL; REPEAT i := 1 TO HIINDEX(signal_group_members); IF 'signal' IN TYPEOF(signal_group_members[i]) THEN INSERT(signal_list, signal_group_members[i], position); position := position + 1; ELSE member_list := flatten_signal_group(signal_group_members[i].members); INSERT(signal_list, member_list, position); position := position + SIZEOF(member_list); END_IF; END_REPEAT; RETURN(signal_list); END_FUNCTION; (* ** The not_recursive_signal_group function returns true if a signal_group does ** not contain members which reference itself. It prevents cyclic definition ** of a signal_group. *) FUNCTION not_recursive_signal_group (parents, invalid_ancestors : SET OF signal_group) : BOOLEAN; LOCAL i, j : INTEGER; descendants : SET OF signal_group := [ ]; END_LOCAL; REPEAT i := 1 TO HIINDEX(parents); REPEAT j := 1 TO HIINDEX(parents[i].members); IF 'signal_group' IN TYPEOF(parents[i].members[j]) THEN descendants := descendants + parents[i].members[j]; END_IF; END_REPEAT; END_REPEAT; RETURN (not_exists(descendants) OR (not_exists(descendants * invalid_ancestors) AND not_recursive_signal_group(descendants, parents + invalid_ancestors))); END_FUNCTION; END_SCHEMA; SCHEMA schematic_implementation_model; REFERENCE FROM connectivity_structure_model (bus_joined_ports_in_parallel); REFERENCE FROM design_management_model (copyright, date, written); REFERENCE FROM display_model (colour, comment_graphics, display, display_override, figure, string_display, transform); REFERENCE FROM documentation_model (documentation); REFERENCE FROM edif_information_model (global_port, global_port_bundle, global_port_or_global_port_bundle); REFERENCE FROM geometry_model (integer_point, rectangle); REFERENCE FROM hierarchy_model (cell_representation, interconnect_delay, interconnect_delay_display, instance, instance_group, instance_group_port, instance_group_port_bundle, instance_port, instance_port_bundle, master_port, master_port_bundle, master_port_or_master_port_bundle, port_delay_display, port_load_delay_display, timing_display); REFERENCE FROM instantiatable_object_model (page_border_template, page_title_block_template, ripper_hotspot, schematic_figure_macro, schematic_junction_template, schematic_global_port_representation_template, schematic_master_port_representation_template, schematic_offpageconnector_template, schematic_onpageconnector_template, schematic_ripper_template, schematic_terminator_template); REFERENCE FROM logical_connectivity_model (signal, signal_group); REFERENCE FROM schematic_view_model (internal_schematic_view); REFERENCE FROM support_definition_model (belongs_to_one, either_belongs_to_one, integer_distance_value, integer_token, name_information, not_defined, not_exists, property, property_display, property_display_override, property_override, string_token, there_exists, usedin_one_role); (* ** An schematic_wire_style is used to indicate whether the graphics associated ** within an interconnect should be narrow or wide. *) TYPE schematic_wire_style = ENUMERATION OF (narrow_wire, wide_wire); END_TYPE; (* ** A page is used to describe part of the structural connectivity of a ** schematic view. It contains definitions of schematic_bus, schematic_net, ** schematic_global_port_representation, schematic_master_port_representation, ** schematic_offpageconnector, schematic_onpageconnector and schematic_ripper. ** It may have a page_border and one or more page_title_blocks. A page size ** can be specified to describe the size of the sheet the page is drawn on. *) ENTITY page; background_colour : colour; border : OPTIONAL page_border; busses : OPTIONAL SET [1:?] OF schematic_bus; cell_property_displays : OPTIONAL BAG [1:?] OF property_display; cluster_property_displays : OPTIONAL BAG [1:?] OF property_display; comment_graphics_info : OPTIONAL BAG [1:?] OF comment_graphics; document : OPTIONAL SET [1:?] OF documentation; global_port_representations : OPTIONAL SET [1:?] OF schematic_global_port_representation; instance_implementations : OPTIONAL SET [1:?] OF schematic_instance_implementation; instance_group_implementations : OPTIONAL SET [1:?] OF schematic_instance_group_implementation; master_port_representations : OPTIONAL SET [1:?] OF schematic_master_port_representation; name : OPTIONAL name_information; nets : OPTIONAL SET [1:?] OF schematic_net; offpageconnectors : OPTIONAL SET [1:?] OF schematic_offpageconnector; onpageconnectors : OPTIONAL SET [1:?] OF schematic_onpageconnector; page_size : OPTIONAL rectangle; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; rippers : OPTIONAL SET [1:?] OF schematic_ripper; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; title : OPTIONAL SET [1:?] OF page_title_block; view_property_displays : OPTIONAL BAG [1:?] OF property_display; DERIVE containing_view : internal_schematic_view -- reference := usedin_one_role(SELF, 'schematic_view_model.internal_schematic_view.pages'); WHERE containment_constraint : (* A page belongs to one internal_schematic_view. *) belongs_to_one(SELF,'schematic_view_model.internal_schematic_view.pages'); valid_instance_implementations : (* The implemented instance are defined in the containing view. *) not_exists(QUERY(implementation <* instance_implementations | NOT (implementation.implemented_instance IN containing_view.instances))); valid_instance_group_implementations : (* The implemented instance_group are defined in the containing view. *) not_exists(QUERY(implementation <* instance_group_implementations | NOT (implementation.implemented_instance_group IN containing_view.instance_groups))); valid_instance_and_instance_group_implementations : (* If an instance_group is implemented as a symbol on a page, then each member_instances of the implemented instance_group must not be implemented as well. *) not_exists(QUERY(implementation <* instance_group_implementations | there_exists(QUERY(implemented_instance <* implementation.implemented_instance_group.member_instances | there_exists(USEDIN(implemented_instance, 'schematic_implementation_model'+ '.schematic_instance_implementation.implemented_instance')))))); valid_cell_property_displays : (* The displayed properties are defined in the containing cell. *) not_exists(QUERY(cell_property_display <* cell_property_displays | NOT (cell_property_display.displayed_property IN containing_view.containing_cluster.containing_cell.properties))); valid_cluster_property_displays : (* The displayed properties are defined in the containing internal_cluster. *) not_exists(QUERY(cluster_property_display <* cluster_property_displays | NOT (cluster_property_display.displayed_property IN containing_view.containing_cluster.properties))); valid_global_port_representations : (* The global_port_representations must only reference the global_ports or global_port_bundles which are defined in the containing edif. *) not_exists(QUERY(port_representation <* global_port_representations | NOT (port_representation.referenced_global_port IN containing_view.containing_cluster.containing_cell .containing_library.containing_edif.global_ports AND containing_view.containing_cluster.containing_cell .containing_library.containing_edif.global_port_bundles))); valid_master_port_representations : (* The master_port_representations must only reference the master_ports or master_port_bundles which are defined in the interface of the containing cluster. *) not_exists(QUERY(port_representation <* master_port_representations | NOT (port_representation.referenced_master_port IN containing_view.interface.ports AND containing_view.interface.port_bundles))); valid_property_displays : (* The displayed properties are defined in the page. *) not_exists(QUERY(page_property_display <* property_displays | NOT (page_property_display.displayed_property IN properties))); valid_view_property_displays : (* The displayed properties are defined in the containing internal_schematic_view. *) not_exists(QUERY(view_property_display <* view_property_displays | NOT (view_property_display.displayed_property IN containing_view.properties))); END_ENTITY; (* ** A page_border describes the border of a page. It is defined by specifying ** the position and orientation of the occurrence of the referenced page_border ** template. *) ENTITY page_border; instantiated_template : page_border_template; -- reference overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; template_position : transform; DERIVE containing_page : page -- reference := usedin_one_role(SELF, 'schematic_implementation_model.page.border'); WHERE containment_constraint : (* A page_border belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.border'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); END_ENTITY; (* ** A page_title_block is used to hold and display title block information in a ** drawing, for example, contract details, approval dates, revision numbers. ** It is defined by specifying the position and orientation of the occurrence ** of the referenced page_title_block template. *) ENTITY page_title_block; instantiated_template : page_title_block_template; -- reference name : OPTIONAL name_information; overriding_approved_date : OPTIONAL date; overriding_approved_date_display : OPTIONAL display_override; overriding_checked_date : OPTIONAL date; overriding_checked_date_display : OPTIONAL display_override; overriding_company_name : OPTIONAL string_token; overriding_company_name_display : OPTIONAL display_override; overriding_contract : OPTIONAL string_token; overriding_contract_display : OPTIONAL display_override; overriding_drawing_date : OPTIONAL date; overriding_drawing_date_display : OPTIONAL display_override; overriding_drawing_description : OPTIONAL string_token; overriding_drawing_description_display : OPTIONAL display_override; overriding_drawing_identification : OPTIONAL string_token; overriding_drawing_identification_display : OPTIONAL display_override; overriding_drawing_size : OPTIONAL string_token; overriding_drawing_size_display : OPTIONAL display_override; overriding_engineering_date : OPTIONAL date; overriding_engineering_date_display : OPTIONAL display_override; overriding_page_identification : OPTIONAL string_token; overriding_page_identification_display : OPTIONAL display_override; overriding_revision : OPTIONAL string_token; overriding_revision_display : OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; overriding_title : OPTIONAL string_token; overriding_title_display : OPTIONAL display_override; overriding_total_pages_display : OPTIONAL display_override; page_property_displays : OPTIONAL BAG [1:?] OF property_display; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; DERIVE containing_page : page -- reference := usedin_one_role(SELF, 'schematic_implementation_model.page.title'); WHERE containment_constraint : (* A title_block belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.title'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_page_property_displays : (* The displayed properties are defined in the containing page. *) not_exists(QUERY(page_property_display <* page_property_displays | NOT (page_property_display.displayed_property IN containing_page.properties))); valid_property_displays : (* The displayed properties are defined in the page_title_block. *) not_exists(QUERY(title_block_property_display <* property_displays | NOT (title_block_property_display.displayed_property IN properties))); END_ENTITY; (* ** A schematic_master_port_representation describes a representation of a ** master port on a schematic page. It is defined by specifying the position ** and orientation of the occurrence of the referenced ** schematic_master_port_representation_template. *) ENTITY schematic_master_port_representation; instantiated_template : -- reference schematic_master_port_representation_template; name : OPTIONAL name_information; referenced_master_port : master_port_or_master_port_bundle; -- reference overriding_ac_load_display : OPTIONAL display_override; overriding_dc_fanin_load_display : OPTIONAL display_override; overriding_dc_fanout_load_display : OPTIONAL display_override; overriding_dc_max_fanin_display : OPTIONAL display_override; overriding_dc_max_fanout_display : OPTIONAL display_override; overriding_designator_display : OPTIONAL display_override; overriding_implementation_name_display: OPTIONAL display_override; overriding_port_name_display : OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; delay_displays : OPTIONAL BAG [1:?] OF port_delay_display; load_delay_displays : OPTIONAL BAG [1:?] OF port_load_delay_display; port_property_displays : OPTIONAL BAG [1:?] OF property_display; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; WHERE containment_constraint : (* A schematic_master_port_representation belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.master_port_representations'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_port_property_displays : (* The displayed properties are defined in the referenced_master_port. *) not_defined; matching_direction : (* The direction of the referenced_master_port must agree with the direction_indicator of the master_port_template. *) not_defined; matching_type : (* The schematic_port_affinity of the instantiated schematic_master_port_template must agree with the schematic_port_style of the referenced_master_port.*) not_defined; END_ENTITY; (* ** A schematic_global_port_representation describes a representation of a ** global port on a schematic page. It is defined by specifying the position ** and orientation of the occurrence of the referenced ** schematic_global_port_representation_template. *) ENTITY schematic_global_port_representation; instantiated_template : -- reference schematic_global_port_representation_template; name : OPTIONAL name_information; referenced_global_port: global_port_or_global_port_bundle; -- reference overriding_global_port_name_display : OPTIONAL display_override; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; global_port_property_displays : OPTIONAL BAG [1:?] OF property_display; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; WHERE containment_constraint : (* A schematic_global_port_representation belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.global_port_representations'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_global_port_property_displays : (* The displayed properties are defined in the referenced_global_port. *) not_defined; END_ENTITY; (* ** A schematic_offpageconnector describes an offpageconnector on a schematic ** page. It can be joined by a schematic_generic_net or a ** schematic_generic_bus. It is defined by specifying the position and ** orientation of the occurrence of the referenced ** schematic_offpageconnector_template. *) ENTITY schematic_offpageconnector; instantiated_template : schematic_offpageconnector_template; -- reference name : OPTIONAL name_information; overriding_associated_interconnect_name_display : OPTIONAL display_override; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; WHERE containment_constraint : (* An schematic_offpageconnector belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.offpageconnectors'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_property_displays : (* The displayed properties are defined in the schematic_offpageconnector. *) not_exists(QUERY(offpageconnector_property_display <* property_displays | NOT (offpageconnector_property_display.displayed_property IN properties))); used_by_net_or_bus : (* An schematic_offpageconnector is joined by at most one schematic_generic_net or one schematic_generic_bus. *) not_defined; END_ENTITY; (* ** A schematic_onpageconnector describes an onpageconnector on a schematic ** page. It can be joined by a schematic_generic_net or a ** schematic_generic_bus. It is defined by specifying the position and ** orientation of the occurrence of the referenced ** schematic_onpageconnector_template. *) ENTITY schematic_onpageconnector; instantiated_template : schematic_onpageconnector_template; -- reference name : OPTIONAL name_information; overriding_associated_interconnect_name_display : OPTIONAL display_override; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; WHERE containment_constraint : (* An schematic_onpageconnector belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.onpageconnectors'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_property_displays : (* The displayed properties are defined in the schematic_onpageconnector. *) not_exists(QUERY(onpageconnector_property_display <* property_displays | NOT (onpageconnector_property_display.displayed_property IN properties))); used_by_net_or_bus : (* An schematic_onpageconnector is joined by at most one schematic_generic_net or one schematic_generic_bus. *) not_defined; END_ENTITY; (* ** A schematic_ripper describes a ripper on a schematic page. It is used to ** show that two or more structures (i.e. schematic_generic_nets or ** schematic_generic_busses) are linked. It is defined by specifying the ** position and orientation of the occurrence of the referenced ** schematic_ripper_template. *) ENTITY schematic_ripper; instantiated_template : schematic_ripper_template; -- reference name : OPTIONAL name_information; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; DERIVE hotspots : SET [2:?] OF ripper_hotspot := instantiated_template.hotspots; WHERE containment_constraint : (* A schematic_ripper belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.rippers'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_property_displays : (* The displayed properties are defined in the schematic_ripper. *) not_exists(QUERY(ripper_property_display <* property_displays | NOT (ripper_property_display.displayed_property IN properties))); valid_related_busses_and_nets : (* All related bus/net structures must belong to the same page. *) not_defined; END_ENTITY; ENTITY schematic_terminator; instantiated_template : schematic_terminator_template; -- reference name : OPTIONAL name_information; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; WHERE containment_constraint : (* A schematic_terminator belongs to one schematic_net or one schematic_bus. *) either_belongs_to_one(SELF, ['schematic_implementation_model.schematic_net.terminators', 'schematic_implementation_model.schematic_bus.terminators']); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); joined_by_exactly_one_interconnect : (* A schematic_terminator may only be touched by exactly one interconnect. *) not_defined; END_ENTITY; (* ** A schematic_instance_implementation describes an implementation for an ** instance on a schematic page. *) ENTITY schematic_instance_implementation; comment_graphics_info : OPTIONAL BAG [1:?] OF comment_graphics; implemented_instance : instance; -- reference instantiated_representation : cell_representation; -- reference overriding_cell_name_display : OPTIONAL display_override; overriding_cell_property_displays : OPTIONAL SET [1:?] OF property_display_override; overriding_cluster_property_displays : OPTIONAL SET [1:?] OF property_display_override; overriding_designator_display : OPTIONAL display_override; overriding_implementation_name_display : OPTIONAL display_override; overriding_instance_name_display : OPTIONAL display_override; overriding_symbol_name_display : OPTIONAL display_override; overriding_symbol_properties : OPTIONAL SET [1:?] OF property_override; overriding_symbol_property_displays : OPTIONAL SET [1:?] OF property_display_override; property_displays : OPTIONAL BAG [1:?] OF property_display; timing_displays : OPTIONAL BAG [1:?] OF timing_display; transform_position : transform; UNIQUE valid_implemented_instance : (* An instance can only be implemented once per schematic. *) implemented_instance; WHERE containment_constraint : (* An schematic_instance_implementation belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.instance_implementations'); valid_instantiated_representation : (* The instantiated_representation is a schematic symbol defined in the instantiated cluster of the instance. *) (('schematic_view_model.internal_schematic_symbol' IN TYPEOF(instantiated_representation)) OR ('schematic_view_model.external_schematic_symbol' IN TYPEOF(instantiated_representation))) AND (instantiated_representation IN implemented_instance.instantiated_cluster.cell_representations); valid_overriding_cell_property_displays : (* The overridden properties are defined in the containing cell. *) not_exists(QUERY(display_override <* overriding_cell_property_displays | NOT (display_override.overridden_property IN implemented_instance.instantiated_cluster.containing_cell.properties))); valid_overriding_cluster_property_displays : (* The overridden properties are defined in the containing internal_cluster. *) not_exists(QUERY(display_override <* overriding_cluster_property_displays| NOT (display_override.displayed_property IN implemented_instance.instantiated_cluster.properties))); valid_overriding_symbol_properties : (* The overridden properties are defined in the instantiated symbol. *) not_exists(QUERY(value_override <* overriding_symbol_properties | NOT (value_override.overridden_property IN instantiated_representation.properties))); valid_overriding_symbol_property_displays : (* The overridden properties are defined in the instantiated symbol. *) not_exists(QUERY(display_override <* overriding_symbol_property_displays | NOT (display_override.displayed_property IN instantiated_representation.properties))); valid_property_displays : (* The displayed properties are defined in the instance. *) not_exists(QUERY(instance_property_display <* property_displays | NOT (instance_property_display.displayed_property IN implemented_instance.properties))); valid_timing_displays : (* The displayed timings are defined in the cluster from which the instance is made. *) not_defined; END_ENTITY; (* ** A schematic_instance_group_implementation describes an implementation for an ** instance_group on a schematic page. *) ENTITY schematic_instance_group_implementation; comment_graphics_info : OPTIONAL BAG [1:?] OF comment_graphics; implemented_instance_group : instance_group; -- reference instantiated_representation : cell_representation; -- reference overriding_cell_name_display : OPTIONAL display_override; overriding_cell_property_displays : OPTIONAL SET [1:?] OF property_display_override; overriding_cluster_property_displays : OPTIONAL SET [1:?] OF property_display_override; overriding_designator_display : OPTIONAL display_override; overriding_implementation_name_display : OPTIONAL display_override; overriding_instance_name_display : OPTIONAL display_override; overriding_symbol_name_display : OPTIONAL display_override; overriding_symbol_properties : OPTIONAL SET [1:?] OF property_override; overriding_symbol_property_displays : OPTIONAL SET [1:?] OF property_display_override; property_displays : OPTIONAL BAG [1:?] OF property_display; timing_displays : OPTIONAL BAG [1:?] OF timing_display; transform_position : transform; UNIQUE valid_implemented_instance : (* An instance_group can only be implemented once per schematic. *) implemented_instance_group; WHERE containment_constraint : (* An schematic_instance_group_implementation belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.instance_group_implementations'); valid_instantiated_representation : (* The instantiated_representation is a schematic symbol defined in the instantiated cluster of the instance_group. *) (('schematic_view_model.internal_schematic_symbol' IN TYPEOF(instantiated_representation)) OR ('schematic_view_model.external_schematic_symbol' IN TYPEOF(instantiated_representation))) AND (instantiated_representation IN implemented_instance_group.instantiated_cluster.cell_representations); valid_overriding_cell_property_displays : (* The overridden properties are defined in the containing cell. *) not_exists(QUERY(display_override <* overriding_cell_property_displays | NOT (display_override.overridden_property IN implemented_instance_group.instantiated_cluster.containing_cell.properties))); valid_overriding_cluster_property_displays : (* The overridden properties are defined in the containing internal_cluster. *) not_exists(QUERY(display_override <* overriding_cluster_property_displays| NOT (display_override.displayed_property IN implemented_instance_group.instantiated_cluster.properties))); valid_overriding_symbol_properties : (* The overridden properties are defined in the instantiated symbol. *) not_exists(QUERY(value_override <* overriding_symbol_properties | NOT (value_override.overridden_property IN instantiated_representation.properties))); valid_overriding_symbol_property_displays : (* The overridden properties are defined in the instantiated symbol. *) not_exists(QUERY(display_override <* overriding_symbol_property_displays | NOT (display_override.displayed_property IN instantiated_representation.properties))); valid_property_displays : (* The displayed properties are defined in the implemented instance_group. *) not_exists(QUERY(instance_property_display <* property_displays | NOT (instance_property_display.displayed_property IN implemented_instance_group.properties))); valid_timing_displays : (* The displayed timings are defined in the cluster from which the instance_group is made. *) not_defined; END_ENTITY; (* ** A schematic_generic_net can be either a schematic_net or a ** schematic_sub_net. A schematic_generic_net is used in the model because of ** the similarity between a schematic_net and a schematic_sub_net. A ** schematic_net may be divided into schematic_sub_nets and a schematic_sub_net ** itself may also be divided into schematic_sub_nets. No two ** schematic_sub_nets at a given level may join to the same set of ports, ** ripper_hotspots, master_port_representations, global_port_representations, ** offpageconnectors, onpageconnectors, junctions and terminators. *) ENTITY schematic_generic_net ABSTRACT SUPERTYPE OF (ONEOF(schematic_net, schematic_sub_net)); associated_signal : signal; -- reference criticality : integer_token; delays : OPTIONAL SET [1:?] OF interconnect_delay; document : OPTIONAL SET [1:?] OF documentation; implementation : OPTIONAL schematic_interconnect_implementation; joined_global_ports : OPTIONAL SET [1:?] OF global_port; -- reference joined_instance_group_ports -- reference : OPTIONAL SET [1:?] OF instance_group_port; joined_instance_ports : OPTIONAL SET [1:?] OF instance_port; -- reference joined_master_ports : OPTIONAL SET [1:?] OF master_port; -- reference joined_global_port_representations : OPTIONAL SET [1:?] OF -- reference schematic_global_port_representation; joined_junctions : OPTIONAL SET [1:?] OF -- reference schematic_net_junction; joined_master_port_representations : OPTIONAL SET [1:?] OF -- reference schematic_master_port_representation; joined_offpageconnectors : OPTIONAL SET [1:?] OF -- reference schematic_offpageconnector; joined_onpageconnectors : OPTIONAL SET [1:?] OF -- reference schematic_onpageconnector; joined_ripper_hotspots : OPTIONAL SET [1:?] OF ripper_hotspot; -- reference joined_terminators : OPTIONAL SET [1:?] OF -- reference schematic_terminator; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; sub_nets : OPTIONAL SET [1:?] OF schematic_sub_net; WHERE valid_sub_nets : (* No two schematic_sub_nets may refer to the same set of ports, global_port_representations, junctions, master_port_representations, offpageconnectors, onpageconnectors, ripper_hotspots and terminators. *) not_exists(QUERY(net1 <* sub_nets | there_exists(QUERY(net2 <* sub_nets - net1 | (net1.joined_global_ports = net2.joined_global_ports) AND (net1.joined_instance_group_ports = net2.joined_instance_group_ports) AND (net1.joined_instance_ports = net2.joined_instance_ports) AND (net1.joined_master_ports = net2.joined_master_ports) AND (net1.joined_global_port_representations = net2.joined_global_port_representations) AND (net1.joined_junctions = net2.joined_junctions) AND (net1.joined_master_port_representations = net2.joined_master_port_representations) AND (net1.joined_offpageconnectors = net2.joined_offpageconnectors) AND (net1.joined_onpageconnectors = net2.joined_onpageconnectors) AND (net1.joined_ripper_hotspots = net2.joined_ripper_hotspots) AND (net1.joined_terminators = net2.joined_terminators))))); valid_implementation : (* Implementation information may only be associated with a schematic_generic_net when its sub_nets have no implementation information. *) not_defined; END_ENTITY; ENTITY schematic_net SUBTYPE OF (schematic_generic_net); junctions : OPTIONAL SET [1:?] OF schematic_net_junction; schematic_wire_style : schematic_wire_style; terminators : OPTIONAL SET [1:?] OF schematic_terminator; DERIVE containing_page : page -- reference := usedin_one_role(SELF, 'schematic_implementation_model.page.nets'); UNIQUE unique_net_constraint : (* At most one schematic_net per page may be defined for a given signal.*) associated_signal, containing_page; WHERE containment_constraint : (* A schematic_net belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.nets'); valid_associated_signal : (* The signal associated with a schematic_net is defined in the containing internal_schematic_view. *) associated_signal IN containing_page.containing_view.signals; valid_joined_instance_group_ports : (* The joined instance_group_ports must reference to instance_groups which are implemented in the containing page. *) not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (usedin_one_role(instanceGroupPort.referenced_instance_group, 'schematic_implementation_model'+ '.schematic_instance_group_implementation.implemented_instance_group') IN containing_page.instance_group_implementations))); valid_joined_instance_group_ports_in_associated_signal : (* The flattened list of instance_ports of each joined instance_group_port must be a subset of the instance_ports joined by the associated signal of the schematic_net. *) not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (instanceGroupPort.flattened_port_list <= associated_signal.joined_instance_ports))); valid_joined_ports : (* The ports joined by a schematic_net must be a subset of the connectivity of the associated signal of the schematic_net. *) (joined_global_ports <= associated_signal.joined_global_ports) AND (joined_instance_ports <= associated_signal.joined_instance_ports) AND (joined_master_ports <= associated_signal.joined_master_ports); valid_joined_instantiable_objects : (* All joined global_port_representations, master_port_representations, offpageconnectors, onpageconnectors and ripper_hotspots are defined in the containing page. *) (joined_global_port_representations <= containing_page.global_port_representations) AND (joined_master_port_representations <= containing_page.master_port_representations) AND (joined_offpageconnectors <= containing_page.offpageconnectors) AND (joined_onpageconnectors <= containing_page.onpageconnectors) AND (not_exists(QUERY(hotspot <* joined_ripper_hotspots | NOT (hotspot.containing_ripper IN containing_page.rippers)))); valid_joined_junctions : (* The joined junctions must be defined in the schematic_net. *) joined_junctions <= junctions; valid_joined_terminators : (* The joined terminators must be defined in the schematic_net. *) joined_terminators <= terminators; END_ENTITY; ENTITY schematic_sub_net SUBTYPE OF (schematic_generic_net); DERIVE containing_net : schematic_generic_net -- reference := usedin_one_role(SELF, 'schematic_implementation_model.schematic_generic_net.sub_nets'); WHERE containment_constraint : (* A schematic_sub_net belongs to one schematic_generic_net. *) belongs_to_one(SELF, 'schematic_implementation_model.schematic_generic_net.sub_nets'); valid_associated_signal : (* The signal associated with a schematic_sub_net is same as its immediately containing schematic_generic_net. *) associated_signal :=: containing_net.associated_signal; valid_joined_ports_and_rippers : (* The ports and ripper_hotspots joined by a schematic_sub_net must be a subset of the ports and rippers joined by its immediately containing schematic_generic_net. *) (joined_global_ports <= containing_net.joined_global_ports) AND (joined_instance_group_ports <= containing_net.joined_instance_group_ports) AND (joined_instance_ports <= containing_net.joined_instance_ports) AND (joined_master_ports <= containing_net.joined_master_ports) AND (joined_ripper_hotspots <= containing_net.joined_ripper_hotspots); valid_joined_instantiable_objects : (* The global_port_representations, master_port_representations, offpageconnectors, onpageconnectors and junctions joined by a schematic_sub_net must be a subset of the ones joined by its immediately containing schematic_generic_net. *) (joined_global_port_representations <= containing_net.joined_global_port_representations) AND (joined_master_port_representations <= containing_net.joined_master_port_representations) AND (joined_offpageconnectors <= containing_net.joined_offpageconnectors) AND (joined_onpageconnectors <= containing_net.joined_onpageconnectors) AND (joined_junctions <= containing_net.joined_junctions); valid_joined_terminators : (* The joined terminators must be defined in the containing schematic_net. *) not_defined; END_ENTITY; (* ** A schematic_net_junction describes a junction for the net structures on a ** schematic page. It is defined by specifying the position and orientation of ** the occurrence of the referenced schematic_junction_template within a ** schematic_net. *) ENTITY schematic_net_junction; instantiated_template : schematic_junction_template; -- reference name : OPTIONAL name_information; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; DERIVE related_nets : SET [2 : ?] OF schematic_generic_net -- reference := usedin_one_role(SELF, 'schematic_implementation_model.schematic_generic_net.joined_junctions'); WHERE containment_constraint : (* A schematic_junction belongs to one schematic_net. *) belongs_to_one(SELF, 'schematic_implementation_model.schematic_net.junctions'); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_related_nets : (* All related schematic_generic_nets have the same associated signal. *) not_exists(QUERY(related_net_1 <* related_nets | there_exists(QUERY(related_net_2 <* related_nets - related_net_1 | related_net_1.associated_signal :<>: related_net_2.associated_signal)))); END_ENTITY; (* ** A schematic_generic_bus can be either a schematic_bus, a schematic_bus_slice ** or a schematic_sub_bus. A schematic_generic_bus is used in the model ** because of the similarity between a schematic_bus, a schematic_bus_slice and ** a schematic_sub_bus. They may all contain schematic_bus_slices and ** schematic_sub_busses. No two schematic_bus_slices at a given level may be ** associated with the same signal_group. No two schematic_sub_busses at a ** given level may join to the same set of ports and rippers. All joined ports ** or port_bundles (including global_ports, global_port_bundles, ** instance_ports, instance_port_bundles, master_ports and master_port_bundles) ** must be the same size as the flattened signal_group. Each single port of ** the joined port_bundles must be mentioned in the corresponding signal within ** the flattened signal_group. ** However, when a schematic_generic_bus joins to ports or port_bundles on ** instance_groups, there are two ways of interpreting the underlying ** connectivity. The first way, similar as above, each joined port or ** port_bundles (via instance_group_port and instance_group_port_bundle) must ** be the same size as the flattened signal_group. The second way requires ** flattening the joined ports or port_bundles on instance_groups. Each ** flattened instance_group_port and instance_group_port_bundle must be the ** same size as the flattened signal_group. When an instance_group_port is ** flattened (refer to the function flattened_instance_group_port in the ** hierarchy_model), it returns a list of instance_ports which the size of the ** list must be equal to the instance_group size (that is, the number of ** member_instances within the instance_group). On the other hand, when an ** instance_group_port_bundle is flattened (refer to the function ** flattened_instance_group_port_bundle in the hierarchy_model), it returns a ** list of instance_ports which the size of the list must be equal to the ** product of the instance_group size and the port_bundle size. The ordering ** for flattening is that instances vary slowest and ports vary fastest. ** Finally, each instance_port of the flattened instance_port list must be ** mentioned in the corresponding signal within the flattened signal_group. ** For example, if a bus structure is associated with a signal_group of width ** 8, it is valid to join to the following ports of various sizes: ** flattened_instance_group_port (instance_group size = 8, port width = 1) ** flattened_instance_group_port_bundle (instance_group size = 2, ** port_bundle width = 4) ** flattened_instance_group_port_bundle (instance_group size = 4, ** port_bundle width = 2) ** instance_group_port_bundle (port_bundle width = 8) ** global_port_bundle (width = 8) ** instance_port_bundle (width 8) ** master_port_bundle (width 8) *) ENTITY schematic_generic_bus ABSTRACT SUPERTYPE OF (ONEOF(schematic_bus, schematic_bus_slice, schematic_sub_bus)); associated_signal_group : signal_group; -- reference bus_slices : OPTIONAL SET [1:?] OF schematic_bus_slice; containing_bus : OPTIONAL schematic_generic_bus; -- reference criticality : integer_token; delays : OPTIONAL SET [1:?] OF interconnect_delay; document : OPTIONAL SET [1:?] OF documentation; implementation : OPTIONAL schematic_interconnect_implementation; joined_flattened_instance_group_ports -- reference : OPTIONAL SET [1:?] OF instance_group_port; joined_flattened_instance_group_port_bundles -- reference : OPTIONAL SET [1:?] OF instance_group_port_bundle; joined_global_ports : OPTIONAL SET [1:?] OF global_port; -- reference joined_global_port_bundles -- reference : OPTIONAL SET [1:?] OF global_port_bundle; joined_instance_group_ports -- reference : OPTIONAL SET [1:?] OF instance_group_port; joined_instance_group_port_bundles -- reference : OPTIONAL SET [1:?] OF instance_group_port_bundle; joined_instance_ports : OPTIONAL SET [1:?] OF instance_port; -- reference joined_instance_port_bundles -- reference : OPTIONAL SET [1:?] OF instance_port_bundle; joined_junctions : OPTIONAL SET [1:?] OF -- reference schematic_bus_junction; joined_master_ports : OPTIONAL SET [1:?] OF master_port; -- reference joined_master_port_bundles -- reference : OPTIONAL SET [1:?] OF master_port_bundle; joined_global_port_representations : OPTIONAL SET [1:?] OF -- reference schematic_global_port_representation; joined_master_port_representations : OPTIONAL SET [1:?] OF -- reference schematic_master_port_representation; joined_offpageconnectors : OPTIONAL SET [1:?] OF -- reference schematic_offpageconnector; joined_onpageconnectors : OPTIONAL SET [1:?] OF -- reference schematic_onpageconnector; joined_ripper_hotspots : OPTIONAL SET [1:?] OF ripper_hotspot; joined_terminators : OPTIONAL SET [1:?] OF -- reference schematic_terminator; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; sub_busses : OPTIONAL SET [1:?] OF schematic_sub_bus; DERIVE signal_group_width : INTEGER := SIZEOF(associated_signal_group.flattened_signal_list); WHERE valid_joined_port_size : (* All joined global_ports, global_port_bundles, instance_group_ports, instance_group_port_bundles, instance_ports, instance_port_bundles, master_ports and master_port_bundles must have the same port size as the flattened signal_group. Moreover, the size of each joined flattened instance_group_port or instance_group_port_bundle must be equal to the size of the flattened signal_group. *) (not_exists(QUERY(joinedPort <* joined_global_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_global_port_bundles | joinedPortBundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_instance_group_ports | joinedPort.referenced_master_port.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <*joined_instance_group_port_bundles| joinedPortBundle.referenced_master_port_bundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_instance_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_instance_port_bundles | joinedPortBundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_master_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_master_port_bundles | joinedPortBundle.width <> signal_group_width))) AND (not_exists(QUERY(joinedPort <* joined_flattened_instance_group_ports | joinedPort.width <> signal_group_width))) AND (not_exists(QUERY(joinedPortBundle <* joined_flattened_instance_group_port_bundles | joinedPortBundle.width <> signal_group_width))); valid_joined_simple_ports : (* Each simple port must be mentioned in the corresponding signal within the flattened signal_group. Moreover, the flattened list of instance_ports of each joined instance_group_port must be mentioned in the corresponding signal within the flattened signal_group. *) (joined_global_ports <= associated_signal_group.flattened_signal_list[1].joined_global_ports) AND (joined_instance_ports <= associated_signal_group.flattened_signal_list[1].joined_instance_ports) AND (joined_master_ports <= associated_signal_group.flattened_signal_list[1].joined_master_ports) AND not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (instanceGroupPort.flattened_port_list <= associated_signal_group.flattened_signal_list[1].joined_instance_ports))); valid_joined_port_bundles : (* Each single port of the joined wide ports must be mentioned in the corresponding signal within the flattened signal_group. *) bus_joined_ports_in_parallel(associated_signal_group.flattened_signal_list, joined_flattened_instance_group_ports, joined_flattened_instance_group_port_bundles, joined_global_port_bundles, joined_instance_group_port_bundles, joined_instance_port_bundles, joined_master_port_bundles); valid_bus_slices : (* No two bus_slices within a schematic_generic_bus may reference the same signal_group. *) not_exists(QUERY(busSlice1 <* bus_slices | there_exists(QUERY(busSlice2 <* bus_slices - busSlice1 | busSlice1.associated_signal_group :=: busSlice2.associated_signal_group)))); valid_sub_busses : (* No two sub_busses within a schematic_generic_bus may refer to the same set of ports, global_port_representations, junctions, master_port_representations, offpageconnectors, onpageconnectors, ripper_hotspots and terminators. *) not_defined; valid_implementation : (* Implementation information may only be associated with a schematic_generic_bus when its sub_busses have no implementation information. *) not_defined; END_ENTITY; ENTITY schematic_bus SUBTYPE OF (schematic_generic_bus); junctions : OPTIONAL SET [1:?] OF schematic_bus_junction; schematic_wire_style : schematic_wire_style; terminators : OPTIONAL SET [1:?] OF schematic_terminator; DERIVE containing_page : page -- reference := usedin_one_role(SELF, 'schematic_implementation_model.page.busses'); UNIQUE unique_bus_constraint : (* At most one schematic_bus per page may be defined for a given signal_group.*) associated_signal_group, containing_page; WHERE containment_constraint : (* A schematic_bus belongs to one page. *) belongs_to_one(SELF, 'schematic_implementation_model.page.busses'); valid_associated_signal_group : (* The signal_group associated with a schematic_bus is defined in the containing internal_schematic_view. *) associated_signal_group IN containing_page.containing_view.signal_groups; valid_joined_instance_group_ports_or_port_bundles : (* The joined instance_group_ports and instance_group_port_bundles must reference to instance_groups which are implemented in the containing page. *) not_exists(QUERY(instanceGroupPort <* joined_instance_group_ports | NOT (usedin_one_role(instanceGroupPort.referenced_instance_group, 'schematic_implementation_model'+ '.schematic_instance_group_implementation.implemented_instance_group') IN containing_page.instance_group_implementations))) AND not_exists(QUERY(instanceGroupPortBundle <*joined_instance_group_port_bundles| NOT (usedin_one_role(instanceGroupPortBundle.referenced_instance_group, 'schematic_implementation_model'+ '.schematic_instance_group_implementation.implemented_instance_group') IN containing_page.instance_group_implementations))); valid_joined_instantiable_objects : (* All joined global_port_representations, master_port_representations, offpageconnectors, onpageconnectors and ripper_hotspots are defined in the containing page. *) (joined_global_port_representations <= containing_page.global_port_representations) AND (joined_master_port_representations <= containing_page.master_port_representations) AND (joined_offpageconnectors <= containing_page.offpageconnectors) AND (joined_onpageconnectors <= containing_page.onpageconnectors) AND (not_exists(QUERY(hotspot <* joined_ripper_hotspots | NOT (hotspot.containing_ripper IN containing_page.rippers)))); valid_joined_junctions : (* The joined junctions must be defined in the schematic_bus. *) joined_junctions <= junctions; valid_joined_terminators : (* The joined terminators must be defined in the schematic_bus. *) joined_terminators <= terminators; END_ENTITY; ENTITY schematic_bus_slice SUBTYPE OF (schematic_generic_bus); junctions : OPTIONAL SET [1:?] OF schematic_bus_junction; schematic_wire_style : schematic_wire_style; DERIVE containing_bus : schematic_generic_bus -- reference := usedin_one_role(SELF, 'schematic_implementation_model.schematic_generic_bus.bus_slices'); containing_page : page -- reference := containing_page_of_schematic_bus_structure(SELF); WHERE containment_constraint : (* A schematic_bus_slice belongs to one schematic_generic_bus. *) belongs_to_one(SELF, 'schematic_implementation_model.schematic_generic_bus.bus_slices'); valid_associated_signal_group : (* The signal_group associated with a schematic_bus_slice is a member of the signal_group associated with its immediately containing schematic_generic_bus.*) not_defined; valid_joined_junctions : (* The joined junctions must be defined in the schematic_bus_slice. *) joined_junctions <= junctions; valid_joined_ripper_hotspots : (* The joined hotspots are defined in the schematic_rippers in the containing page. *) not_exists(QUERY(hotspot <* joined_ripper_hotspots | NOT (hotspot.containing_ripper IN containing_page.rippers))); valid_joined_terminators : (* The joined terminators must be defined in the containing schematic_bus. *) not_defined; END_ENTITY; ENTITY schematic_sub_bus SUBTYPE OF (schematic_generic_bus); DERIVE containing_bus : schematic_generic_bus -- reference := usedin_one_role(SELF, 'schematic_implementation_model.schematic_generic_bus.sub_busses'); WHERE containment_constraint : (* A schematic_sub_bus belongs to one schematic_generic_bus. *) belongs_to_one(SELF, 'schematic_implementation_model.schematic_generic_bus.sub_busses'); valid_associated_signal_group : (* The signal_group associated with a schematic_sub_bus is same as its immediately containing schematic_generic_bus. *) associated_signal_group :=: containing_bus.associated_signal_group; valid_joined_ports : (* The ports and ripper_hotspots joined by a schematic_sub_bus must be a subset of the ports joined by its immediately containing schematic_generic_bus. *) (joined_flattened_instance_group_ports <= containing_bus.joined_flattened_instance_group_ports) AND (joined_flattened_instance_group_port_bundles <= containing_bus.joined_flattened_instance_group_port_bundles) AND (joined_global_ports <= containing_bus.joined_global_ports) AND (joined_global_port_bundles <= containing_bus.joined_global_port_bundles) AND (joined_instance_group_ports <= containing_bus.joined_instance_group_ports) AND (joined_instance_group_port_bundles <= containing_bus.joined_instance_group_port_bundles) AND (joined_instance_ports <= containing_bus.joined_instance_ports) AND (joined_instance_port_bundles <= containing_bus.joined_instance_port_bundles) AND (joined_master_ports <= containing_bus.joined_master_ports) AND (joined_master_port_bundles <= containing_bus.joined_master_port_bundles) AND (joined_ripper_hotspots <= containing_bus.joined_ripper_hotspots); valid_joined_instantiable_objects : (* The global_port_representations, master_port_representations, offpageconnectors, onpageconnectors and junctions joined by a schematic_sub_bus must be a subset of the ones joined by its immediately containing schematic_generic_bus. *) (joined_global_port_representations <= containing_bus.joined_global_port_representations) AND (joined_master_port_representations <= containing_bus.joined_master_port_representations) AND (joined_offpageconnectors <= containing_bus.joined_offpageconnectors) AND (joined_onpageconnectors <= containing_bus.joined_onpageconnectors) AND (joined_junctions <= containing_bus.joined_junctions); valid_joined_terminators : (* The joined terminators must be defined in the containing schematic_bus. *) not_defined; END_ENTITY; (* ** The containing_page_of_schematic_bus_structure returns the page containing ** the schematic bus structure. *) FUNCTION containing_page_of_schematic_bus_structure (busStructure : schematic_generic_bus) : page; IF 'schematic_implementation_model.schematic_bus' IN TYPEOF(busStructure) THEN RETURN(busStructure.containing_page); ELSE RETURN(containing_page_of_schematic_bus_structure -- recursion (busStructure.containing_bus)); END_IF; END_FUNCTION; (* ** A schematic_bus_junction describes a junction for the bus structures on a ** schematic page. It is defined by specifying the position and orientation of ** the occurrence of the referenced schematic_junction_template within a ** schematic_bus or a schematic_bus_slice. *) ENTITY schematic_bus_junction; instantiated_template : schematic_junction_template; -- reference name : OPTIONAL name_information; overriding_implementation_name_display: OPTIONAL display_override; overriding_template_properties : OPTIONAL SET [1:?] OF property_override; overriding_template_property_displays : OPTIONAL SET [1:?] OF property_display_override; properties : OPTIONAL SET [1:?] OF property; property_displays : OPTIONAL BAG [1:?] OF property_display; template_position : transform; DERIVE related_busses : SET [2 : ?] OF schematic_generic_bus -- reference := usedin_one_role(SELF, 'schematic_implementation_model.schematic_generic_bus.joined_junctions'); WHERE containment_constraint : (* A schematic_bus_junction belongs to one schematic_bus or one schematic_bus_slice. *) either_belongs_to_one(SELF, ['schematic_implementation_model.schematic_bus.junctions', 'schematic_implementation_model.schematic_bus_slice.junctions']); valid_overriding_template_properties : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(value_override <* overriding_template_properties | NOT (value_override.overridden_property IN instantiated_template.properties))); valid_overriding_template_property_displays : (* The overridden properties are defined in the instantiated_template. *) not_exists(QUERY(display_override<*overriding_template_property_displays | NOT (display_override.overridden_property IN instantiated_template.properties))); valid_related_busses : (* All related schematic_generic_busses have the same associated signal_group. *) not_exists(QUERY(related_bus_1 <* related_busses | there_exists(QUERY(related_bus_2 <* related_busses - related_bus_1 | related_bus_1.associated_signal_group :<>: related_bus_2.associated_signal_group)))); END_ENTITY; (* ** A schematic_interconnect_implementation is used to describe an ** implementation for a connectivity structure (including schematic_net, ** schematic_sub_net, schematic_bus, schematic_bus_slice and schematic_sub_bus) ** on a schematic page. A connectivity structure is implemented by giving the ** associated graphics and the display control information to allow the display ** of its name and attributes, such as criticality and delay. *) ENTITY schematic_interconnect_implementation; attached_text : OPTIONAL BAG [1:?] OF schematic_interconnect_attached_text; criticality_display : OPTIONAL BAG [1:?] OF display; figures : OPTIONAL BAG [1:?] OF figure; figure_macros : OPTIONAL BAG [1:?] OF schematic_figure_macro; interconnect_delay_displays : OPTIONAL BAG [1:?] OF interconnect_delay_display; interconnect_name_display : OPTIONAL BAG [1:?] OF display; interconnect_property_displays : OPTIONAL BAG [1:?] OF property_display; WHERE containment_constraint : (* A schematic_interconnect_implementation belongs to either one schematic_generic_net or one schematic_generic_bus. *) either_belongs_to_one(SELF, ['schematic_implementation_model.schematic_generic_net.implementation', 'schematic_implementation_model.schematic_generic_bus.implementation']); valid_interconnect_property_displays : (* The displayed properties are defined in the interconnect object. *) not_defined; END_ENTITY; ENTITY schematic_interconnect_attached_text; annotate : OPTIONAL BAG [1:?] OF string_display; attachment_point : integer_point; criticality_display : OPTIONAL BAG [1:?] OF display; interconnect_delay_displays : OPTIONAL BAG [1:?] OF interconnect_delay_display; interconnect_name_display : OPTIONAL BAG [1:?] OF display; interconnect_property_displays : OPTIONAL BAG [1:?] OF property_display; WHERE valid_interconnect_property_displays : (* The displayed properties are defined in the interconnect object. *) not_defined; END_ENTITY; END_SCHEMA; SCHEMA library_model; (* ** The library_model schema describes what information can be found in an EDIF ** library. An EDIF library is a grouping of reusable objects. A library ** contains cell definitions, geometry_macro_templates and various types of ** instantiatable templates for schematic views. The technology information is ** common to all reusable objects in a library. *) REFERENCE FROM design_management_model (copyright, written); REFERENCE FROM documentation_model (documentation); REFERENCE FROM display_model (colour, path_corner_type, path_end_type, justification, pixel_pattern); REFERENCE FROM edif_information_model (edif); REFERENCE FROM hierarchy_model (cell, external_cell, internal_cell); REFERENCE FROM instantiatable_object_model (external_template, internal_template); REFERENCE FROM support_definition_model (boolean_token, belongs_to_one, integer_distance_value, name_information, not_exists, private_property, property, unit, text_measurement_value, undefined_type, usedin_one_role, width_value); (* ** A library contains cell definitions, geometry_macro_templates, and various ** types of instantiatable templates for schematic views. It also contains the ** technology information which is shared by all cells within a library. That ** includes definitions of figure_groups. ** ** NOT YET MODELLED : simulationInfo *) ENTITY library ABSTRACT SUPERTYPE OF (ONEOF(internal_library, external_library)); background_colour : colour; cells : OPTIONAL SET [1:?] OF cell; document : OPTIONAL SET [1:?] OF documentation; figure_groups : OPTIONAL SET [1:?] OF figure_group; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF private_property; simulation_info : OPTIONAL undefined_type; status_of_copyright : OPTIONAL SET [1:?] OF copyright; status_of_written : OPTIONAL SET [1:?] OF written; DERIVE containing_edif : edif -- reference := usedin_one_role(SELF, 'edif_information_model.edif.libraries'); WHERE containment_constraint : (* A library belongs to one edif file. *) belongs_to_one(SELF, 'edif_information_model.edif.libraries'); END_ENTITY; ENTITY internal_library SUBTYPE OF (library); SELF\library.cells : OPTIONAL SET [1:?] OF internal_cell; templates : OPTIONAL SET [1:?] OF internal_template; END_ENTITY; ENTITY external_library SUBTYPE OF (library); SELF\library.cells : OPTIONAL SET [1:?] OF external_cell; templates : OPTIONAL SET [1:?] OF external_template; END_ENTITY; ENTITY figure_group; default_border_pattern : pixel_pattern; default_border_width : width_value; default_border_visible : boolean_token; default_colour_index : colour; default_corner_type : path_corner_type; default_end_type : path_end_type; default_fill_pattern : pixel_pattern; default_fill_pattern_visible : boolean_token; default_justify : justification; default_path_width : width_value; default_text_height : OPTIONAL text_measurement_value; default_text_width : OPTIONAL text_measurement_value; default_visible : boolean_token; include_figure_groups : OPTIONAL SET [1:?] OF -- reference figure_group; include_figure_group_objects : OPTIONAL BAG [1:?] OF computed_figure_group_object; name : OPTIONAL name_information; properties : OPTIONAL SET [1:?] OF property; WHERE containment_constraint : (* A figure_group belongs to one library. *) belongs_to_one(SELF, 'library_model.library.figure_groups'); non_recursive_constraint : (* A figure_group cannot include itself either directly and indirectly. *) not_recursive_figure_group([SELF], [SELF]); END_ENTITY; (* ** A figure_group_object describes a lump of ``stuff'' which is obtained either ** by merging elements belonging to a figure_group, or by operation of other ** figure_group_objects. In the latter case, those operations may include ** difference, intersection, inverse, oversize or union between ** figure_group_objects. *) ENTITY figure_group_object ABSTRACT SUPERTYPE OF (ONEOF(simple_figure_group_object, computed_figure_group_object)); END_ENTITY; ENTITY simple_figure_group_object SUBTYPE OF (figure_group_object); referenced_object : figure_group; END_ENTITY; ENTITY computed_figure_group_object ABSTRACT SUPERTYPE OF (ONEOF(difference_figure_group_object, intersection_figure_group_object, inverse_figure_group_object, oversize_figure_group_object, union_figure_group_object)) SUBTYPE OF (figure_group_object); END_ENTITY; ENTITY difference_figure_group_object SUBTYPE OF (computed_figure_group_object); referenced_object : figure_group_object; referenced_union_object : OPTIONAL union_figure_group_object; END_ENTITY; ENTITY intersection_figure_group_object SUBTYPE OF (computed_figure_group_object); referenced_objects : SET [1:?] OF figure_group_object; END_ENTITY; ENTITY inverse_figure_group_object SUBTYPE OF (computed_figure_group_object); referenced_object : figure_group_object; END_ENTITY; ENTITY oversize_figure_group_object SUBTYPE OF (computed_figure_group_object); size : integer_distance_value; referenced_object : figure_group_object; use_corner_type : path_corner_type; END_ENTITY; ENTITY union_figure_group_object SUBTYPE OF (computed_figure_group_object); referenced_objects : SET [1:?] OF figure_group_object; END_ENTITY; (* ** The not_recursive_figure_group function returns true if a figure_group only ** includes other figure_groups. It prevents cyclic definition of a ** figure_group. *) FUNCTION not_recursive_figure_group (parents, invalid_ancestors : SET OF figure_group) : BOOLEAN; LOCAL i : INTEGER; descendants : SET OF figure_group := [ ]; END_LOCAL; REPEAT i := 1 TO HIINDEX(parents); descendants := descendants + parents[i].include_figure_groups; END_REPEAT; RETURN (not_exists(descendants) OR (not_exists(descendants * invalid_ancestors) AND not_recursive_figure_group(descendants, parents + invalid_ancestors))); END_FUNCTION; END_SCHEMA; SCHEMA support_definition_model; (* ** The support_definition_model schema contains general information which ** applies to other schemas. Typical examples are the entities ** name_information and property which are not confined to individual schemas. ** In addition, it holds definitions of some generic functions whose sole ** purpose is to clarify and improve understanding of constraints written in ** EXPRESS. *) REFERENCE FROM edif_information_model (boolean_property_declaration, integer_property_declaration, minomax_property_declaration, number_property_declaration, property_declaration, point_property_declaration, string_property_declaration, untyped_property_declaration); REFERENCE FROM display_model (display, display_override); REFERENCE FROM geometry_model (integer_point); (* ** Entities boolean_token, integer_token, number_token and string_token ** describe the concept of booleanValue, integerValue, numberValue and ** stringValue in the EDIF syntax. *) TYPE boolean_token = BOOLEAN; END_TYPE; TYPE integer_token = INTEGER; END_TYPE; TYPE number_token = NUMBER; END_TYPE; (* ** This is only a partial model of the capability of an EDIF string. *) TYPE string_token = STRING; END_TYPE; TYPE positive_integer_token = integer_token; WHERE positive_integer_is_greater_than_zero : SELF > 0; END_TYPE; TYPE integer_distance_value = integer_token; END_TYPE; TYPE number_distance_value = number_token; END_TYPE; TYPE angle_value = SELECT (degree_value, radian_value); END_TYPE; TYPE degree_value = number_token; END_TYPE; TYPE radian_value = number_token; END_TYPE; ENTITY capacitance_value; range : minomax_value; WHERE valid_capacitance_value : non_negative_capacitance(range); END_ENTITY; FUNCTION non_negative_capacitance (load : minomax_value) : BOOLEAN; RETURN((('NOT_FIXED' IN TYPEOF(load.min)) OR (load.min >= 0)) AND (('NOT_FIXED' IN TYPEOF(load.nom)) OR (load.nom >= 0)) AND (('NOT_FIXED' IN TYPEOF(load.max)) OR (load.max >= 0))); END_FUNCTION; ENTITY current_value; range : minomax_value; END_ENTITY; ENTITY voltage_value; range : minomax_value; END_ENTITY; ENTITY time_value; range : minomax_value; END_ENTITY; (* ** A width_value is used to specify the required width of a border or a path. ** Its value may be expressed in integer_distance_value or in minimal_width. ** It requires the specified integer_distance_value to be greater than zero. *) TYPE width_value = SELECT (integer_distance_value, minimal_width); WHERE valid_width : (* The width_value is greater than zero. *) (SELF = minimal_width.minimal) OR (SELF > 0); END_TYPE; TYPE minimal_width = ENUMERATION OF (minimal); END_TYPE; (* ** A text_measurement_value is used to specify the required height or width of ** text. Its value may be expressed in integer_distance_value. It requires ** the specified integer_distance_value to be greater than zero. *) TYPE text_measurement_value = integer_distance_value; WHERE valid_text : (* The text_measurement_value is greater than zero. *) SELF > 0; END_TYPE; (* ** A minomax_value is used to specify a minimum, nominal and maximum range of ** values. The attribute value may be expressed in number_token. If the value ** is not_fixed, the unconstrained flag states that there is no restriction ** specified on the value of the attribute; the undefined flag states that no ** information is provided for the attribute's value. *) ENTITY minomax_value; min, nom, max : number_or_not_fixed; WHERE valid_min_nom_max_value : (* If any one of the attributes has a numeric value, then they must be in non-decreasing order. *) valid_range(min, nom, max); END_ENTITY; TYPE number_or_not_fixed = SELECT(number_token, not_fixed); END_TYPE; TYPE not_fixed = ENUMERATION OF (undefined, unconstrained); END_TYPE; FUNCTION valid_range (num1, num2, num3 : number_or_not_fixed) : BOOLEAN; FUNCTION not_greater_than (N1, N2 : number_or_not_fixed) : BOOLEAN; IF ('NUMBER' IN TYPEOF(N1)) AND ('NUMBER' IN TYPEOF(N2)) THEN RETURN(N1 <= N2); ELSE RETURN(TRUE); END_IF; END_FUNCTION; RETURN(not_greater_than(num1, num2) AND not_greater_than(num2, num3) AND not_greater_than(num1, num3)); END_FUNCTION; (* ** The unit allows definition of units other than the basic EDIF supported ** ones, e.g. for obtaining combinations of one or more basic units. It is ** possible to derive the actual scaling factor from its attributes, edif_unit ** and equivalent_si_unit. *) ENTITY unit; edif_unit : number_token; equivalent_si_unit : number_token; physical_type : OPTIONAL SET [1:?] OF physical_dimension; WHERE containment_constraint : (* Definition of unit is allowed at the edif file. *) belongs_to_one(SELF, ['edif_information_model.scaling_information.unit_definitions']); END_ENTITY; ENTITY physical_dimension; basic_unit : physical_unit; exponent : exponent_value; END_ENTITY; (* ** A exponent_value is used in specifying the exponent of a physical_dimension. *) TYPE exponent_value = SELECT (fraction, integer_token); END_TYPE; ENTITY fraction; numerator, denominator : integer_token; WHERE valid_denominator : (* The denominator should not be equal to zero. *) denominator <> 0; END_ENTITY; TYPE physical_unit = ENUMERATION OF (ampere, candela, celsius, coulomb, degree, fahrenheit, farad, henry, hertz, joule, kelvin, kilogram, meter, mole, ohm, radian, second, siemens, volt, watt, weber); END_TYPE; ENTITY angle_unit; referenced_unit : unit; -- reference WHERE valid_referenced_unit : (* The physical_type of the unit is either degrees or radians. *) valid_unit_type(referenced_unit, degree) OR valid_unit_type(referenced_unit, radian); END_ENTITY; ENTITY capacitance_unit; referenced_unit : unit; -- reference WHERE valid_referenced_unit : (* The physical_type of the unit is farad. *) valid_unit_type(referenced_unit, farad); END_ENTITY; ENTITY current_unit; referenced_unit : unit; -- reference WHERE valid_referenced_unit : (* The physical_type of the unit is ampere. *) valid_unit_type(referenced_unit, ampere); END_ENTITY; ENTITY distance_unit; referenced_unit : unit; -- reference WHERE valid_referenced_unit : (* The physical_type of the unit is meter. *) valid_unit_type(referenced_unit, meter); END_ENTITY; ENTITY time_unit; referenced_unit : unit; -- reference WHERE valid_referenced_unit : (* The physical_type of the unit is second. *) valid_unit_type(referenced_unit, second); END_ENTITY; ENTITY voltage_unit; referenced_unit : unit; -- reference WHERE valid_referenced_unit : (* The physical_type of the unit is volt. *) valid_unit_type(referenced_unit, volt); END_ENTITY; (* ** The valid_unit_type function returns true if the physical type of the ** chosen unit is same as the chosen type. *) FUNCTION valid_unit_type (chosen_unit : unit; chosen_type : physical_unit) : BOOLEAN; RETURN((SIZEOF(chosen_unit.physical_type) = 1) AND (chosen_unit.physical_type[1].basic_unit = chosen_type) AND (chosen_unit.physical_type[1].exponent = 1)); END_FUNCTION; (* ** A name_information defines a name for an object in the source system. It ** provides a primary name_set which is considered to be the most important and ** should be used to name the object in the target system. It also gives ** aliases which are considered to be secondary names of the object. *) ENTITY name_information; name_aliases : OPTIONAL SET [1:?] OF name_set; primary_name : name_set; WHERE containment_constraint : either_belongs_to_one(SELF, [ 'connectivity_structure_model.connectivity_generic_bus.name', 'connectivity_structure_model.connectivity_generic_net.name', 'edif_information_model.edif.name', 'hierarchy_model.instance.name', 'hierarchy_model.cell_representation.name', 'hierarchy_model.master_port_bundle.name', 'hierarchy_model.master_port.name', 'hierarchy_model.view_group.name', 'hierarchy_model.cluster.name', 'hierarchy_model.cell.name', 'hierarchy_model.design.name', 'instantiatable_object_model.geometry_macro_template.name', 'instantiatable_object_model.ripper_hotspot.name', 'instantiatable_object_model.schematic_template.name', 'library_model.fabricate_figure_group.name', 'library_model.figure_group.name', 'library_model.global_port_bundle.name', 'library_model.global_port.name', 'library_model.library.name', 'logical_connectivity_model.signal_group.name', 'logical_connectivity_model.signal.name', 'schematic_implementation_model.schematic_bus_junction.name', 'schematic_implementation_model.schematic_generic_bus.name', 'schematic_implementation_model.schematic_net_junction.name', 'schematic_implementation_model.schematic_generic_net.name', 'schematic_implementation_model.schematic_ripper.name', 'schematic_implementation_model.schematic_onpageconnector.name', 'schematic_implementation_model.schematic_offpageconnector.name', 'schematic_implementation_model.schematic_global_port_representation.name', 'schematic_implementation_model.schematic_master_port_representation.name', 'schematic_implementation_model.page.name', 'support_definition_model.property.name' ]); END_ENTITY; (* ** A name_set is a grouping of names of different types. A name_set has an ** original_name of an object, exactly as it is specified in the source system. ** A base_name may be specified for an object with all structural information ** removed. Also, a display_name may be defined to indicate the visual name ** given to the object on the source system. *) ENTITY name_set; base_name : OPTIONAL base_name; display_name : OPTIONAL string_token; original_name : original_name; WHERE containment_constraint : (* A name_set is either a primary name or an alias name of a name_information. *) either_belongs_to_one(SELF, ['support_definition_model.name_information.primary_name', 'support_definition_model.name_information.name_aliases']); END_ENTITY; (* ** A base_name is the basic name of an object with all structural information ** removed. All objects which are defined with a range or index value should ** be required to have a base_name specified, e.g. ``BUS'' in ``BUS[0:5]'' or ** ``BUS[3]''. *) ENTITY base_name; index : base_name_index; name : string_token; postfix : OPTIONAL string_token; WHERE containment_constraint : (* A base_name belongs to one name_set. *) belongs_to_one(SELF, 'support_definition_model.name_set.base'); END_ENTITY; (* ** A base_name_index is used to describe the index of a base_name. *) TYPE base_name_index = SELECT (integer_index, string_index); END_TYPE; (* ** An integer_index is used to describe the index of a base_name. The index is ** specified in terms of a sequence of integer indices. *) ENTITY integer_index; members : LIST [1:?] OF integer_token; END_ENTITY; (* ** A string_index is used to describe the index of a base_name. The index is ** specified in terms of a sequence of string indices. *) ENTITY string_index; members : LIST [1:?] OF string_token; END_ENTITY; (* ** An original_name is the name of an object, exactly as it is specified in the ** source system. It has a boolean flag indicating how a name was created on ** the source system. An original_name was either machine generated on the ** source system, or was created by a user of the source system. *) ENTITY original_name; machine_generated : boolean_token; name : string_token; WHERE containment_constraint : (* An original_name belongs to one name_set. *) belongs_to_one(SELF, 'support_definition_model.name_set.original'); END_ENTITY; (* ** A property of an object can be either private or inheritable. An ** inheritable property can be either fixed or not fixed. A property is only ** allowed to have a singular value. *) ENTITY property ABSTRACT SUPERTYPE OF (ONEOF(private_property, inheritable_property) AND ONEOF(boolean_property, integer_property, minomax_property, number_property, point_property, string_property, untyped_property)); name : OPTIONAL name_information; nested_properties : OPTIONAL SET [1:?] OF property; referenced_declaration : property_declaration; -- reference END_ENTITY; ENTITY private_property SUBTYPE OF (property); END_ENTITY; ENTITY inheritable_property SUBTYPE OF (property); is_fixed : boolean_token; END_ENTITY; ENTITY boolean_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference boolean_property_declaration; has_value : OPTIONAL boolean_token; END_ENTITY; ENTITY integer_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference integer_property_declaration; has_value : OPTIONAL integer_token; END_ENTITY; ENTITY minomax_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference minomax_property_declaration; has_value : OPTIONAL minomax_value; END_ENTITY; ENTITY number_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference number_property_declaration; has_value : OPTIONAL number_token; END_ENTITY; ENTITY point_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference point_property_declaration; has_value : OPTIONAL integer_point; END_ENTITY; ENTITY string_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference string_property_declaration; has_value : OPTIONAL string_token; END_ENTITY; ENTITY untyped_property SUBTYPE OF (property); SELF\property.referenced_declaration : -- reference untyped_property_declaration; END_ENTITY; (* ** A property_display is used to specify display locations and display ** attributes for the display of property value and name. *) ENTITY property_display; displayed_property : property; -- reference name_display : OPTIONAL BAG [1:?] OF display; value_display : OPTIONAL BAG [1:?] OF display; END_ENTITY; (* ** A property_override is used to override the value of an ** inheritable_property. If the overridden property is untyped, then no ** overriding value should be specified. It is possible to fix the overridden ** property which means that no further property_override can be made to that ** inheritable property. *) ENTITY property_override ABSTRACT SUPERTYPE OF (ONEOF(boolean_property_override, integer_property_override, minomax_property_override, number_property_override, point_property_override, string_property_override, untyped_property_override)); nested_override : OPTIONAL SET [1:?] OF property_override; overridden_property : inheritable_property; -- reference overridden_property_is_fixed : boolean_token; WHERE valid_overridden_property : (* The overridden_property is not fixed. *) NOT overridden_property.is_fixed; END_ENTITY; ENTITY boolean_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : boolean_property; -- reference overriding_value : boolean_token; END_ENTITY; ENTITY integer_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : integer_property; -- reference overriding_value : integer_token; END_ENTITY; ENTITY minomax_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : minomax_property; -- reference overriding_value : minomax_value; END_ENTITY; ENTITY number_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : number_property; -- reference overriding_value : number_token; END_ENTITY; ENTITY point_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : point_property; -- reference overriding_value : integer_point; END_ENTITY; ENTITY string_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : string_property; -- reference overriding_value : string_token; END_ENTITY; ENTITY untyped_property_override SUBTYPE OF (property_override); SELF\property_override.overridden_property : untyped_property; -- reference END_ENTITY; (* ** A property_display_override is used to override the display locations and ** display attributes for the display of a property value and name. *) ENTITY property_display_override; overridden_property : inheritable_property; -- reference overriding_name_display : display_override; overriding_value_display : display_override; END_ENTITY; (* ** The following are housekeeping functions. They are defined to make ** constraints more readable. *) (* ** The not_exists function returns true if the size of an aggregation is equal ** to zero. It is used to check the size of the result aggregation from a ** query expression. *) FUNCTION not_exists (s : AGGREGATE OF GENERIC) : BOOLEAN; RETURN(SIZEOF(s) = 0); END_FUNCTION; (* ** The there_exists function returns true if the size of an aggregation is ** greater than zero. It is used to check the size of the result aggregation ** from a query expression. *) FUNCTION there_exists (s : AGGREGATE OF GENERIC) : BOOLEAN; RETURN(SIZEOF(s) > 0); END_FUNCTION; (* ** The belongs_to_one function accepts an entity instance and the role it plays ** in the definition of other entities. It returns true if there is only one ** entity instance which uses that specified instance in the specified role. *) FUNCTION belongs_to_one (entity_instance : GENERIC; role : STRING) : BOOLEAN; RETURN(SIZEOF(USEDIN(entity_instance, role)) = 1); END_FUNCTION; (* ** The either_belongs_to_one function accepts an entity instance and a set of ** roles which it possibly plays in the definition of other entities. It ** returns true if there is only one role which that specified instance is ** involved in. *) FUNCTION either_belongs_to_one (entity_instance : GENERIC; roles : SET OF STRING) : BOOLEAN; RETURN(SIZEOF(QUERY(role <* roles | belongs_to_one(entity_instance, role))) = 1); END_FUNCTION; (* ** The usedin_one_role function accepts an entity instance and a specified role ** which it possibly plays in the definition of another entity. It returns an ** entity instance which uses that specified instance in that specified role. *) FUNCTION usedin_one_role (entity_instance : GENERIC; role : STRING) : GENERIC; RETURN(USEDIN(entity_instance, role)[1]); END_FUNCTION; (* ** The usedin_any_one_role function accepts an entity instance and a set of ** roles which it possibly plays in the definition of other entities. It ** returns an entity instance which uses that specified instance in any one of ** the specified roles. *) FUNCTION usedin_any_one_role (entity_instance : GENERIC; roles : SET OF STRING) : GENERIC; LOCAL i : INTEGER; END_LOCAL; REPEAT i := 1 TO HIINDEX(roles); IF belongs_to_one(entity_instance, roles[i]) THEN RETURN(USEDIN(entity_instance, roles[i])[1]); END_IF; END_REPEAT; END_FUNCTION; (* ** The not_defined function is a dummy function. It is used to state that the ** constraint has not been defined. *) FUNCTION not_defined : BOOLEAN; RETURN(TRUE); END_FUNCTION; (* ** The undefined_type is used to serve as a stub. A more suitable type ** should replace this in the future. *) ENTITY undefined_type; END_ENTITY; END_SCHEMA; SCHEMA unfinished_view_model; REFERENCE FROM hierarchy_model (external_cell_representation, internal_cell_representation); ENTITY internal_pcblayout_view SUBTYPE OF (internal_cell_representation); -- will be defined in future version of EDIF! END_ENTITY; ENTITY external_pcblayout_view SUBTYPE OF (external_cell_representation); -- will be defined in future version of EDIF! END_ENTITY; ENTITY internal_masklayout_view SUBTYPE OF (internal_cell_representation); -- not yet defined END_ENTITY; ENTITY external_masklayout_view SUBTYPE OF (external_cell_representation); -- not yet defined END_ENTITY; ENTITY internal_symboliclayout_view SUBTYPE OF (internal_cell_representation); -- not yet defined END_ENTITY; ENTITY external_symboliclayout_view SUBTYPE OF (external_cell_representation); -- not yet defined END_ENTITY; ENTITY internal_logicmodel_view SUBTYPE OF (internal_cell_representation); -- not yet defined END_ENTITY; ENTITY external_logicmodel_view SUBTYPE OF (external_cell_representation); -- not yet defined END_ENTITY; ENTITY internal_behavior_view SUBTYPE OF (internal_cell_representation); -- not yet defined END_ENTITY; ENTITY external_behavior_view SUBTYPE OF (external_cell_representation); -- not yet defined END_ENTITY; END_SCHEMA;