Commit dfa9594d authored by Hejing Li's avatar Hejing Li
Browse files

Merge branch 'master' of github.com:simbricks/simbricks

parents 8a50c9a1 c208339b
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <cassert> #include <cassert>
// #define DEBUG 1 // #define DEBUG 1
// #define ARMED_MODE
static nicbm::Runner *runner; static nicbm::Runner *runner;
...@@ -170,7 +171,9 @@ void EventRing::dmaDone(DMAOp *op) { ...@@ -170,7 +171,9 @@ void EventRing::dmaDone(DMAOp *op) {
void EventRing::issueEvent(unsigned type, unsigned source) { void EventRing::issueEvent(unsigned type, unsigned source) {
assert(type == EVENT_TYPE_TX_CPL || type == EVENT_TYPE_RX_CPL); assert(type == EVENT_TYPE_TX_CPL || type == EVENT_TYPE_RX_CPL);
#ifdef ARMED_MODE
if (this->armed) { if (this->armed) {
#endif
if (full()) { if (full()) {
fprintf(stderr, "Event ring is rull\n"); fprintf(stderr, "Event ring is rull\n");
return; return;
...@@ -195,7 +198,9 @@ void EventRing::issueEvent(unsigned type, unsigned source) { ...@@ -195,7 +198,9 @@ void EventRing::issueEvent(unsigned type, unsigned source) {
runner->IssueDma(*op); runner->IssueDma(*op);
this->_currHead++; this->_currHead++;
this->armed = false; this->armed = false;
#ifdef ARMED_MODE
} }
#endif
} }
CplRing::CplRing(EventRing *eventRing) : eventRing(eventRing) { CplRing::CplRing(EventRing *eventRing) : eventRing(eventRing) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment