summaryrefslogtreecommitdiffstats
path: root/func.c
diff options
context:
space:
mode:
authorJiri Gaisler <jiri@gaisler.se>2020-10-25 11:27:31 -0400
committerJiri Gaisler <jiri@gaisler.se>2020-10-28 13:38:31 -0400
commit66efed88eff45dca65661ab65327ee47f2732cfa (patch)
tree17d58ad35d7fa967347bd99bd4005721de2e8716 /func.c
parentAdd -rt option to synch sim to wall time (diff)
downloadsis-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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/func.c b/func.c
index 07f585c..4f72f59 100644
--- a/func.c
+++ b/func.c
@@ -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