3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

More emscripten stuff, Added example app

This commit is contained in:
Clifford Wolf 2015-02-15 12:09:30 +01:00
parent 86819cc9f8
commit 3216f9420e
5 changed files with 99 additions and 4 deletions

View file

@ -72,6 +72,32 @@ int getopt(int argc, char **argv, const char *optstring)
USING_YOSYS_NAMESPACE
#ifdef EMSCRIPTEN
extern "C" int main(int, char**);
extern "C" void run(const char*);
extern "C" const char *prompt();
int main(int, char**)
{
log_files.push_back(stdout);
log_error_stderr = true;
yosys_banner();
yosys_setup();
}
void run(const char *command)
{
run_pass(command);
}
const char *prompt()
{
return create_prompt(yosys_get_design(), 0);
}
#else /* EMSCRIPTEN */
int main(int argc, char **argv)
{
std::string frontend_command = "auto";
@ -440,3 +466,5 @@ int main(int argc, char **argv)
return 0;
}
#endif /* EMSCRIPTEN */