2012-04-13 01:08:20 +00:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
2006-08-26 11:35:28 +00:00
|
|
|
//*************************************************************************
|
|
|
|
// DESCRIPTION: Verilator: Emit Verilog code for module tree
|
|
|
|
//
|
2019-11-08 03:33:59 +00:00
|
|
|
// Code available from: https://verilator.org
|
2006-08-26 11:35:28 +00:00
|
|
|
//
|
|
|
|
//*************************************************************************
|
|
|
|
//
|
2023-01-01 15:18:39 +00:00
|
|
|
// Copyright 2003-2023 by Wilson Snyder. This program is free software; you
|
2020-03-21 15:24:24 +00:00
|
|
|
// can redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 21:07:57 +00:00
|
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
// Version 2.0.
|
2020-03-21 15:24:24 +00:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2006-08-26 11:35:28 +00:00
|
|
|
//
|
|
|
|
//*************************************************************************
|
2019-10-05 00:17:11 +00:00
|
|
|
|
2021-03-04 02:57:07 +00:00
|
|
|
#ifndef VERILATOR_V3EMITV_H_
|
|
|
|
#define VERILATOR_V3EMITV_H_
|
2018-10-14 17:43:24 +00:00
|
|
|
|
2006-12-18 19:20:45 +00:00
|
|
|
#include "config_build.h"
|
|
|
|
#include "verilatedos.h"
|
2018-10-14 17:43:24 +00:00
|
|
|
|
2022-01-08 16:18:23 +00:00
|
|
|
class AstNode;
|
|
|
|
class AstSenTree;
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
2020-11-19 02:32:16 +00:00
|
|
|
class V3EmitV final {
|
2006-08-26 11:35:28 +00:00
|
|
|
public:
|
2022-04-23 13:03:37 +00:00
|
|
|
static void verilogForTree(const AstNode* nodep, std::ostream& os = std::cout);
|
|
|
|
static void verilogPrefixedTree(const AstNode* nodep, std::ostream& os, const string& prefix,
|
2020-04-14 02:51:35 +00:00
|
|
|
int flWidth, AstSenTree* domainp, bool user3mark);
|
2019-09-27 07:44:23 +00:00
|
|
|
static void emitvFiles();
|
2022-01-09 23:11:24 +00:00
|
|
|
static void debugEmitV(const string& filename);
|
2006-08-26 11:35:28 +00:00
|
|
|
};
|
|
|
|
|
2019-05-19 20:13:13 +00:00
|
|
|
#endif // Guard
|