minor updates

This commit is contained in:
Blaise Tine
2024-02-03 19:09:53 -08:00
parent f9cd8be19e
commit b0b7cd2b1e
9 changed files with 28 additions and 28 deletions

View File

@@ -54,9 +54,9 @@ More detailed build instructions can be found [here](docs/install_vortex.md).
$ git clone --recursive https://github.com/vortexgpgpu/vortex.git $ git clone --recursive https://github.com/vortexgpgpu/vortex.git
$ cd Vortex $ cd Vortex
### Install prebuilt toolchain ### Install prebuilt toolchain
By default, the toolchain will install to /opt folder. By default, the toolchain will install to /opt folder which requires sudo access.
You can install the toolchain to a different directory by overriding TOOLDIR (e.g. export TOOLDIR=$HOME/tools). You can install the toolchain to a different location of your choice by setting TOOLDIR (e.g. export TOOLDIR=$HOME/tools).
$ export TOOLDIR=/opt
$ ./ci/toolchain_install.sh --all $ ./ci/toolchain_install.sh --all
$ source ./ci/toolchain_env.sh $ source ./ci/toolchain_env.sh
### Build Vortex sources ### Build Vortex sources

View File

@@ -136,6 +136,18 @@
`endif `endif
`endif `endif
`ifdef L2_ENABLE
`define L2_LINE_SIZE `MEM_BLOCK_SIZE
`else
`define L2_LINE_SIZE `L1_LINE_SIZE
`endif
`ifdef L3_ENABLE
`define L3_LINE_SIZE `MEM_BLOCK_SIZE
`else
`define L3_LINE_SIZE `L2_LINE_SIZE
`endif
`ifdef XLEN_64 `ifdef XLEN_64
`ifndef STARTUP_ADDR `ifndef STARTUP_ADDR

View File

@@ -298,18 +298,6 @@
`define L1_ENABLE `define L1_ENABLE
`endif `endif
`ifdef L2_ENABLE
`define L2_LINE_SIZE `MEM_BLOCK_SIZE
`else
`define L2_LINE_SIZE `L1_LINE_SIZE
`endif
`ifdef L3_ENABLE
`define L3_LINE_SIZE `MEM_BLOCK_SIZE
`else
`define L3_LINE_SIZE `L2_LINE_SIZE
`endif
`define VX_MEM_BYTEEN_WIDTH `L3_LINE_SIZE `define VX_MEM_BYTEEN_WIDTH `L3_LINE_SIZE
`define VX_MEM_ADDR_WIDTH (`MEM_ADDR_WIDTH - `CLOG2(`L3_LINE_SIZE)) `define VX_MEM_ADDR_WIDTH (`MEM_ADDR_WIDTH - `CLOG2(`L3_LINE_SIZE))
`define VX_MEM_DATA_WIDTH (`L3_LINE_SIZE * 8) `define VX_MEM_DATA_WIDTH (`L3_LINE_SIZE * 8)

View File

