|
degate 0.1.1
|
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 __VERILOGTBCODETEMPLATEGENERATOR_H__ 00023 #define __VERILOGTBCODETEMPLATEGENERATOR_H__ 00024 00025 #include <degate.h> 00026 #include <tr1/memory> 00027 #include <cctype> 00028 00029 #include <VerilogCodeTemplateGenerator.h> 00030 #include <boost/foreach.hpp> 00031 00032 namespace degate { 00033 00034 /** 00035 * A code template generator for Verilog. 00036 */ 00037 00038 class VerilogTBCodeTemplateGenerator : public VerilogCodeTemplateGenerator { 00039 public: 00040 00041 VerilogTBCodeTemplateGenerator(std::string const& entity_name, 00042 std::string const& description, 00043 std::string const& logic_class); 00044 00045 virtual ~VerilogTBCodeTemplateGenerator(); 00046 virtual std::string generate() const; 00047 00048 protected: 00049 00050 virtual std::string generate_header() const; 00051 virtual std::string generate_module(std::string const& device_type_name) const; 00052 00053 std::string generate_all_assignments(std::vector<std::string> const& in_port_idents, 00054 std::vector<std::string> const& out_port_idents) const; 00055 }; 00056 00057 typedef std::tr1::shared_ptr<VerilogTBCodeTemplateGenerator> VerilogTBCodeTemplateGenerator_shptr; 00058 00059 } 00060 00061 #endif
1.7.4