URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 418 to Rev 419
- ↔ Reverse comparison
Rev 418 → Rev 419
/trunk/or1ksim/sim-config.h
129,6 → 129,7
int enabled; /* Whether is VAPI module enabled */ |
int server_port; /* A user specified port number for services */ |
int log_enabled; /* Whether to log the vapi requests */ |
int log_device_id; /* Whether to log device ID for each request */ |
char vapi_fn[STR_SIZE]; /* vapi log filename */ |
} vapi; |
}; |
/trunk/or1ksim/testbench/acv_uart.cfg
45,6 → 45,7
section VAPI |
enabled = 1 |
log_enabled = 1 |
log_device_id = 0 |
vapi_fn = "vapi.log" |
server_port = 9100 |
end |
/trunk/or1ksim/vapi/vapi.c
117,6 → 117,16
return tt; |
} |
|
/* Added by Erez 09/12/01 */ |
static void write_vapi_file(unsigned msgtype, unsigned long devid, unsigned long data) |
{ |
if (!runtime.vapi.vapi_file) |
return; |
if (config.vapi.log_device_id) |
fprintf (runtime.vapi.vapi_file, "%08x", devid); |
fprintf (runtime.vapi.vapi_file, "%1x%08x\n", msgtype, data); |
} |
|
static int vapi_write_stream(int fd, void* buf, int len) |
{ |
int n; |
402,8 → 412,7
return; |
} |
|
if (runtime.vapi.vapi_file) |
fprintf (runtime.vapi.vapi_file, "0%08x\n", data); |
write_vapi_file (0, t->id, data); |
debug (4, "[%08x, %08x]\n", t->id, data); |
if (!t->read_func) |
fprintf (stderr, "WARNING: packet sent to undefined id %x, %x\n", t->id, data); |
503,7 → 512,7
fds = 0; |
if (runtime.vapi.vapi_file) { |
/* Mark end of simulation */ |
fprintf (runtime.vapi.vapi_file, "2%08x", 0); |
write_vapi_file (2, t->id, 0); |
fclose (runtime.vapi.vapi_file); |
} |
|
562,8 → 571,7
int vapi_send (unsigned long id, unsigned long data) |
{ |
debug (4, "vapi_send [%08x %08x]\n", id, data); |
if (runtime.vapi.vapi_file) |
fprintf (runtime.vapi.vapi_file, "1%08x\n", data); |
write_vapi_file (1, id, data); |
write_packet (id, data); |
} |
|
/trunk/or1ksim/sim-config.c
358,6 → 358,7
{8, 0, "enabled", "=%i", NULL, (void *)(&config.vapi.enabled)}, |
{8, 0, "server_port", "=%i", NULL, (void *)(&config.vapi.server_port)}, |
{8, 0, "log_enabled", "=%i", NULL, (void *)(&config.vapi.log_enabled)}, |
{8, 0, "log_device_id", "=%i", NULL, (void *)(&config.vapi.log_device_id)}, |
{8, 0, "vapi_log_fn", "=\"%s\"", NULL, (void *)(&config.vapi.vapi_fn[0])}, |
|
{9, 0, "enabled", "=%i", NULL, (void *)(&config.ethernets_enabled)}, |