addr_format= (char *)malloc(10);
sprintf(addr_format, "0x%%0%dx",
addr_format= (char *)malloc(10);
sprintf(addr_format, "0x%%0%dx",
data_format= (char *)malloc(10);
sprintf(data_format, "%%0%dx", width/4+((width%4)?1:0));
data_format= (char *)malloc(10);
sprintf(data_format, "%%0%dx", width/4+((width%4)?1:0));
else
((TYPE_UDWORD*)mem)[addr]= (*val)&mask;*/
fprintf(stderr, "FIXME cl_mem::write(0x%06"_A_"x, 0x%04"_M_"x)\n",
else
((TYPE_UDWORD*)mem)[addr]= (*val)&mask;*/
fprintf(stderr, "FIXME cl_mem::write(0x%06"_A_"x, 0x%04"_M_"x)\n",
-cl_mem::dump(t_addr start, t_addr stop, int bpl, class cl_console *con)
+cl_mem::dump(t_addr start, t_addr stop, int bpl, class cl_console_base *con)
- (start+i < size) &&
- (start+i <= stop);
- i++)
- {
- long c= get(start+i);
- con->dd_printf("%c", isprint(255&c)?(255&c):'.');
- if (width > 8)
- con->dd_printf("%c", isprint(255&(c>>8))?(255&(c>>8)):'.');
- if (width > 16)
- con->dd_printf("%c", isprint(255&(c>>16))?(255&(c>>16)):'.');
- if (width > 24)
- con->dd_printf("%c", isprint(255&(c>>24))?(255&(c>>24)):'.');
- }
+ (start+i < size) &&
+ (start+i <= stop);
+ i++)
+ {
+ long c= get(start+i);
+ con->dd_printf("%c", isprint(255&c)?(255&c):'.');
+ if (width > 8)
+ con->dd_printf("%c", isprint(255&(c>>8))?(255&(c>>8)):'.');
+ if (width > 16)
+ con->dd_printf("%c", isprint(255&(c>>16))?(255&(c>>16)):'.');
+ if (width > 24)
+ con->dd_printf("%c", isprint(255&(c>>24))?(255&(c>>24)):'.');
+ }
{
return(dump(dump_finished, dump_finished+10*8-1, 8, con));
}
{
return(dump(dump_finished, dump_finished+10*8-1, 8, con));
}
*/
cl_m::cl_m(enum mem_class atype, char *aclass_name, t_addr asize, int awidth,
*/
cl_m::cl_m(enum mem_class atype, char *aclass_name, t_addr asize, int awidth,
cl_memory(aclass_name, asize, awidth)
//cl_mem(atype, aclass_name, 0, awidth, auc)
{
cl_memory(aclass_name, asize, awidth)
//cl_mem(atype, aclass_name, 0, awidth, auc)
{
nc= new cl_ev_reg_cell(width, uc);
nc->set(cell->get());
nc->set_type(nc->get_type() &
nc= new cl_ev_reg_cell(width, uc);
nc->set(cell->get());
nc->set_type(nc->get_type() &
nc->set_type(nc->get_type() | (cell->get_type() & CELL_GENERAL));
class cl_event_handler *eh= nc->get_event_handler();
if (eh)
nc->set_type(nc->get_type() | (cell->get_type() & CELL_GENERAL));
class cl_event_handler *eh= nc->get_event_handler();
if (eh)
- {
- free(((class cl_registered_cell *)cell)->hardwares);
- ((class cl_registered_cell *)cell)->hardwares= 0;
- }
+ {
+ free(((class cl_registered_cell *)cell)->hardwares);
+ ((class cl_registered_cell *)cell)->hardwares= 0;
+ }
}
else if (cell->get_type() & (CELL_READ_BRK | CELL_WRITE_BRK))
{
/* Break is already set on it */
class cl_event_handler *eh;
if ((eh= cell->get_event_handler()))
}
else if (cell->get_type() & (CELL_READ_BRK | CELL_WRITE_BRK))
{
/* Break is already set on it */
class cl_event_handler *eh;
if ((eh= cell->get_event_handler()))
nc->set_type(nc->get_type() | (cell->get_type() & CELL_GENERAL));
class cl_event_handler *eh;
if ((eh= nc->get_event_handler()))
nc->set_type(nc->get_type() | (cell->get_type() & CELL_GENERAL));
class cl_event_handler *eh;
if ((eh= nc->get_event_handler()))
- {
- cell->set_type(cell->get_type() & ~(CELL_READ_BRK|CELL_WRITE_BRK));
- cell->set_type(cell->get_type() | t);
- return;
- }
+ {
+ cell->set_type(cell->get_type() & ~(CELL_READ_BRK|CELL_WRITE_BRK));
+ cell->set_type(cell->get_type() | t);
+ return;
+ }
- {
- cell->set_type(cell->get_type() & ~(CELL_READ_BRK|CELL_WRITE_BRK));
- cell->set_type(cell->get_type() | t);
- return;
- }
+ {
+ cell->set_type(cell->get_type() & ~(CELL_READ_BRK|CELL_WRITE_BRK));
+ cell->set_type(cell->get_type() | t);
+ return;
+ }
hardwares= (class cl_hw **)malloc(sizeof(class cl_hw *));
else
hardwares= (class cl_hw **)realloc(hardwares,
hardwares= (class cl_hw **)malloc(sizeof(class cl_hw *));
else
hardwares= (class cl_hw **)realloc(hardwares,