cpu: Update DRAM traffic gen
[gem5.git] / src / cpu / inorder / resources / agen_unit.cc
index 64f6d7544b55f83df178b62a93e535cd297ebf48..f978b2fa78816c67654a5f35c5a0ba41a6c5e8b7 100644 (file)
@@ -33,7 +33,7 @@
 #include "debug/InOrderAGEN.hh"
 
 AGENUnit::AGENUnit(std::string res_name, int res_id, int res_width,
-                   int res_latency, InOrderCPU *_cpu,
+                   Cycles res_latency, InOrderCPU *_cpu,
                    ThePipeline::Params *params)
     : Resource(res_name, res_id, res_width, res_latency, _cpu)
 { }
@@ -58,6 +58,15 @@ AGENUnit::execute(int slot_num)
 #endif
     InstSeqNum seq_num = inst->seqNum;
 
+    if (inst->fault != NoFault) {
+        DPRINTF(InOrderAGEN,
+                "[tid:%i]: [sn:%i]: Detected %s fault @ %x. Forwarding to "
+                "next stage.\n", tid, inst->seqNum, inst->fault->name(),
+                inst->pcState());
+        agen_req->done();
+        return;
+    }
+
     switch (agen_req->cmd)
     {
       case GenerateAddr: