minor fixes
This commit is contained in:
@@ -3,9 +3,13 @@
|
|||||||
# exit when any command fails
|
# exit when any command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
OS_DIR=ubuntu/bionic
|
OS_DIR=${OS_DIR:-'ubuntu/bionic'}
|
||||||
SRCDIR=/opt
|
SRCDIR=${SRCDIR:-'/opt'}
|
||||||
DESTDIR=.
|
DESTDIR=${DESTDIR:-'.'}
|
||||||
|
|
||||||
|
echo "OS_DIR=${OS_DIR}"
|
||||||
|
echo "SRCDIR=${SRCDIR}"
|
||||||
|
echo "DESTDIR=${DESTDIR}"
|
||||||
|
|
||||||
riscv()
|
riscv()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ OPAE_SYN_DIR=../../hw/syn/opae
|
|||||||
CXXFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wfatal-errors
|
CXXFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wfatal-errors
|
||||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||||
|
|
||||||
CXXFLAGS += -I../include -I../../hw -I$(OPAE_HOME)/include -I$(OPAE_SYN_DIR)
|
CXXFLAGS += -I. -I../include -I../../hw -I$(OPAE_HOME)/include -I$(OPAE_SYN_DIR)
|
||||||
|
|
||||||
LDFLAGS += -L$(OPAE_HOME)/lib -luuid -lopae-c-ase
|
LDFLAGS += -L$(OPAE_HOME)/lib -luuid -lopae-c-ase
|
||||||
|
|
||||||
@@ -35,8 +35,6 @@ LDFLAGS += -shared
|
|||||||
|
|
||||||
PROJECT = libvortex.so
|
PROJECT = libvortex.so
|
||||||
|
|
||||||
AFU_JSON_INFO = vortex_afu.h
|
|
||||||
|
|
||||||
SRCS = ../common/opae.cpp ../common/vx_utils.cpp
|
SRCS = ../common/opae.cpp ../common/vx_utils.cpp
|
||||||
|
|
||||||
# Enable scope analyzer
|
# Enable scope analyzer
|
||||||
@@ -69,7 +67,7 @@ $(PROJECT): $(SRCS) $(OPAE_SYN_DIR)/vortex_afu.h $(SCOPE_H)
|
|||||||
$(CXX) $(CXXFLAGS) -MM $(SRCS) > .depend;
|
$(CXX) $(CXXFLAGS) -MM $(SRCS) > .depend;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PROJECT) *.o .depend
|
rm -rf $(PROJECT) *.o .depend scope-defs.h
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include "vx_scope.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
@@ -7,17 +8,9 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
#ifdef USE_VLSIM
|
|
||||||
#include "vlsim/fpga.h"
|
|
||||||
#else
|
|
||||||
#include <opae/fpga.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <VX_config.h>
|
#include <VX_config.h>
|
||||||
#include "vx_scope.h"
|
#include <vortex_afu.h>
|
||||||
#include "vortex_afu.h"
|
#include <scope-defs.h>
|
||||||
#include "scope-defs.h"
|
|
||||||
|
|
||||||
#define FRAME_FLUSH_SIZE 100
|
#define FRAME_FLUSH_SIZE 100
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
#ifdef USE_VLSIM
|
||||||
|
#include <fpga.h>
|
||||||
|
#else
|
||||||
|
#include <opae/fpga.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(USE_FPGA)
|
#if defined(USE_FPGA)
|
||||||
#define HANG_TIMEOUT 60
|
#define HANG_TIMEOUT 60
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ OPAE_SYN_DIR=../../hw/syn/opae
|
|||||||
CXXFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wfatal-errors
|
CXXFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wfatal-errors
|
||||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||||
|
|
||||||
CXXFLAGS += -I../include -I../../hw -I$(OPAE_HOME)/include -I$(OPAE_SYN_DIR)
|
CXXFLAGS += -I. -I../include -I../../hw -I$(OPAE_HOME)/include -I$(OPAE_SYN_DIR)
|
||||||
|
|
||||||
LDFLAGS += -L$(OPAE_HOME)/lib -luuid -lopae-c
|
LDFLAGS += -L$(OPAE_HOME)/lib -luuid -lopae-c
|
||||||
|
|
||||||
@@ -37,8 +37,6 @@ LDFLAGS += -shared
|
|||||||
|
|
||||||
PROJECT = libvortex.so
|
PROJECT = libvortex.so
|
||||||
|
|
||||||
AFU_JSON_INFO = vortex_afu.h
|
|
||||||
|
|
||||||
SRCS = ../common/opae.cpp ../common/vx_utils.cpp
|
SRCS = ../common/opae.cpp ../common/vx_utils.cpp
|
||||||
|
|
||||||
# Enable scope analyzer
|
# Enable scope analyzer
|
||||||
@@ -71,7 +69,7 @@ $(PROJECT): $(SRCS) $(OPAE_SYN_DIR)/vortex_afu.h $(SCOPE_H)
|
|||||||
$(CXX) $(CXXFLAGS) -MM $(SRCS) > .depend;
|
$(CXX) $(CXXFLAGS) -MM $(SRCS) > .depend;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PROJECT) *.o .depend
|
rm -rf $(PROJECT) *.o .depend scope-defs.h
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ SCRIPT_DIR=../../hw/scripts
|
|||||||
CXXFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wfatal-errors
|
CXXFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wfatal-errors
|
||||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||||
|
|
||||||
CXXFLAGS += -I../include -I../../hw -I$(VLSIM_DIR)
|
CXXFLAGS += -I. -I../include -I../../hw -I$(VLSIM_DIR)
|
||||||
|
|
||||||
LDFLAGS += $(VLSIM_DIR)/libopae-c-vlsim.a
|
LDFLAGS += $(VLSIM_DIR)/libopae-c-vlsim.a
|
||||||
|
|
||||||
@@ -22,8 +22,6 @@ CXXFLAGS += -DDUMP_PERF_STATS
|
|||||||
|
|
||||||
LDFLAGS += -shared -pthread
|
LDFLAGS += -shared -pthread
|
||||||
|
|
||||||
AFU_JSON_INFO = vortex_afu.h
|
|
||||||
|
|
||||||
SRCS = ../common/opae.cpp ../common/vx_utils.cpp
|
SRCS = ../common/opae.cpp ../common/vx_utils.cpp
|
||||||
|
|
||||||
# Enable scope analyzer
|
# Enable scope analyzer
|
||||||
@@ -57,7 +55,7 @@ $(PROJECT): $(SRCS) $(SCOPE_H)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C $(VLSIM_DIR) clean-static
|
$(MAKE) -C $(VLSIM_DIR) clean-static
|
||||||
rm -rf $(PROJECT) *.o .depend
|
rm -rf $(PROJECT) *.o .depend scope-defs.h
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
@@ -100,9 +100,9 @@ module VX_gpu_unit #(
|
|||||||
|
|
||||||
`SCOPE_ASSIGN (gpu_rsp_valid, warp_ctl_if.valid);
|
`SCOPE_ASSIGN (gpu_rsp_valid, warp_ctl_if.valid);
|
||||||
`SCOPE_ASSIGN (gpu_rsp_wid, warp_ctl_if.wid);
|
`SCOPE_ASSIGN (gpu_rsp_wid, warp_ctl_if.wid);
|
||||||
`SCOPE_ASSIGN (gpu_rsp_tmc, warp_ctl_if.tmc);
|
`SCOPE_ASSIGN (gpu_rsp_tmc, warp_ctl_if.tmc.valid);
|
||||||
`SCOPE_ASSIGN (gpu_rsp_wspawn, warp_ctl_if.wspawn);
|
`SCOPE_ASSIGN (gpu_rsp_wspawn, warp_ctl_if.wspawn.valid);
|
||||||
`SCOPE_ASSIGN (gpu_rsp_split, warp_ctl_if.split);
|
`SCOPE_ASSIGN (gpu_rsp_split, warp_ctl_if.split.valid);
|
||||||
`SCOPE_ASSIGN (gpu_rsp_barrier, warp_ctl_if.barrier);
|
`SCOPE_ASSIGN (gpu_rsp_barrier, warp_ctl_if.barrier.valid);
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
@@ -160,10 +160,10 @@
|
|||||||
"afu/vortex/cluster/core/pipeline/execute/gpu_unit": {
|
"afu/vortex/cluster/core/pipeline/execute/gpu_unit": {
|
||||||
"?gpu_rsp_valid": 1,
|
"?gpu_rsp_valid": 1,
|
||||||
"gpu_rsp_wid": "`NW_BITS",
|
"gpu_rsp_wid": "`NW_BITS",
|
||||||
"gpu_rsp_tmc": "`GPU_TMC_BITS",
|
"gpu_rsp_tmc": 1,
|
||||||
"gpu_rsp_wspawn": "`GPU_WSPAWN_BITS",
|
"gpu_rsp_wspawn": 1,
|
||||||
"gpu_rsp_split": "`GPU_SPLIT_BITS",
|
"gpu_rsp_split": 1,
|
||||||
"gpu_rsp_barrier": "`GPU_BARRIER_BITS"
|
"gpu_rsp_barrier": 1
|
||||||
},
|
},
|
||||||
"afu/vortex/cluster/core/pipeline/execute/lsu_unit": {
|
"afu/vortex/cluster/core/pipeline/execute/lsu_unit": {
|
||||||
"?dcache_req_fire":"`NUM_THREADS",
|
"?dcache_req_fire":"`NUM_THREADS",
|
||||||
|
|||||||
@@ -398,6 +398,8 @@ def eval_node(text, params):
|
|||||||
try:
|
try:
|
||||||
__text = text.replace('$clog2', '__clog2')
|
__text = text.replace('$clog2', '__clog2')
|
||||||
__text = translate_ternary(__text)
|
__text = translate_ternary(__text)
|
||||||
|
__text = __text.replace('||', 'or')
|
||||||
|
__text = __text.replace('&&', 'and')
|
||||||
e = eval(__text, {'__clog2': clog2})
|
e = eval(__text, {'__clog2': clog2})
|
||||||
return e
|
return e
|
||||||
except (NameError, SyntaxError):
|
except (NameError, SyntaxError):
|
||||||
|
|||||||
@@ -63,13 +63,13 @@ qsub-sim
|
|||||||
make ase
|
make ase
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../driver/tests/basic/basic -n1 -t0
|
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/basic/basic -n1 -t0
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../driver/tests/basic/basic -n1 -t1
|
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/basic/basic -n1 -t1
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../driver/tests/basic/basic -n16
|
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/basic/basic -n16
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../driver/tests/demo/demo -n16
|
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/demo/demo -n16
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../driver/tests/dogfood/dogfood -n16
|
./run_ase.sh build_arria10_ase_1c ../../../tests/regression/dogfood/dogfood -n16
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../benchmarks/opencl/vecadd/vecadd
|
./run_ase.sh build_arria10_ase_1c ../../../tests/opencl/vecadd/vecadd
|
||||||
./run_ase.sh build_ase_arria10_1c ../../../benchmarks/opencl/sgemm/sgemm -n4
|
./run_ase.sh build_arria10_ase_1c ../../../tests/opencl/sgemm/sgemm -n4
|
||||||
|
|
||||||
# modify "vsim_run.tcl" to dump VCD trace
|
# modify "vsim_run.tcl" to dump VCD trace
|
||||||
vcd file trace.vcd
|
vcd file trace.vcd
|
||||||
@@ -82,7 +82,7 @@ tar -zcvf output_files_1c.tar.gz `find ./build_fpga_1c -type f \( -iname \*.rpt
|
|||||||
# compress log trace
|
# compress log trace
|
||||||
tar -zcvf run.log.tar.gz run.log
|
tar -zcvf run.log.tar.gz run.log
|
||||||
tar -cvjf trace.vcd.tar.bz2 trace.vcd run.log
|
tar -cvjf trace.vcd.tar.bz2 trace.vcd run.log
|
||||||
tar -cvjf trace.vcd.tar.bz2 build_ase_arria10_1c/work/run.log build_ase_arria10_1c/work/trace.vcd
|
tar -cvjf trace.vcd.tar.bz2 build_arria10_ase_1c/work/run.log build_arria10_ase_1c/work/trace.vcd
|
||||||
|
|
||||||
# decompress log trace
|
# decompress log trace
|
||||||
tar -zxvf vortex.vcd.tar.gz
|
tar -zxvf vortex.vcd.tar.gz
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
exclude_list="VX_fpu_fpnew.v"
|
exclude_list="VX_fpu_fpnew.sv"
|
||||||
macros=()
|
macros=()
|
||||||
includes=()
|
includes=()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user