| ofs | hex dump | ascii |
|---|
| 0000 | ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 60 00 60 00 00 ff e1 1f 8b 45 78 69 66 00 00 49 49 | ......JFIF.....`.`......Exif..II |
| 0020 | 2a 00 08 00 00 00 09 00 0f 01 02 00 06 00 00 00 7a 00 00 00 10 01 02 00 04 00 00 00 4e 37 33 00 | *...............z...........N73. |
| 0040 | 12 01 03 00 01 00 00 00 00 00 00 00 1a 01 05 00 01 00 00 00 80 00 00 00 28 01 03 00 01 00 00 00 | ........................(....... |
| 0060 | 02 00 00 00 1b 01 05 00 01 00 00 00 88 00 00 00 31 01 02 00 0b 00 00 00 90 00 00 00 13 02 03 00 | ................1............... |
| 0080 | 01 00 00 00 01 00 00 00 69 87 04 00 01 00 00 00 9c 00 00 00 ec 0b 00 00 4e 6f 6b 69 61 00 2c 01 | ........i...............Nokia.,. |
| 00a0 | 00 00 01 00 00 00 2c 01 00 00 01 00 00 00 50 69 63 61 73 61 20 33 2e 30 00 00 18 00 9a 82 05 00 | ......,.......Picasa.3.0........ |
| 00c0 | 01 00 00 00 c2 01 00 00 9d 82 05 00 01 00 00 00 ca 01 00 00 27 88 03 00 01 00 00 00 64 00 00 00 | ....................'.......d... |
| 00e0 | 00 90 07 00 04 00 00 00 30 32 32 30 03 90 02 00 14 00 00 00 d2 01 00 00 04 90 02 00 14 00 00 00 | ........0220.................... |
| 0100 | e6 01 00 00 01 91 07 00 04 00 00 00 01 02 03 00 01 92 0a 00 01 00 00 00 fa 01 00 00 02 92 05 00 | ................................ |
| 0120 | 01 00 00 00 02 02 00 00 08 92 03 00 01 00 00 00 00 00 00 00 09 92 03 00 01 00 00 00 18 00 00 00 | ................................ |
| 0140 | 0a 92 05 00 01 00 00 00 0a 02 00 00 7c 92 07 00 b0 09 00 00 12 02 00 00 00 a0 07 00 04 00 00 00 | ............|................... |
| 0160 | 30 31 30 30 01 a0 03 00 01 00 00 00 ff ff 00 00 02 a0 04 00 01 00 00 00 00 04 00 00 03 a0 04 00 | 0100............................ |
| 0180 | 01 00 00 00 00 03 00 00 01 a4 03 00 01 00 00 00 00 00 00 00 02 a4 03 00 01 00 00 00 00 00 00 00 | ................................ |
| 01a0 | 03 a4 03 00 01 00 00 00 00 00 00 00 04 a4 05 00 01 00 00 00 c2 0b 00 00 06 a4 03 00 01 00 00 00 | ................................ |
| 01c0 | 00 00 00 00 07 a4 03 00 01 00 00 00 00 00 00 00 20 a4 02 00 21 00 00 00 ca 0b 00 00 00 00 00 00 | ....................!........... |
| 01e0 | 00 fa 00 00 40 42 0f 00 1c 00 00 00 0a 00 00 00 32 30 31 30 3a 31 30 3a 30 34 20 31 39 3a 31 33 | ....@B..........2010:10:04.19:13 |
| 0200 | 3a 33 34 00 32 30 31 30 3a 31 30 3a 30 34 20 31 39 3a 31 33 3a 33 34 00 7d 0f 00 00 e8 03 00 00 | :34.2010:10:04/*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2012 Claire Xenia Wolf <claire@yosyshq.com>
*
* 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.
*
* ---
*
* A very simple and straightforward frontend for the RTLIL text
* representation.
*
*/
#include "rtlil_frontend.h"
#include "kernel/register.h"
#include "kernel/log.h"
void rtlil_frontend_yyerror(char const *s)
{
YOSYS_NAMESPACE_PREFIX log_error("Parser error in line %d: %s\n", rtlil_frontend_yyget_lineno(), s);
}
YOSYS_NAMESPACE_BEGIN
struct RTLILFrontend : public Frontend {
RTLILFrontend() : Frontend("rtlil", "read modules from RTLIL file") { }
void help() override
{
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n");
log(" read_rtlil [filename]\n");
log("\n");
log("Load modules from an RTLIL file to the current design. (RTLIL is a text\n");
log("representation of a design in yosys's internal format.)\n");
log("\n");
log(" -nooverwrite\n");
log(" ignore re-definitions of modules. (the default behavior is to\n");
log(" create an error message if the existing module is not a blackbox\n");
log(" module, and overwrite the existing module if it is a blackbox module.)\n");
log("\n");
log(" -overwrite\n");
log(" overwrite existing modules with the same name\n");
log("\n");
log(" -lib\n");
log(" only create empty blackbox modules\n");
log("\n");
}
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
{
RTLIL_FRONTEND::flag_nooverwrite = false;
RTLIL_FRONTEND::flag_overwrite = false;
RTLIL_FRONTEND::flag_lib = false;
log_header(design, "Executing RTLIL frontend.\n");
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++) {
std::string arg = args[argidx];
if (arg == "-nooverwrite") {
RTLIL_FRONTEND::flag_nooverwrite = true;
RTLIL_FRONTEND::flag_overwrite = false;
continue;
}
if (arg == "-overwrite") {
RTLIL_FRONTEND::flag_nooverwrite = false;
RTLIL_FRONTEND::flag_overwrite = true;
continue;
}
if (arg == "-lib") {
RTLIL_FRONTEND::flag_lib = true;
continue;
}
break;
}
extra_args(f, filename, args, argidx);
log("Input filename: %s\n", filename.c_str());
RTLIL_FRONTEND::lexin = f;
RTLIL_FRONTEND::current_design = design;
rtlil_frontend_yydebug = false;
rtlil_frontend_yyrestart(NULL);
rtlil_frontend_yyparse();
rtlil_frontend_yylex_destroy();
}
} RTLILFrontend;
struct IlangFrontend : public Frontend {
IlangFrontend() : Frontend("ilang", "(deprecated) alias of read_rtlil") { }
void help() override
{
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n");
log("See `help read_rtlil`.\n");
log("\n");
}
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
{
RTLILFrontend.execute(f, filename, args, design);
}
} IlangFrontend;
YOSYS_NAMESPACE_END
|