added local pragma for consumer
This commit is contained in:
@@ -974,6 +974,14 @@ func (v *Validator) CheckINOUTOrdering() {
|
|||||||
}
|
}
|
||||||
if !consumed {
|
if !consumed {
|
||||||
for _, prod := range producers {
|
for _, prod := range producers {
|
||||||
|
locally_suppressed := false
|
||||||
|
for _, p := range prod.Pragmas {
|
||||||
|
if strings.HasPrefix(p, "not_consumed:") || strings.HasPrefix(p, "ignore(not_consumed)") {
|
||||||
|
locally_suppressed = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !locally_suppressed {
|
||||||
v.Diagnostics = append(v.Diagnostics, Diagnostic{
|
v.Diagnostics = append(v.Diagnostics, Diagnostic{
|
||||||
Level: LevelWarning,
|
Level: LevelWarning,
|
||||||
Message: fmt.Sprintf("INOUT Signal '%s' (DS '%s') is produced in thread '%s' but never consumed in the same thread.", sigName, ds.RealName, thread.RealName),
|
Message: fmt.Sprintf("INOUT Signal '%s' (DS '%s') is produced in thread '%s' but never consumed in the same thread.", sigName, ds.RealName, thread.RealName),
|
||||||
@@ -987,6 +995,7 @@ func (v *Validator) CheckINOUTOrdering() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Validator) processGAMSignalsForOrdering(gam *index.ProjectNode, containerName string, produced map[*index.ProjectNode]map[string][]*index.ProjectNode, consumed map[*index.ProjectNode]map[string]bool, isInput bool, thread, state *index.ProjectNode) {
|
func (v *Validator) processGAMSignalsForOrdering(gam *index.ProjectNode, containerName string, produced map[*index.ProjectNode]map[string][]*index.ProjectNode, consumed map[*index.ProjectNode]map[string]bool, isInput bool, thread, state *index.ProjectNode) {
|
||||||
@@ -1042,15 +1051,15 @@ func (v *Validator) processGAMSignalsForOrdering(gam *index.ProjectNode, contain
|
|||||||
isProduced = true
|
isProduced = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
locally_supressed := false
|
locally_suppressed := false
|
||||||
for _, p := range sig.Pragmas {
|
for _, p := range sig.Pragmas {
|
||||||
if strings.HasPrefix(p, "not_produced:") || strings.HasPrefix(p, "ignore(not_produced)") {
|
if strings.HasPrefix(p, "not_produced:") || strings.HasPrefix(p, "ignore(not_produced)") {
|
||||||
locally_supressed = true
|
locally_suppressed = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isProduced && !locally_supressed {
|
if !isProduced && !locally_suppressed {
|
||||||
v.Diagnostics = append(v.Diagnostics, Diagnostic{
|
v.Diagnostics = append(v.Diagnostics, Diagnostic{
|
||||||
Level: LevelError,
|
Level: LevelError,
|
||||||
Message: fmt.Sprintf("INOUT Signal '%s' (DS '%s') is consumed by GAM '%s' in thread '%s' (State '%s') before being produced by any previous GAM.", sigName, dsNode.RealName, gam.RealName, thread.RealName, state.RealName),
|
Message: fmt.Sprintf("INOUT Signal '%s' (DS '%s') is consumed by GAM '%s' in thread '%s' (State '%s') before being produced by any previous GAM.", sigName, dsNode.RealName, gam.RealName, thread.RealName, state.RealName),
|
||||||
|
|||||||
Reference in New Issue
Block a user