diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2020-10-25 11:27:31 -0400 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2020-10-28 13:38:31 -0400 |
commit | 66efed88eff45dca65661ab65327ee47f2732cfa (patch) | |
tree | 17d58ad35d7fa967347bd99bd4005721de2e8716 /func.c | |
parent | Add -rt option to synch sim to wall time (diff) | |
download | sis-66efed88eff45dca65661ab65327ee47f2732cfa.tar.bz2 |
Add networking support using host tap device2.23
* Emulation of GRETH 10/100 Mbit MAC and PHY
* Supported only on linux
Diffstat (limited to 'func.c')
-rw-r--r-- | func.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -64,6 +64,7 @@ int nouartrx = 0; int port = 1234; int sim_run = 0; int sync_rt = 0; +char bridge[32] = ""; /* RAM and ROM for all systems */ char romb[ROM_SIZE]; @@ -1056,7 +1057,7 @@ pwd_enter (struct pstate *sregs) } void -rt_sync() +rt_sync () { double walltime, realtime, dtime; int64 stime; @@ -1065,11 +1066,11 @@ rt_sync() walltime = ebase.tottime + get_time () - ebase.starttime; dtime = (realtime - walltime); if (dtime > 0.001) - { - if (dtime > 1.0) - dtime = 0.1; - usleep ((useconds_t) (dtime * 1E6)); - } + { + if (dtime > 1.0) + dtime = 0.1; + usleep ((useconds_t) (dtime * 1E6)); + } } int |