URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [or1ksim/] [cuc/] [cuc.c] - Diff between revs 1061 and 1062
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1061 |
Rev 1062 |
Line 30... |
Line 30... |
#include "profiler.h"
|
#include "profiler.h"
|
#include "opcode/or32.h"
|
#include "opcode/or32.h"
|
#include "parse.h"
|
#include "parse.h"
|
|
|
FILE *flog;
|
FILE *flog;
|
int cuc_debug = 9;
|
int cuc_debug = 0;
|
|
|
/* Last used registers by software convention */
|
/* Last used registers by software convention */
|
/* Note that r11 is caller saved register, and we can destroy it.
|
/* Note that r11 is caller saved register, and we can destroy it.
|
Due to CUC architecture we must always return something, even garbage (so that
|
Due to CUC architecture we must always return something, even garbage (so that
|
caller knows, we are finished, when we send acknowledge).
|
caller knows, we are finished, when we send acknowledge).
|
Line 612... |
Line 612... |
while (1) {
|
while (1) {
|
char *s;
|
char *s;
|
wait_command:
|
wait_command:
|
PRINTF ("(cuc) ");
|
PRINTF ("(cuc) ");
|
fflush (stdout);
|
fflush (stdout);
|
fgets(tmp1, sizeof tmp1, stdin);
|
wait_command_empty:
|
|
s = fgets(tmp1, sizeof tmp1, stdin);
|
|
usleep (100);
|
|
if (!s) goto wait_command_empty;
|
for (s = tmp1; *s != '\0' && *s != '\n' && *s != '\r'; s++);
|
for (s = tmp1; *s != '\0' && *s != '\n' && *s != '\r'; s++);
|
*s = '\0';
|
*s = '\0';
|
|
|
/* quit command */
|
/* quit command */
|
if (strcmp (tmp1, "q") == 0 || strcmp (tmp1, "quit") == 0) {
|
if (strcmp (tmp1, "q") == 0 || strcmp (tmp1, "quit") == 0) {
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.