Definition File Generation
The definitions file contains simple value, switch value, and drive record definitions as well as port paths.
The base is the behavior class name.
Port path names are generated by concatenating the base followed by the name of each field or the index within a sequence from the root of the public wire.
Wrong:
The simple value record type name is generated by appending the string "SimpleRec" to the base. Similiarly the ref type is generated by appending the string "SimpleRef" to the base. The switch value record type has the string "SwitchRec" appended and its ref type has "SwitchRef" appended. The drive record has the string "DriveRec" appended and its ref type has "DriveRef" appended.
Current:
The name given a data type used to represent a wire during simulation is the wire name, with either "Simple", "Switch", or "Drive" appended.
If a part of a behavior class's public wire has the property RoseBind.switchWire then that part participates in the full switch level algorithm. ValsChanged, PropQ and PropUD procedures must be supplied for the behavior class. InitUD, FinalUD, FindVicinity, and other low level procedures may be supplied. Parts without the RoseBind.switchWire property interact in the simple way. For determining the interaction of a tester for a behavior class, the RoseBind.testerSwitchWire property is consulted.
The types of the fields of the simple and switch value records are derived from the public wire of the behavior class according to the following rules:
An atomic wire becomes a BOOL in the simple value record type.
An atomic wire becomes a RoseBehavior.SwitchVal in the switch value record type.
A record wire becomes a RECORD. The fields of the RECORD are generated by recursively applying these rules to each of the elements of the record wire.
The base type of a sequence wire is the structure of a member of that sequence. A sequence wire which does not have identical structure for each of its elements is illegal. A sequence wire which has the property RoseBind.variableWire becomes a REF to a sequence record whose type is generated by applying these rules recursively to the base type of the sequence wire.
A basic sequence is a sequence wire which has an atomic wire as its base type. In the simple value record type a basic sequence becomes a BitOps.BitWord if 1 d size d 16; a BitOps.BitDWord if 16 ý size d 32; an ARRAY [0 .. size/16Ë) OF CARDINAL if size ý 32.
A sequence wire becomes an ARRAY of the base type.
Drive records have the following rules:
An atomic wire becomes a RoseBehavior.Drive.
A wire with the property RoseBind.simpleDrive (RoseBind.testerSimpleDrive for tester) becomes RoseBehavior.Drive.
A record wire becomes a RECORD. The fields of the RECORD are generated by recursively applying these rules to each of the elements of the record wire.
A basic sequence becomes RoseBehavior.Drive unless it has the property RoseBind.complexDrive (RoseBind.testerComplexDrive for tester).
A sequence wire which has the property RoseBind.variableWire becomes a REF to a sequence record whose type is generated by applying these rules recursively to the base type of the sequence wire.
A sequence wire becomes an ARRAY of the base type.
NAndSimpleRec: TYPE = RECORD[
Vdd: BOOL,
Gnd: BOOL,
Input: NAndSimpleInputRef,
nOutput: BOOL];
NAndSimpleInputRef: TYPE = REF NAndSimpleInputRec;
NAndSimpleInputRec: TYPE = RECORD[
c: SEQUENCE size: NAT OF BOOL];
Implementation Generation
Rosemary will generate a program module which implements functions necessary to running a simulation which can be derived from the Core data structure.
The simple and switch value records and the drive records allocation procedures are in this module. The module initializes the port paths.