Changeset 65 for sources/src/entity.cc
- Timestamp:
- Oct 23, 2019, 12:53:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/entity.cc
r60 r65 395 395 equi_list_t::iterator i; 396 396 int index = 0; 397 for (i = equi_list.begin(); i != equi_list.end(); ++i) { 398 sc_interface *out = get_out_port(*i); 399 if (out) { 400 bind_equi_to_table(*i, out->get_pointer()); 401 } 402 else { 403 sc_interface * reg = get_signal(*i); 404 if (reg == NULL) { 405 reg = get_localvar(*i); 406 } 407 if (reg) { 408 bind_equi_to_table(*i, reg->get_pointer()); 409 } 410 else { 411 bind_equi_to_table(*i, &(equi_table[index])); 412 index += (i->begin()->data_size_in_bytes() - 1) / sizeof(tab_t) + 1; 413 } 414 } 415 #if 0 416 sc_interface *reg = get_signal (*i); 417 sc_interface *out = get_out_port (*i); 418 if (reg) { 419 std::cerr << "binding " << *i << " to reg " 420 << reg << std::endl; 421 bind_equi_to_table (*i, reg->get_pointer ()); 422 } else if (out) { 423 std::cerr << "binding " << *i << " to out " 424 << out << std::endl; 425 bind_equi_to_table (*i, out->get_pointer ()); 426 } else { 427 reg = get_localvar (*i); 428 if (reg) { 429 std::cerr << "binding " << *i << " to localvar " 430 << reg << std::endl; 431 bind_equi_to_table (*i, reg->get_pointer ()); 432 } else { 433 std::cerr << "binding " << *i << " to index " 434 << index << std::endl; 435 bind_equi_to_table (*i, &(equi_table[index])); 436 index += (i->begin()->data_size_in_bytes() - 1) / sizeof(tab_t) + 1; 437 } 438 } 397 for (i = equi_list.begin (); i != equi_list.end (); ++i) { 398 #if 1 399 sc_interface *out = get_out_port (*i); 400 if (out) { 401 bind_equi_to_table (*i, out->get_pointer ()); 402 } else { 403 sc_interface *reg = get_signal (*i); 404 if (reg == NULL) 405 reg = get_localvar (*i); 406 if (reg) { 407 bind_equi_to_table (*i, reg->get_pointer ()); 408 } else { 409 bind_equi_to_table (*i, &(equi_table[index])); 410 index += (i->begin()->data_size_in_bytes() - 1) / sizeof(tab_t) + 1; 411 } 412 } 413 #else 414 sc_interface *reg = get_signal (*i); 415 sc_interface *out = get_out_port (*i); 416 if (reg) { 417 std::cerr << "binding " << *i << " to reg " 418 << reg << std::endl; 419 bind_equi_to_table (*i, reg->get_pointer ()); 420 } else if (out) { 421 std::cerr << "binding " << *i << " to out " 422 << out << std::endl; 423 bind_equi_to_table (*i, out->get_pointer ()); 424 } else { 425 reg = get_localvar (*i); 426 if (reg) { 427 std::cerr << "binding " << *i << " to localvar " 428 << reg << std::endl; 429 bind_equi_to_table (*i, reg->get_pointer ()); 430 } else { 431 std::cerr << "binding " << *i << " to index " 432 << index << std::endl; 433 bind_equi_to_table (*i, &(equi_table[index])); 434 index += (i->begin()->data_size_in_bytes() - 1) / sizeof(tab_t) + 1; 435 } 436 } 439 437 #endif 440 438 }
Note: See TracChangeset
for help on using the changeset viewer.