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:
parent
86819cc9f8
commit
3216f9420e
5 changed files with 99 additions and 4 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue