blob: f2d12a8fd5b00c09306b914dc60c359b6ebd23df [file] [log] [blame]
/*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2020 Antmicro
* Based on frontends/json/jsonparse.cc
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#include "UhdmAst.h"
#include "frontends/ast/ast.h"
#include "kernel/yosys.h"
#include <string>
#include <vector>
YOSYS_NAMESPACE_BEGIN
struct UhdmCommonFrontend : public Frontend {
UhdmAstShared shared;
std::string report_directory;
std::vector<std::string> args;
UhdmCommonFrontend(std::string name, std::string short_help) : Frontend(name, short_help) {}
virtual void print_read_options();
virtual void help() = 0;
virtual AST::AstNode *parse(std::string filename) = 0;
virtual void call_log_header(RTLIL::Design *design) = 0;
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design);
};
YOSYS_NAMESPACE_END