@@ -62,10 +62,10 @@ Cluster::Cluster(const SimContext& ctx,
snprintf(sname, 100, "cluster%d-l2cache", cluster_id); snprintf(sname, 100, "cluster%d-l2cache", cluster_id);
l2cache_ = CacheSim::Create(sname, CacheSim::Config{ l2cache_ = CacheSim::Create(sname, CacheSim::Config{
!L2_ENABLED, !L2_ENABLED,
log2ceil(L2_CACHE_SIZE), // C log2ceil(L2_CACHE_SIZE),// C
log2ceil(MEM_BLOCK_SIZE), // L log2ceil(MEM_BLOCK_SIZE),// L
log2ceil(L2_NUM_WAYS), // W log2ceil(L1_LINE_SIZE), // W
0, // A log2ceil(L2_NUM_WAYS), // A
log2ceil(L2_NUM_BANKS), // B log2ceil(L2_NUM_BANKS), // B
XLEN, // address bits XLEN, // address bits
1, // number of ports 1, // number of ports

View File

@@ -210,7 +210,7 @@ void Core::schedule() {
void Core::fetch() { void Core::fetch() {
perf_stats_.ifetch_latency += pending_ifetches_; perf_stats_.ifetch_latency += pending_ifetches_;
// handle icache reponse // handle icache response
auto& icache_rsp_port = icache_rsp_ports.at(0); auto& icache_rsp_port = icache_rsp_ports.at(0);
if (!icache_rsp_port.empty()){ if (!icache_rsp_port.empty()){
auto& mem_rsp = icache_rsp_port.front(); auto& mem_rsp = icache_rsp_port.front();

View File

@@ -339,7 +339,7 @@ void Warp::execute(const Instr &instr, pipeline_trace_t *trace) {
break; break;
} }
case 1: { case 1: {
// RV64I: SLLI // RV32I: SLLI
rddata[t].i = rsdata[t][0].i << immsrc; rddata[t].i = rsdata[t][0].i << immsrc;
break; break;
} }
@@ -360,11 +360,11 @@ void Warp::execute(const Instr &instr, pipeline_trace_t *trace) {
} }
case 5: { case 5: {
if (func7) { if (func7) {
// RV64I: SRAI // RV32I: SRAI
Word result = rsdata[t][0].i >> immsrc; Word result = rsdata[t][0].i >> immsrc;
rddata[t].i = result; rddata[t].i = result;
} else { } else {
// RV64I: SRLI // RV32I: SRLI
Word result = rsdata[t][0].u >> immsrc; Word result = rsdata[t][0].u >> immsrc;
rddata[t].i = result; rddata[t].i = result;
} }

View File

@@ -34,7 +34,7 @@ static void show_usage() {
uint32_t num_threads = NUM_THREADS; uint32_t num_threads = NUM_THREADS;
uint32_t num_warps = NUM_WARPS; uint32_t num_warps = NUM_WARPS;
uint32_t num_cores = NUM_CORES; uint32_t num_cores = NUM_CORES;
bool showStats = false;; bool showStats = false;
bool riscv_test = false; bool riscv_test = false;
const char* program = nullptr; const char* program = nullptr;

View File

@@ -33,8 +33,8 @@ ProcessorImpl::ProcessorImpl(const Arch& arch)
!L3_ENABLED, !L3_ENABLED,
log2ceil(L3_CACHE_SIZE), // C log2ceil(L3_CACHE_SIZE), // C
log2ceil(MEM_BLOCK_SIZE), // L log2ceil(MEM_BLOCK_SIZE), // L
log2ceil(L3_NUM_WAYS), // W log2ceil(L2_LINE_SIZE), // W
0, // A log2ceil(L3_NUM_WAYS), // A
log2ceil(L3_NUM_BANKS), // B log2ceil(L3_NUM_BANKS), // B
XLEN, // address bits XLEN, // address bits
1, // number of ports 1, // number of ports
@@ -58,7 +58,7 @@ ProcessorImpl::ProcessorImpl(const Arch& arch)
l3cache_->CoreRspPorts.at(i).bind(&clusters_.at(i)->mem_rsp_port); l3cache_->CoreRspPorts.at(i).bind(&clusters_.at(i)->mem_rsp_port);
} }
// set up memory perf recording // set up memory profiling
memsim_->MemReqPort.tx_callback([&](const MemReq& req, uint64_t cycle){ memsim_->MemReqPort.tx_callback([&](const MemReq& req, uint64_t cycle){
__unused (cycle); __unused (cycle);
perf_mem_reads_ += !req.write; perf_mem_reads_ += !req.write;

View File

@@ -44,7 +44,7 @@ Socket::Socket(const SimContext& ctx,
XLEN, // address bits XLEN, // address bits
1, // number of ports 1, // number of ports
1, // number of inputs 1, // number of inputs
true, // write-through false, // write-through
false, // write response false, // write response
(uint8_t)arch.num_warps(), // mshr (uint8_t)arch.num_warps(), // mshr
2, // pipeline latency 2, // pipeline latency