fixes: texture unit mem access sometimes going to smem, bilinear texture filtering; new: cache req_id,
This commit is contained in:
@@ -5,11 +5,12 @@
|
||||
#include <iostream>
|
||||
#include <util.h>
|
||||
#include "types.h"
|
||||
#include "archdef.h"
|
||||
#include "debug.h"
|
||||
|
||||
namespace vortex {
|
||||
|
||||
struct pipeline_state_t {
|
||||
struct pipeline_trace_t {
|
||||
//--
|
||||
uint64_t id;
|
||||
|
||||
@@ -20,17 +21,24 @@ struct pipeline_state_t {
|
||||
Word PC;
|
||||
|
||||
//--
|
||||
bool stall_warp;
|
||||
bool fetch_stall;
|
||||
bool pipeline_stall;
|
||||
|
||||
//--
|
||||
bool wb;
|
||||
RegType rdest_type;
|
||||
int rdest;
|
||||
|
||||
//--
|
||||
RegMask used_iregs;
|
||||
RegMask used_fregs;
|
||||
RegMask used_vregs;
|
||||
|
||||
//-
|
||||
ExeType exe_type;
|
||||
std::vector<uint64_t> mem_addrs;
|
||||
|
||||
//--
|
||||
std::vector<std::vector<uint64_t>> mem_addrs;
|
||||
|
||||
//--
|
||||
union {
|
||||
@@ -51,27 +59,37 @@ struct pipeline_state_t {
|
||||
// stats
|
||||
uint64_t icache_latency;
|
||||
uint64_t dcache_latency;
|
||||
uint64_t tex_latency;
|
||||
|
||||
void clear() {
|
||||
pipeline_trace_t(uint64_t id_, const ArchDef& arch) {
|
||||
id = id_;
|
||||
cid = 0;
|
||||
wid = 0;
|
||||
tmask.reset();
|
||||
PC = 0;
|
||||
stall_warp = false;
|
||||
wb = false;
|
||||
PC = 0;
|
||||
fetch_stall = false;
|
||||
pipeline_stall = false;
|
||||
wb = false;
|
||||
rdest = 0;
|
||||
rdest_type = RegType::None;
|
||||
used_iregs.reset();
|
||||
used_fregs.reset();
|
||||
used_vregs.reset();
|
||||
exe_type = ExeType::NOP;
|
||||
mem_addrs.clear();
|
||||
mem_addrs.resize(arch.num_threads());
|
||||
icache_latency = 0;
|
||||
dcache_latency = 0;
|
||||
tex_latency = 0;
|
||||
}
|
||||
|
||||
bool check_stalled(bool stall) {
|
||||
bool old = pipeline_stall;
|
||||
pipeline_stall = stall;
|
||||
return stall ? old : true;
|
||||
}
|
||||
};
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const pipeline_state_t& state) {
|
||||
inline std::ostream &operator<<(std::ostream &os, const pipeline_trace_t& state) {
|
||||
os << "coreid=" << state.cid << ", wid=" << state.wid << ", PC=" << std::hex << state.PC;
|
||||
os << ", wb=" << state.wb;
|
||||
if (state.wb) {
|
||||
@@ -82,10 +100,9 @@ inline std::ostream &operator<<(std::ostream &os, const pipeline_state_t& state)
|
||||
return os;
|
||||
}
|
||||
|
||||
class PipelineStage : public Queue<pipeline_state_t> {
|
||||
class PipelineStage : public Queue<pipeline_trace_t*> {
|
||||
protected:
|
||||
const char* name_;
|
||||
friend std::ostream &operator<<(std::ostream &, const pipeline_state_t&);
|
||||
|
||||
public:
|
||||
PipelineStage(const char* name = nullptr)
|
||||
|
||||
Reference in New Issue
Block a user