verilator/src/V3Order.h

56 lines
1.6 KiB
C
Raw Normal View History

// -*- mode: C++; c-file-style: "cc-mode" -*-
//*************************************************************************
// DESCRIPTION: Verilator: Block code ordering
//
2019-11-08 04:33:59 +01:00
// Code available from: https://verilator.org
//
//*************************************************************************
//
2022-01-01 14:26:40 +01:00
// Copyright 2003-2022 by Wilson Snyder. This program is free software; you
// can redistribute it and/or modify it under the terms of either the GNU
// Lesser General Public License Version 3 or the Perl Artistic License
// Version 2.0.
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
//
//*************************************************************************
#ifndef VERILATOR_V3ORDER_H_
#define VERILATOR_V3ORDER_H_
#include "config_build.h"
#include "verilatedos.h"
#include <functional>
#include <unordered_map>
#include <vector>
class AstCFunc;
class AstNetlist;
class AstSenItem;
class AstSenTree;
class AstVarScope;
namespace V3Sched {
struct LogicByScope;
}; // namespace V3Sched
//============================================================================
namespace V3Order {
using ExternalDomainsProvider = std::function<void(const AstVarScope*, std::vector<AstSenTree*>&)>;
AstCFunc* order(
AstNetlist* netlistp, //
const std::vector<V3Sched::LogicByScope*>& logic, //
const std::unordered_map<const AstSenItem*, const AstSenTree*>& trigToSen,
const string& tag, //
bool parallel, //
bool slow, //
ExternalDomainsProvider externalDomains
= [](const AstVarScope*, std::vector<AstSenTree*>&) {});
}; // namespace V3Order
#endif // Guard