1
1
/*
2
- Copyright (c) 2002-2015 Tampere University.
2
+ Copyright (c) 2002-2021 Tampere University.
3
3
4
4
This file is part of TTA-Based Codesign Environment (TCE).
5
5
30
30
* however have been allocated.
31
31
*
32
32
* @author Heikki Kultala 2006-2009 (heikki.kultala-no.spam-tut.fi)
33
+ * @author Pekka Jääskeläinen 2021 (pekka.jaaskelainen tuni fi)
33
34
* @note rating: red
34
35
*/
35
36
@@ -1641,7 +1642,7 @@ DataDependenceGraphBuilder::createTriggerDependencies(
1641
1642
* @param mn moveNode that is the destination of the dependencies.
1642
1643
* @param dop Operation that mn triggers.
1643
1644
*/
1644
- void
1645
+ void
1645
1646
DataDependenceGraphBuilder::createSideEffectEdges (
1646
1647
MoveNodeUseSet& prevMoves, const MoveNode& mn, Operation& dop) {
1647
1648
@@ -1655,6 +1656,33 @@ DataDependenceGraphBuilder::createSideEffectEdges(
1655
1656
if ((&dop == &o && o.hasSideEffects ()) ||
1656
1657
dop.dependsOn (o) || o.dependsOn (dop)) {
1657
1658
1659
+ // Operations forced to different FUs are independent since
1660
+ // the operation state is per FU. Check if the moves have
1661
+ // forced set of FUs and if the sets overlap.
1662
+ if (mn.move ().hasAnnotations (
1663
+ TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_DST) &&
1664
+ i->mn ()->move ().hasAnnotations (
1665
+ TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_DST)) {
1666
+ bool alwaysDifferentFUs = true ;
1667
+ for (int idx = 0 ; idx < mn.move ().annotationCount (
1668
+ TTAProgram::ProgramAnnotation::
1669
+ ANN_ALLOWED_UNIT_DST);
1670
+ ++idx) {
1671
+ if (i->mn ()->move ().hasAnnotation (
1672
+ TTAProgram::ProgramAnnotation::
1673
+ ANN_ALLOWED_UNIT_DST,
1674
+ mn.move ().annotation (
1675
+ idx,
1676
+ TTAProgram::ProgramAnnotation::
1677
+ ANN_ALLOWED_UNIT_DST).stringValue ())) {
1678
+ alwaysDifferentFUs = false ;
1679
+ break ;
1680
+ }
1681
+ }
1682
+ if (alwaysDifferentFUs)
1683
+ return ;
1684
+ }
1685
+
1658
1686
if (!currentDDG_->exclusingGuards (*(i->mn ()), mn)) {
1659
1687
DataDependenceEdge* dde =
1660
1688
new DataDependenceEdge (
0 commit comments