OpenSTA/search/PathEnumed.hh

77 lines
2.5 KiB
C++
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
2020-03-07 03:50:37 +01:00
// Copyright (c) 2020, Parallax Software, Inc.
2018-09-28 17:54:21 +02:00
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2020-02-16 01:13:16 +01:00
#pragma once
2018-09-28 17:54:21 +02:00
2020-04-05 23:53:44 +02:00
#include "DisallowCopyAssign.hh"
#include "Path.hh"
2018-09-28 17:54:21 +02:00
namespace sta {
// Implements Path API for paths returned by PathEnum.
class PathEnumed : public Path
{
public:
2019-11-11 17:38:25 +01:00
PathEnumed(VertexId vertex_id,
2018-09-28 17:54:21 +02:00
TagIndex tag_index,
Arrival arrival,
PathEnumed *prev_path,
TimingArc *prev_arc);
virtual void setRef(PathRef *ref) const;
2019-11-11 17:38:25 +01:00
virtual bool isNull() const { return vertex_id_ == 0; }
2018-09-28 17:54:21 +02:00
virtual Vertex *vertex(const StaState *sta) const;
2019-11-11 17:38:25 +01:00
virtual VertexId vertexId(const StaState *sta) const;
2018-09-28 17:54:21 +02:00
virtual Tag *tag(const StaState *sta) const;
2019-11-11 23:30:19 +01:00
virtual const RiseFall *transition(const StaState *sta) const;
2018-09-28 17:54:21 +02:00
virtual int trIndex(const StaState *) const;
virtual PathAnalysisPt *pathAnalysisPt(const StaState *sta) const;
virtual PathAPIndex pathAnalysisPtIndex(const StaState *sta) const;
virtual Arrival arrival(const StaState *sta) const;
virtual void setArrival(Arrival arrival, const StaState *sta);
virtual const Required &required(const StaState *sta) const;
virtual void setRequired(const Required &required,
const StaState *sta);
virtual Path *prevPath(const StaState *sta) const;
virtual void prevPath(const StaState *sta,
// Return values.
PathRef &prev_path,
TimingArc *&prev_arc) const;
virtual TimingArc *prevArc(const StaState *sta) const;
PathEnumed *prevPathEnumed() const;
void setPrevPath(PathEnumed *prev);
void setPrevArc(TimingArc *arc);
void setTag(Tag *tag);
using Path::setRef;
using Path::prevPath;
protected:
// Pointer to previous path.
// A path is traversed by following prev_path/arcs.
PathEnumed *prev_path_;
TimingArc *prev_arc_;
Arrival arrival_;
2019-11-11 17:38:25 +01:00
VertexId vertex_id_;
2018-09-28 17:54:21 +02:00
unsigned int tag_index_:tag_index_bits;
private:
DISALLOW_COPY_AND_ASSIGN(PathEnumed);
};
void deletePathEnumed(PathEnumed *path);
} // namespace