2009-10-31 14:08:38 +00:00
|
|
|
|
// -*- C++ -*-
|
2006-08-26 11:35:28 +00:00
|
|
|
|
//*************************************************************************
|
2009-10-31 14:08:38 +00:00
|
|
|
|
// DESCRIPTION: Verilator: Reading of Verilog files
|
2006-08-26 11:35:28 +00:00
|
|
|
|
//
|
2008-04-25 12:14:27 +00:00
|
|
|
|
// Code available from: http://www.veripool.org/verilator
|
2006-08-26 11:35:28 +00:00
|
|
|
|
//
|
|
|
|
|
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
|
|
|
|
|
//
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
//
|
2009-01-02 16:47:39 +00:00
|
|
|
|
// Copyright 2003-2009 by Wilson Snyder. This program is free software; you can
|
2006-08-26 11:35:28 +00:00
|
|
|
|
// 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.
|
2006-08-26 11:35:28 +00:00
|
|
|
|
//
|
|
|
|
|
// Verilator 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.
|
|
|
|
|
//
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
|
2009-10-31 14:08:38 +00:00
|
|
|
|
#ifndef _V3PARSE_H_
|
|
|
|
|
#define _V3PARSE_H_ 1
|
|
|
|
|
#include "config_build.h"
|
|
|
|
|
#include "verilatedos.h"
|
|
|
|
|
#include "V3Error.h"
|
|
|
|
|
#include "V3Global.h"
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
2009-10-31 14:08:38 +00:00
|
|
|
|
class AstNetlist;
|
|
|
|
|
class V3ParseImp;
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
|
|
class V3Parse {
|
|
|
|
|
private:
|
|
|
|
|
V3ParseImp* m_impp;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// CONSTRUCTORS
|
|
|
|
|
// We must allow reading multiple files into one parser
|
|
|
|
|
V3Parse(AstNetlist* rootp);
|
|
|
|
|
~V3Parse();
|
|
|
|
|
|
|
|
|
|
// METHODS
|
|
|
|
|
// Preprocess and read the Verilog file specified into the netlist database
|
|
|
|
|
void parseFile(FileLine* fileline, const string& modname, bool inLibrary);
|
|
|
|
|
|
|
|
|
|
// Push preprocessed text to the lexer
|
|
|
|
|
static void ppPushText(V3ParseImp* impp, const string& text);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // Guard
|