degate  0.1.2
VerilogModuleGenerator.h
Go to the documentation of this file.
00001 /* -*-c++-*-
00002 
00003  This file is part of the IC reverse engineering tool degate.
00004 
00005  Copyright 2008, 2009, 2010 by Martin Schobert
00006 
00007  Degate is free software: you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by
00009  the Free Software Foundation, either version 3 of the License, or
00010  any later version.
00011 
00012  Degate is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU General Public License for more details.
00016 
00017  You should have received a copy of the GNU General Public License
00018  along with degate. If not, see <http://www.gnu.org/licenses/>.
00019 
00020 */
00021 
00022 #ifndef __VERILOGMODULEGENERATOR_H__
00023 #define __VERILOGMODULEGENERATOR_H__
00024 
00025 #include <degate.h>
00026 #include <memory>
00027 
00028 #include <VerilogCodeTemplateGenerator.h>
00029 
00030 namespace degate {
00031 
00032   class VerilogModuleGenerator : public VerilogCodeTemplateGenerator {
00033     
00034   private:
00035 
00036     Module_shptr mod;
00037     bool no_gates;
00038 
00039   public:
00040     
00041     VerilogModuleGenerator(Module_shptr module, bool do_not_output_gates = false);
00042     
00043     virtual ~VerilogModuleGenerator();
00044     
00045   protected:
00046     
00047     virtual std::string generate_common() const;
00048 
00049     virtual std::string generate_impl(std::string const& logic_class = ""  /* unused parameter */) const;
00050 
00051   private:
00052 
00053     std::string generate_common_code_for_gates(Module_shptr module, std::set<GateTemplate_shptr> & already_dumped) const;
00054   };
00055 
00056 
00057 }
00058 
00059 #endif