1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 482 unchanged lines hidden (view full) --- 491 ::sc_core::at_negedge(s); 492} 493 494 495void 496next_trigger() 497{ 498 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
499 p->cancelTimeout(); 500 p->clearDynamic(); |
501} 502 503void 504next_trigger(const sc_event &e) 505{ 506 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
507 p->cancelTimeout(); 508 p->setDynamic(new ::sc_gem5::DynamicSensitivityEvent(p, &e)); |
509} 510 511void 512next_trigger(const sc_event_or_list &eol) 513{ 514 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
515 p->cancelTimeout(); 516 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventOrList(p, &eol)); |
517} 518 519void 520next_trigger(const sc_event_and_list &eal) 521{ 522 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
523 p->cancelTimeout(); 524 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventAndList(p, &eal)); |
525} 526 527void 528next_trigger(const sc_time &t) 529{ 530 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
531 p->setTimeout(t); 532 p->clearDynamic(); |
533} 534 535void 536next_trigger(double d, sc_time_unit u) 537{ 538 next_trigger(sc_time(d, u)); 539} 540 541void 542next_trigger(const sc_time &t, const sc_event &e) 543{ 544 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
545 p->setTimeout(t); 546 p->setDynamic(new ::sc_gem5::DynamicSensitivityEvent(p, &e)); |
547} 548 549void 550next_trigger(double d, sc_time_unit u, const sc_event &e) 551{ 552 next_trigger(sc_time(d, u), e); 553} 554 555void 556next_trigger(const sc_time &t, const sc_event_or_list &eol) 557{ 558 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
559 p->setTimeout(t); 560 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventOrList(p, &eol)); |
561} 562 563void 564next_trigger(double d, sc_time_unit u, const sc_event_or_list &eol) 565{ 566 next_trigger(sc_time(d, u), eol); 567} 568 569void 570next_trigger(const sc_time &t, const sc_event_and_list &eal) 571{ 572 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
573 p->setTimeout(t); 574 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventAndList(p, &eal)); |
575} 576 577void 578next_trigger(double d, sc_time_unit u, const sc_event_and_list &eal) 579{ 580 next_trigger(sc_time(d, u), eal); 581} 582 --- 7 unchanged lines hidden (view full) --- 590 return p->timedOut(); 591} 592 593 594void 595wait() 596{ 597 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
598 p->cancelTimeout(); 599 p->clearDynamic(); |
600 sc_gem5::scheduler.yield(); 601} 602 603void 604wait(int n) 605{ 606 if (n <= 0) { 607 std::string msg = csprintf("n = %d", n); 608 SC_REPORT_ERROR("(E525) wait(n) is only valid for n > 0", msg.c_str()); 609 } 610 for (int i = 0; i < n; i++) 611 wait(); 612} 613 614void 615wait(const sc_event &e) 616{ 617 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
618 p->cancelTimeout(); 619 p->setDynamic(new ::sc_gem5::DynamicSensitivityEvent(p, &e)); |
620 sc_gem5::scheduler.yield(); 621} 622 623void 624wait(const sc_event_or_list &eol) 625{ 626 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
627 p->cancelTimeout(); 628 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventOrList(p, &eol)); |
629 sc_gem5::scheduler.yield(); 630} 631 632void 633wait(const sc_event_and_list &eal) 634{ 635 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
636 p->cancelTimeout(); 637 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventAndList(p, &eal)); |
638 sc_gem5::scheduler.yield(); 639} 640 641void 642wait(const sc_time &t) 643{ 644 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
645 p->setTimeout(t); 646 p->clearDynamic(); |
647 sc_gem5::scheduler.yield(); 648} 649 650void 651wait(double d, sc_time_unit u) 652{ 653 wait(sc_time(d, u)); 654} 655 656void 657wait(const sc_time &t, const sc_event &e) 658{ 659 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
660 p->setTimeout(t); 661 p->setDynamic(new ::sc_gem5::DynamicSensitivityEvent(p, &e)); |
662 sc_gem5::scheduler.yield(); 663} 664 665void 666wait(double d, sc_time_unit u, const sc_event &e) 667{ 668 wait(sc_time(d, u), e); 669} 670 671void 672wait(const sc_time &t, const sc_event_or_list &eol) 673{ 674 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
675 p->setTimeout(t); 676 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventOrList(p, &eol)); |
677 sc_gem5::scheduler.yield(); 678} 679 680void 681wait(double d, sc_time_unit u, const sc_event_or_list &eol) 682{ 683 wait(sc_time(d, u), eol); 684} 685 686void 687wait(const sc_time &t, const sc_event_and_list &eal) 688{ 689 sc_gem5::Process *p = sc_gem5::scheduler.current(); |
690 p->setTimeout(t); 691 p->setDynamic(new ::sc_gem5::DynamicSensitivityEventAndList(p, &eal)); |
692 sc_gem5::scheduler.yield(); 693} 694 695void 696wait(double d, sc_time_unit u, const sc_event_and_list &eal) 697{ 698 wait(sc_time(d, u), eal); 699} --- 80 unchanged lines hidden --- |