14         int fd = posix_openpt(O_RDWR);
 
  16         struct termios kbdios;
 
  19         fcntl(fd, F_SETFD, 0);  /* clear close-on-exec */
 
  20         tcgetattr(fd, &kbdios);
 
  21         kbdios.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
 
  22         tcsetattr(fd, TCSANOW, &kbdios);
 
  23         sprintf(b, "rxvt -pty-fd %d -bg black -fg white -title \"Output terminal\" &", fd);
 
  26         ptyfd = open(ptsname(fd), O_RDWR | O_NONBLOCK);
 
  30 unsigned int term_input()
 
  36         rv = read(ptyfd, &c, 1);
 
  42 void term_output(unsigned char d)
 
  44         int fd = posix_openpt(O_RDWR);
 
  53 unsigned int main_time = 0;
 
  55 double sc_time_stamp ()
 
  65         while (!Verilated::gotFinish())
 
  71 //                      printf("%d: Bubble: %d. PC: %08x. Ins'n: %08x\n", main_time/2, top->bubbleshield, top->pc, top->insn);