Changeset 142 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Aug 4, 2010, 10:09:03 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
r137 r142 704 704 //--------------------------------------------------[ instruction ]----- 705 705 # define NB_INSTRUCTION 213 // 92 ORBIS, 30 ORFPX (15 simple, 15 double), 91 ORVDX (38 on byte, 41 on half, 12 independant format) 706 # define SIZE_INSTRUCTION 8 707 # define MAX_INSTRUCTION (1<<SIZE_TYPE) 706 708 707 709 enum … … 1363 1365 }; 1364 1366 1367 inline std::string toString_operation(const morpheo::behavioural::type_t& type, const uint32_t& operation) 1368 { 1369 switch (type) 1370 { 1371 case morpheo::behavioural::TYPE_ALU : 1372 { 1373 switch (operation) 1374 { 1375 case OPERATION_ALU_L_ADD : return "L_ADD"; 1376 case OPERATION_ALU_L_ADDC : return "L_ADDC"; 1377 case OPERATION_ALU_L_SUB : return "L_SUB"; 1378 case OPERATION_ALU_L_AND : return "L_AND"; 1379 case OPERATION_ALU_L_OR : return "L_OR"; 1380 case OPERATION_ALU_L_XOR : return "L_XOR"; 1381 default : 1382 { 1383 break; 1384 } 1385 } 1386 break; 1387 } 1388 case morpheo::behavioural::TYPE_SHIFT : 1389 { 1390 switch (operation) 1391 { 1392 case OPERATION_SHIFT_L_SLL : return "L_SLL"; 1393 case OPERATION_SHIFT_L_SRA : return "L_SRA"; 1394 case OPERATION_SHIFT_L_SRL : return "L_SRL"; 1395 case OPERATION_SHIFT_L_ROR : return "L_ROR"; 1396 default : 1397 { 1398 break; 1399 } 1400 } 1401 break; 1402 } 1403 case morpheo::behavioural::TYPE_MOVE : 1404 { 1405 switch (operation) 1406 { 1407 case OPERATION_MOVE_L_MOVHI : return "L_MOVHI"; 1408 case OPERATION_MOVE_L_CMOV : return "L_CMOV"; 1409 default : 1410 { 1411 break; 1412 } 1413 } 1414 break; 1415 } 1416 case morpheo::behavioural::TYPE_TEST : 1417 { 1418 switch (operation) 1419 { 1420 case OPERATION_TEST_L_SFGES : return "L_SFGES"; 1421 case OPERATION_TEST_L_SFGEU : return "L_SFGEU"; 1422 case OPERATION_TEST_L_SFGTS : return "L_SFGTS"; 1423 case OPERATION_TEST_L_SFGTU : return "L_SFGTU"; 1424 case OPERATION_TEST_L_SFLES : return "L_SFLES"; 1425 case OPERATION_TEST_L_SFLEU : return "L_SFLEU"; 1426 case OPERATION_TEST_L_SFLTS : return "L_SFLTS"; 1427 case OPERATION_TEST_L_SFLTU : return "L_SFLTU"; 1428 case OPERATION_TEST_L_SFEQ : return "L_SFEQ"; 1429 case OPERATION_TEST_L_SFNE : return "L_SFNE"; 1430 default : 1431 { 1432 break; 1433 } 1434 } 1435 break; 1436 } 1437 case morpheo::behavioural::TYPE_MUL : 1438 { 1439 switch (operation) 1440 { 1441 case OPERATION_MUL_L_MUL : return "L_MUL"; 1442 case OPERATION_MUL_L_MULU : return "L_MULU"; 1443 default : 1444 { 1445 break; 1446 } 1447 } 1448 break; 1449 } 1450 case morpheo::behavioural::TYPE_DIV : 1451 { 1452 switch (operation) 1453 { 1454 case OPERATION_DIV_L_DIV : return "L_DIV"; 1455 case OPERATION_DIV_L_DIVU : return "L_DIVU"; 1456 default : 1457 { 1458 break; 1459 } 1460 } 1461 break; 1462 } 1463 case morpheo::behavioural::TYPE_EXTEND : 1464 { 1465 switch (operation) 1466 { 1467 case OPERATION_EXTEND_L_EXTEND_Z : return "L_EXTEND_Z"; 1468 case OPERATION_EXTEND_L_EXTEND_S : return "L_EXTEND_S"; 1469 default : 1470 { 1471 break; 1472 } 1473 } 1474 break; 1475 } 1476 case morpheo::behavioural::TYPE_FIND : 1477 { 1478 switch (operation) 1479 { 1480 case OPERATION_FIND_L_FF1 : return "L_FF1"; 1481 case OPERATION_FIND_L_FL1 : return "L_FL1"; 1482 default : 1483 { 1484 break; 1485 } 1486 } 1487 break; 1488 } 1489 case morpheo::behavioural::TYPE_SPECIAL : 1490 { 1491 switch (operation) 1492 { 1493 default : 1494 { 1495 case OPERATION_SPECIAL_L_NOP : return "L_NOP"; 1496 case OPERATION_SPECIAL_L_MFSPR : return "L_MFSPR"; 1497 case OPERATION_SPECIAL_L_MTSPR : return "L_MTSPR"; 1498 case OPERATION_SPECIAL_L_RFE : return "L_RFE"; 1499 case OPERATION_SPECIAL_L_MAC : return "L_MAC"; 1500 case OPERATION_SPECIAL_L_MACRC : return "L_MACRC"; 1501 case OPERATION_SPECIAL_L_MSB : return "L_MSB"; 1502 case OPERATION_SPECIAL_L_SYS : return "L_SYS"; 1503 case OPERATION_SPECIAL_L_TRAP : return "L_TRAP"; 1504 break; 1505 } 1506 } 1507 break; 1508 } 1509 case morpheo::behavioural::TYPE_CUSTOM : 1510 { 1511 switch (operation) 1512 { 1513 case OPERATION_CUSTOM_L_1 : return "L_1"; 1514 case OPERATION_CUSTOM_L_2 : return "L_2"; 1515 case OPERATION_CUSTOM_L_3 : return "L_3"; 1516 case OPERATION_CUSTOM_L_4 : return "L_4"; 1517 case OPERATION_CUSTOM_L_5 : return "L_5"; 1518 case OPERATION_CUSTOM_L_6 : return "L_6"; 1519 case OPERATION_CUSTOM_L_7 : return "L_7"; 1520 case OPERATION_CUSTOM_L_8 : return "L_8"; 1521 case OPERATION_CUSTOM_LF_1_D : return "LF_1_D"; 1522 case OPERATION_CUSTOM_LF_1_S : return "LF_1_S"; 1523 case OPERATION_CUSTOM_LV_1 : return "LV_1"; 1524 case OPERATION_CUSTOM_LV_2 : return "LV_2"; 1525 case OPERATION_CUSTOM_LV_3 : return "LV_3"; 1526 case OPERATION_CUSTOM_LV_4 : return "LV_4"; 1527 default : 1528 { 1529 break; 1530 } 1531 } 1532 break; 1533 } 1534 case morpheo::behavioural::TYPE_BRANCH : 1535 { 1536 switch (operation) 1537 { 1538 case OPERATION_BRANCH_NONE : return "NONE"; 1539 case OPERATION_BRANCH_L_TEST_NF : return "L_TEST_NF"; 1540 case OPERATION_BRANCH_L_TEST_F : return "L_TEST_F"; 1541 case OPERATION_BRANCH_L_JALR : return "L_JALR"; 1542 default : 1543 { 1544 break; 1545 } 1546 } 1547 break; 1548 } 1549 case morpheo::behavioural::TYPE_MEMORY : 1550 { 1551 switch (operation) 1552 { 1553 case OPERATION_MEMORY_LOAD_8_Z : return "LOAD_8_Z"; 1554 case OPERATION_MEMORY_LOAD_16_Z : return "LOAD_16_Z"; 1555 case OPERATION_MEMORY_LOAD_32_Z : return "LOAD_32_Z"; 1556 case OPERATION_MEMORY_LOAD_64_Z : return "LOAD_64_Z"; 1557 case OPERATION_MEMORY_LOAD_8_S : return "LOAD_8_S"; 1558 case OPERATION_MEMORY_LOAD_16_S : return "LOAD_16_S"; 1559 case OPERATION_MEMORY_LOAD_32_S : return "LOAD_32_S"; 1560 case OPERATION_MEMORY_LOAD_64_S : return "LOAD_64_S"; 1561 case OPERATION_MEMORY_STORE_8 : return "STORE_8"; 1562 case OPERATION_MEMORY_STORE_16 : return "STORE_16"; 1563 case OPERATION_MEMORY_STORE_32 : return "STORE_32"; 1564 case OPERATION_MEMORY_STORE_64 : return "STORE_64"; 1565 case OPERATION_MEMORY_STORE_HEAD_OK : return "STORE_HEAD_OK"; 1566 case OPERATION_MEMORY_STORE_HEAD_KO : return "STORE_HEAD_KO"; 1567 case OPERATION_MEMORY_LOCK : return "LOCK"; 1568 case OPERATION_MEMORY_INVALIDATE : return "INVALIDATE"; 1569 case OPERATION_MEMORY_PREFETCH : return "PREFETCH"; 1570 case OPERATION_MEMORY_FLUSH : return "FLUSH"; 1571 case OPERATION_MEMORY_SYNCHRONIZATION : return "SYNCHRONIZATION"; 1572 default : 1573 { 1574 break; 1575 } 1576 } 1577 break; 1578 } 1579 case morpheo::behavioural::TYPE_INVALID : 1580 default : 1581 { 1582 break; 1583 } 1584 } 1585 1586 return ""; 1587 }; 1588 1365 1589 }; // end namespace morpheo 1366 1590 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r139 r142 187 187 log_printf(FUNC,Behavioural,FUNCTION,"End"); 188 188 } 189 190 191 #undef FUNCTION 192 #define FUNCTION "Signal::alloc" 193 void dealloc (void) 194 { 195 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 196 197 switch (_direction) 198 { 199 case INTERNAL : 200 switch (_type_info) 201 { 202 case BOOL : delete (static_cast<sc_signal <bool > *>(_sc_signal_map)); break; 203 case UINT8_T : delete (static_cast<sc_signal <uint8_t > *>(_sc_signal_map)); break; 204 case UINT16_T : delete (static_cast<sc_signal <uint16_t> *>(_sc_signal_map)); break; 205 case UINT32_T : delete (static_cast<sc_signal <uint32_t> *>(_sc_signal_map)); break; 206 case UINT64_T : delete (static_cast<sc_signal <uint64_t> *>(_sc_signal_map)); break; 207 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.\n")); 208 } 209 default : throw (ErrorMorpheo ("Signal \""+_name+"\" : invalid direction.\n")); 210 211 212 } 213 214 log_printf(FUNC,Behavioural,FUNCTION,"End"); 215 } 216 189 190 public : void dealloc (void); 217 191 #ifdef VHDL 218 192 public : void set_port (Vhdl * & vhdl);
Note: See TracChangeset
for help on using the changeset viewer.