Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMV2: error_detection_effect not allow port in feature group #2128

Closed
brlarson opened this issue Dec 19, 2019 · 4 comments · Fixed by #2256
Closed

EMV2: error_detection_effect not allow port in feature group #2128

brlarson opened this issue Dec 19, 2019 · 4 comments · Fixed by #2256
Assignees
Milestone

Comments

@brlarson
Copy link

brlarson commented Dec 19, 2019

Summary

Modeling a hardware error detector to indicate an event on a port in a feature group.
In this case, it's a power-on self-test (POST) which is supposed to send an event indicating that POST has found an error.

However, the Xtext grammar only recognizes port identifiers, not ports as part of a feature group.

Expected and Current Behavior

Grammar from AS5506/1A, page 109:

error_detection ::=
[ defining_error_detection_identifier : ] ( error_source_state | all )
-[ [ error_condition ] ]-> error_detection_effect ;

error_detection_effect ::=
( outgoing_port_reference | internal_event_reference ) ! [ ( error_code_value ) ]

outgoing_port_reference ::=
{ featuregroup_identifier . }* port_identifier

Xtext grammar from ErrorModel.xtext, line 577:

ErrorDetection returns ErrorDetection:
(name = ID ':' )?
((state=[ErrorBehaviorState|ID] (typeTokenConstraint=TypeTokenConstraint)?)|
allStates?='all' )
'-[' (condition=ConditionExpression)? ']->'
( detectionReportingPort=[aadl2::TriggerPort|ID] ) '!'
('('errorCode=ErrorCodeValue')')?
';'
;

detectionReportingPort may only be an identifier.

  component error behavior
    events
      post_detected_failure : error event {POSTdetectedFault};
      post_not_detect_failure : error event {UndetectedFault};
	  transitions
	    working -[post_detected_failure]-> failed_detected {POSTdetectedFault};   
	    working -[post_not_detect_failure]-> failed_undetected {UndetectedFault}; 
	  detections
	    working -[post_detected_failure]-> hw_error_detections.post_fail!;  
  end component;

Environment

  • OSATE Version: 2.6.1
  • Operating System: macOS 10.14.6
@jjhugues
Copy link
Contributor

jjhugues commented Jan 5, 2020

Brian, to narrow down the issue properly, can you please submit a minimal example? Thanks

@jjhugues
Copy link
Contributor

jjhugues commented Jan 6, 2020

Also assigned to @joeseibel after internal discussion

@lwrage lwrage added this to the 2.8.0 milestone Mar 24, 2020
@joeseibel
Copy link
Contributor

joeseibel commented Mar 25, 2020

The standard actually contradicts itself here. The syntax allows for a reference to a port in nested feature groups, but naming rule N5 of section E.10 states, "The port identifier in a detection event must exist in the namespace of the component containing the component error behavior specification."

I will assume that N5 is incorrect and update EMV2 to support referencing ports in feature groups.

@yoogx
Copy link

yoogx commented Mar 25, 2020

Could you please file an issue for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants