Building tdsp graph.