added driver sim

This commit is contained in:
Blaise Tine
2020-03-16 08:02:23 -04:00
parent 36547821fc
commit c41855ee42
14 changed files with 1837 additions and 170 deletions

44
driver/sim/Makefile Normal file
View File

@@ -0,0 +1,44 @@
CXXFLAGS += -O2 -g -Wall -Wextra -pedantic -Wfatal-errors
CXXFLAGS += -I../sw
LDFLAGS += -L./obj_dir
DRV_CFLAGS += -O2 -g -Wall -Wextra -pedantic -Wfatal-errors
DRV_CFLAGS += -I../../sw
DRV_CFLAGS += -fPIC
DRV_LDFLAGS += -shared -pthread
DRV_SRCS = vx_driver.cpp ../../simX/args.cpp ../../simX/mem.cpp ../../simX/core.cpp ../../simX/instruction.cpp ../../simX/enc.cpp ../../simX/util.cpp
RTL_TOP = ../../simX/cache_simX.v
RTL_INCLUDE = -I../../rtl/shared_memory -I../../rtl/cache -I../../rtl/interfaces -Isimulate -I../../rtl
VL_FLAGS += -Wno-UNOPTFLAT -Wno-WIDTH
VL_FLAGS += --trace -DVL_DEBUG=1
PROJECT = libvxdrv_sim.so
all: $(PROJECT) test
$(PROJECT): $(SIMX_SRCS)
verilator --exe --cc $(RTL_TOP) $(RTL_INCLUDE) $(VL_FLAGS) $(DRV_SRCS) -CFLAGS '$(DRV_CFLAGS)' -LDFLAGS '$(DRV_LDFLAGS)' -o $(PROJECT)
make -j -C obj_dir -f Vcache_simX.mk OPT='-DVL_DEBUG' VL_DEBUG=1 DVL_DEBUG=1
test: $(PROJECT) test.o utils.o
$(CXX) $(CXXFLAGS) test.o utils.o $(LDFLAGS) -lvxdrv_sim -o $@
utils.o: ../sw/utils.cpp
$(CXX) $(CXXFLAGS) -c ../sw/utils.cpp -o $@
test.o: ../sw/test.cpp
$(CXX) $(CXXFLAGS) -c ../sw/test.cpp -o $@
clean:
rm -rf $(PROJECT) test *.so *.o obj_dir

767
driver/sim/valgrind.log Normal file
View File

@@ -0,0 +1,767 @@
==5409== Memcheck, a memory error detector
==5409== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==5409== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==5409== Command: ./test -f ../../benchmarks/opencl/vecadd/vecadd.hex
==5409==
==5409== error calling PR_SET_PTRACER, vgdb might block
Device ready...
Device running...
==5409==
==5409== Process terminating with default action of signal 2 (SIGINT)
==5409== at 0x58A19CE: nanosleep (nanosleep.c:28)
==5409== by 0x4EE34CA: void std::this_thread::sleep_for<long, std::ratio<1l, 1000l> >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&) (thread:373)
==5409== by 0x4EE2AF7: vx_device::wait(long long) (vx_driver.cpp:130)
==5409== by 0x4EE1DEE: vx_ready_wait (vx_driver.cpp:267)
==5409== by 0x1094CE: main (test.cpp:133)
==5409==
==5409== HEAP SUMMARY:
==5409== in use at exit: 3,165,230 bytes in 1,401 blocks
==5409== total heap usage: 8,550 allocs, 7,149 frees, 7,258,340 bytes allocated
==5409==
==5409== 4 bytes in 1 blocks are still reachable in loss record 1 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4EFC7FB: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:45)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409==
==5409== 8 bytes in 1 blocks are still reachable in loss record 2 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC5233: __gnu_cxx::new_allocator<unsigned long>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC2DA0: std::allocator_traits<std::allocator<unsigned long> >::allocate(std::allocator<unsigned long>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC0247: std::_Bvector_base<std::allocator<bool> >::_M_allocate(unsigned long) (stl_bvector.h:492)
==5409== by 0x4EBE39E: std::vector<bool, std::allocator<bool> >::_M_initialize(unsigned long) (stl_bvector.h:1094)
==5409== by 0x4EBEE5F: std::vector<bool, std::allocator<bool> >::vector(unsigned long, bool const&, std::allocator<bool> const&) (stl_bvector.h:597)
==5409== by 0x4EBD072: std::vector<bool, std::allocator<bool> >::vector(unsigned long, std::allocator<bool> const&) (stl_bvector.h:590)
==5409== by 0x4EB88EB: Harp::Core::getCacheDelays(Harp::trace_inst_t*) (core.cpp:224)
==5409== by 0x4EB9444: Harp::Core::fetch() (core.cpp:423)
==5409== by 0x4EB8843: Harp::Core::step() (core.cpp:205)
==5409== by 0x4EE2CD3: vx_device::run() (vx_driver.cpp:146)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409==
==5409== 24 bytes in 1 blocks are still reachable in loss record 3 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EF3D73: __gnu_cxx::new_allocator<_IO_FILE*>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EF2BAF: std::allocator_traits<std::allocator<_IO_FILE*> >::allocate(std::allocator<_IO_FILE*>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EF0D8F: std::_Vector_base<_IO_FILE*, std::allocator<_IO_FILE*> >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EEF66B: std::vector<_IO_FILE*, std::allocator<_IO_FILE*> >::_M_default_append(unsigned long) (vector.tcc:571)
==5409== by 0x4EEE3B4: std::vector<_IO_FILE*, std::allocator<_IO_FILE*> >::resize(unsigned long) (stl_vector.h:692)
==5409== by 0x4EEC826: VerilatedImp::VerilatedImp() (verilated_imp.h:204)
==5409== by 0x4EEC229: __static_initialization_and_destruction_0(int, int) (verilated.cpp:45)
==5409== by 0x4EEC25F: _GLOBAL__sub_I_verilated.cpp (verilated.cpp:1719)
==5409== by 0x4010732: call_init (dl-init.c:72)
==5409== by 0x4010732: _dl_init (dl-init.c:119)
==5409== by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5409== by 0x2: ???
==5409==
==5409== 24 bytes in 1 blocks are still reachable in loss record 4 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EE3802: std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> > std::thread::_S_make_state<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >(std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >&&) (thread:197)
==5409== by 0x4EE3037: std::thread::thread<void (&)(vx_device*), vx_device*>(void (&)(vx_device*), vx_device*&&) (thread:126)
==5409== by 0x4EE282A: vx_device::vx_device() (vx_driver.cpp:85)
==5409== by 0x4EE1AF8: vx_dev_open (vx_driver.cpp:189)
==5409== by 0x109458: main (test.cpp:118)
==5409==
==5409== 29 bytes in 1 blocks are still reachable in loss record 5 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F089D5: Vcache_simX_VX_dcache_request_inter::Vcache_simX_VX_dcache_request_inter(char const*) (Vcache_simX_VX_dcache_request_inter.cpp:15)
==5409== by 0x4F634EE: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 31 bytes in 1 blocks are still reachable in loss record 6 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F088F9: Vcache_simX_VX_dram_req_rsp_inter__N4_NB4::Vcache_simX_VX_dram_req_rsp_inter__N4_NB4(char const*) (Vcache_simX_VX_dram_req_rsp_inter__N4_NB4.cpp:15)
==5409== by 0x4F6351F: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 38 bytes in 1 blocks are still reachable in loss record 7 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F088F9: Vcache_simX_VX_dram_req_rsp_inter__N4_NB4::Vcache_simX_VX_dram_req_rsp_inter__N4_NB4(char const*) (Vcache_simX_VX_dram_req_rsp_inter__N4_NB4.cpp:15)
==5409== by 0x4F63550: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 8 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EF41DF: __gnu_cxx::new_allocator<unsigned int*>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EF3C59: std::allocator_traits<std::allocator<unsigned int*> >::allocate(std::allocator<unsigned int*>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EF29F1: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_M_allocate_map(unsigned long) (stl_deque.h:616)
==5409== by 0x4EF0A57: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_M_initialize_map(unsigned long) (stl_deque.h:689)
==5409== by 0x4EEF433: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_Deque_base() (stl_deque.h:492)
==5409== by 0x4EEE2D1: std::deque<unsigned int, std::allocator<unsigned int> >::deque() (stl_deque.h:888)
==5409== by 0x4EEC7F6: VerilatedImp::VerilatedImp() (verilated_imp.h:203)
==5409== by 0x4EEC229: __static_initialization_and_destruction_0(int, int) (verilated.cpp:45)
==5409== by 0x4EEC25F: _GLOBAL__sub_I_verilated.cpp (verilated.cpp:1719)
==5409== by 0x4010732: call_init (dl-init.c:72)
==5409== by 0x4010732: _dl_init (dl-init.c:119)
==5409== by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 9 of 54
==5409== at 0x4C3089F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EEAF1E: Verilated::catName(char const*, char const*) (verilated.cpp:1451)
==5409== by 0x4F63576: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 10 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F1C58B: Vcache_simX_VX_Cache_Bank__pi8::Vcache_simX_VX_Cache_Bank__pi8(char const*) (Vcache_simX_VX_Cache_Bank__pi8.cpp:15)
==5409== by 0x4F63581: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 11 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F1C58B: Vcache_simX_VX_Cache_Bank__pi8::Vcache_simX_VX_Cache_Bank__pi8(char const*) (Vcache_simX_VX_Cache_Bank__pi8.cpp:15)
==5409== by 0x4F635B2: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 12 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F1C58B: Vcache_simX_VX_Cache_Bank__pi8::Vcache_simX_VX_Cache_Bank__pi8(char const*) (Vcache_simX_VX_Cache_Bank__pi8.cpp:15)
==5409== by 0x4F635E3: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 13 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F1C58B: Vcache_simX_VX_Cache_Bank__pi8::Vcache_simX_VX_Cache_Bank__pi8(char const*) (Vcache_simX_VX_Cache_Bank__pi8.cpp:15)
==5409== by 0x4F63614: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 14 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F08AC5: Vcache_simX_VX_Cache_Bank__pi9::Vcache_simX_VX_Cache_Bank__pi9(char const*) (Vcache_simX_VX_Cache_Bank__pi9.cpp:15)
==5409== by 0x4F63645: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 15 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F08AC5: Vcache_simX_VX_Cache_Bank__pi9::Vcache_simX_VX_Cache_Bank__pi9(char const*) (Vcache_simX_VX_Cache_Bank__pi9.cpp:15)
==5409== by 0x4F63676: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 16 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F08AC5: Vcache_simX_VX_Cache_Bank__pi9::Vcache_simX_VX_Cache_Bank__pi9(char const*) (Vcache_simX_VX_Cache_Bank__pi9.cpp:15)
==5409== by 0x4F636A7: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 64 bytes in 1 blocks are still reachable in loss record 17 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x585A9B9: strdup (strdup.c:42)
==5409== by 0x4EEB465: VerilatedModule::VerilatedModule(char const*) (verilated.cpp:1566)
==5409== by 0x4F08AC5: Vcache_simX_VX_Cache_Bank__pi9::Vcache_simX_VX_Cache_Bank__pi9(char const*) (Vcache_simX_VX_Cache_Bank__pi9.cpp:15)
==5409== by 0x4F636D8: Vcache_simX__Syms::Vcache_simX__Syms(Vcache_simX*, char const*) (Vcache_simX__Syms.cpp:28)
==5409== by 0x4EFC82E: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 18 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EB80C5: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:125)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409== by 0x5F536DA: start_thread (pthread_create.c:463)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 19 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EB8267: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:126)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409== by 0x5F536DA: start_thread (pthread_create.c:463)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 20 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EBA7E0: Harp::Core::writeback() (core.cpp:648)
==5409== by 0x4EB8807: Harp::Core::step() (core.cpp:195)
==5409== by 0x4EE2CD3: vx_device::run() (vx_driver.cpp:146)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 21 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EBA5DB: Harp::Core::execute_unit() (core.cpp:611)
==5409== by 0x4EB881F: Harp::Core::step() (core.cpp:199)
==5409== by 0x4EE2CD3: vx_device::run() (vx_driver.cpp:146)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 22 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EB9BB8: Harp::Core::scheduler() (core.cpp:491)
==5409== by 0x4EB882B: Harp::Core::step() (core.cpp:201)
==5409== by 0x4EE2CD3: vx_device::run() (vx_driver.cpp:146)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 23 of 54
==5409== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EB9305: Harp::Core::fetch() (core.cpp:413)
==5409== by 0x4EB8843: Harp::Core::step() (core.cpp:205)
==5409== by 0x4EE2CD3: vx_device::run() (vx_driver.cpp:146)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409==
==5409== 128 bytes in 1 blocks are still reachable in loss record 24 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6CEB: __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5902: std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3A6D: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC0DD0: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4EBEF2A: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_base(unsigned long, std::allocator<unsigned int> const&) (stl_vector.h:138)
==5409== by 0x4EBD0ED: std::vector<unsigned int, std::allocator<unsigned int> >::vector(unsigned long, std::allocator<unsigned int> const&) (stl_vector.h:284)
==5409== by 0x4EB892E: Harp::Core::getCacheDelays(Harp::trace_inst_t*) (core.cpp:225)
==5409== by 0x4EB9444: Harp::Core::fetch() (core.cpp:423)
==5409== by 0x4EB8843: Harp::Core::step() (core.cpp:205)
==5409== by 0x4EE2CD3: vx_device::run() (vx_driver.cpp:146)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409==
==5409== 128 bytes in 16 blocks are still reachable in loss record 25 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC5233: __gnu_cxx::new_allocator<unsigned long>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC2DA0: std::allocator_traits<std::allocator<unsigned long> >::allocate(std::allocator<unsigned long>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC0247: std::_Bvector_base<std::allocator<bool> >::_M_allocate(unsigned long) (stl_bvector.h:492)
==5409== by 0x4EBE097: std::vector<bool, std::allocator<bool> >::_M_insert_aux(std::_Bit_iterator, bool) (vector.tcc:807)
==5409== by 0x4EBCB31: std::vector<bool, std::allocator<bool> >::push_back(bool) (stl_bvector.h:928)
==5409== by 0x4EBB575: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:756)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409==
==5409== 128 bytes in 16 blocks are still reachable in loss record 26 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC5233: __gnu_cxx::new_allocator<unsigned long>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC2DA0: std::allocator_traits<std::allocator<unsigned long> >::allocate(std::allocator<unsigned long>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC0247: std::_Bvector_base<std::allocator<bool> >::_M_allocate(unsigned long) (stl_bvector.h:492)
==5409== by 0x4EBE097: std::vector<bool, std::allocator<bool> >::_M_insert_aux(std::_Bit_iterator, bool) (vector.tcc:807)
==5409== by 0x4EBCB31: std::vector<bool, std::allocator<bool> >::push_back(bool) (stl_bvector.h:928)
==5409== by 0x4EBB58E: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:757)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409==
==5409== 128 bytes in 16 blocks are still reachable in loss record 27 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC5233: __gnu_cxx::new_allocator<unsigned long>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC2DA0: std::allocator_traits<std::allocator<unsigned long> >::allocate(std::allocator<unsigned long>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC0247: std::_Bvector_base<std::allocator<bool> >::_M_allocate(unsigned long) (stl_bvector.h:492)
==5409== by 0x4EBE39E: std::vector<bool, std::allocator<bool> >::_M_initialize(unsigned long) (stl_bvector.h:1094)
==5409== by 0x4EBCBE7: std::vector<bool, std::allocator<bool> >::vector(std::vector<bool, std::allocator<bool> > const&) (stl_bvector.h:616)
==5409== by 0x4EC892B: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409== by 0x4EC58A8: Harp::Warp* std::__uninitialized_copy_a<Harp::Warp const*, Harp::Warp*, Harp::Warp>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:289)
==5409== by 0x4EC39F0: Harp::Warp* std::__uninitialized_move_if_noexcept_a<Harp::Warp*, Harp::Warp*, std::allocator<Harp::Warp> >(Harp::Warp*, Harp::Warp*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:312)
==5409==
==5409== 128 bytes in 16 blocks are still reachable in loss record 28 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC5233: __gnu_cxx::new_allocator<unsigned long>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC2DA0: std::allocator_traits<std::allocator<unsigned long> >::allocate(std::allocator<unsigned long>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC0247: std::_Bvector_base<std::allocator<bool> >::_M_allocate(unsigned long) (stl_bvector.h:492)
==5409== by 0x4EBE39E: std::vector<bool, std::allocator<bool> >::_M_initialize(unsigned long) (stl_bvector.h:1094)
==5409== by 0x4EBCBE7: std::vector<bool, std::allocator<bool> >::vector(std::vector<bool, std::allocator<bool> > const&) (stl_bvector.h:616)
==5409== by 0x4EC894B: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409== by 0x4EC58A8: Harp::Warp* std::__uninitialized_copy_a<Harp::Warp const*, Harp::Warp*, Harp::Warp>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:289)
==5409== by 0x4EC39F0: Harp::Warp* std::__uninitialized_move_if_noexcept_a<Harp::Warp*, Harp::Warp*, std::allocator<Harp::Warp> >(Harp::Warp*, Harp::Warp*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:312)
==5409==
==5409== 288 bytes in 1 blocks are possibly lost in loss record 29 of 54
==5409== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x40134A6: allocate_dtv (dl-tls.c:286)
==5409== by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)
==5409== by 0x5F54227: allocate_stack (allocatestack.c:627)
==5409== by 0x5F54227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)
==5409== by 0x52D9924: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409== by 0x4EE304E: std::thread::thread<void (&)(vx_device*), vx_device*>(void (&)(vx_device*), vx_device*&&) (thread:126)
==5409== by 0x4EE282A: vx_device::vx_device() (vx_driver.cpp:85)
==5409== by 0x4EE1AF8: vx_dev_open (vx_driver.cpp:189)
==5409== by 0x109458: main (test.cpp:118)
==5409==
==5409== 512 bytes in 1 blocks are still reachable in loss record 30 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6CEB: __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5902: std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EF2137: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_M_allocate_node() (stl_deque.h:602)
==5409== by 0x4EF2A6E: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_M_create_nodes(unsigned int**, unsigned int**) (stl_deque.h:727)
==5409== by 0x4EF0AB0: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_M_initialize_map(unsigned long) (stl_deque.h:701)
==5409== by 0x4EEF433: std::_Deque_base<unsigned int, std::allocator<unsigned int> >::_Deque_base() (stl_deque.h:492)
==5409== by 0x4EEE2D1: std::deque<unsigned int, std::allocator<unsigned int> >::deque() (stl_deque.h:888)
==5409== by 0x4EEC7F6: VerilatedImp::VerilatedImp() (verilated_imp.h:203)
==5409== by 0x4EEC229: __static_initialization_and_destruction_0(int, int) (verilated.cpp:45)
==5409== by 0x4EEC25F: _GLOBAL__sub_I_verilated.cpp (verilated.cpp:1719)
==5409== by 0x4010732: call_init (dl-init.c:72)
==5409== by 0x4010732: _dl_init (dl-init.c:119)
==5409==
==5409== 1,008 bytes in 18 blocks are still reachable in loss record 31 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC920B: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC8256: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC735C: std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_get_node() (stl_tree.h:588)
==5409== by 0x4EC63EB: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_create_node<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) (stl_tree.h:642)
==5409== by 0x4EC509A: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node::operator()<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) const (stl_tree.h:556)
==5409== by 0x4EC2A93: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:1753)
==5409== by 0x4EBFEDD: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_const_iterator<std::pair<int const, Harp::InstTableEntry_t> >, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:2206)
==5409== by 0x4EBDDE4: void std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique<std::pair<int const, Harp::InstTableEntry_t> const*>(std::pair<int const, Harp::InstTableEntry_t> const*, std::pair<int const, Harp::InstTableEntry_t> const*) (stl_tree.h:2452)
==5409== by 0x4EBC881: std::map<int, Harp::InstTableEntry_t, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::map(std::initializer_list<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int> const&, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > const&) (stl_map.h:224)
==5409== by 0x4EBBDC0: __static_initialization_and_destruction_0(int, int) (instruction.h:49)
==5409== by 0x4EBBE37: _GLOBAL__sub_I_core.cpp (core.cpp:871)
==5409==
==5409== 1,008 bytes in 18 blocks are still reachable in loss record 32 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC920B: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC8256: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC735C: std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_get_node() (stl_tree.h:588)
==5409== by 0x4EC63EB: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_create_node<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) (stl_tree.h:642)
==5409== by 0x4EC509A: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node::operator()<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) const (stl_tree.h:556)
==5409== by 0x4EC2A93: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:1753)
==5409== by 0x4EBFEDD: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_const_iterator<std::pair<int const, Harp::InstTableEntry_t> >, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:2206)
==5409== by 0x4EBDDE4: void std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique<std::pair<int const, Harp::InstTableEntry_t> const*>(std::pair<int const, Harp::InstTableEntry_t> const*, std::pair<int const, Harp::InstTableEntry_t> const*) (stl_tree.h:2452)
==5409== by 0x4EBC881: std::map<int, Harp::InstTableEntry_t, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::map(std::initializer_list<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int> const&, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > const&) (stl_map.h:224)
==5409== by 0x4ECE691: __static_initialization_and_destruction_0(int, int) (instruction.h:49)
==5409== by 0x4ECE708: _GLOBAL__sub_I_enc.cpp (enc.cpp:330)
==5409==
==5409== 1,008 bytes in 18 blocks are still reachable in loss record 33 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC920B: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC8256: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC735C: std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_get_node() (stl_tree.h:588)
==5409== by 0x4EC63EB: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_create_node<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) (stl_tree.h:642)
==5409== by 0x4EC509A: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node::operator()<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) const (stl_tree.h:556)
==5409== by 0x4EC2A93: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:1753)
==5409== by 0x4EBFEDD: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_const_iterator<std::pair<int const, Harp::InstTableEntry_t> >, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:2206)
==5409== by 0x4EBDDE4: void std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique<std::pair<int const, Harp::InstTableEntry_t> const*>(std::pair<int const, Harp::InstTableEntry_t> const*, std::pair<int const, Harp::InstTableEntry_t> const*) (stl_tree.h:2452)
==5409== by 0x4EBC881: std::map<int, Harp::InstTableEntry_t, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::map(std::initializer_list<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int> const&, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > const&) (stl_map.h:224)
==5409== by 0x4EDAF5C: __static_initialization_and_destruction_0(int, int) (instruction.h:49)
==5409== by 0x4EDAFD3: _GLOBAL__sub_I_instruction.cpp (instruction.cpp:2462)
==5409==
==5409== 1,008 bytes in 18 blocks are still reachable in loss record 34 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC920B: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC8256: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC735C: std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_get_node() (stl_tree.h:588)
==5409== by 0x4EC63EB: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_create_node<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) (stl_tree.h:642)
==5409== by 0x4EC509A: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node::operator()<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) const (stl_tree.h:556)
==5409== by 0x4EC2A93: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:1753)
==5409== by 0x4EBFEDD: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_const_iterator<std::pair<int const, Harp::InstTableEntry_t> >, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:2206)
==5409== by 0x4EBDDE4: void std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique<std::pair<int const, Harp::InstTableEntry_t> const*>(std::pair<int const, Harp::InstTableEntry_t> const*, std::pair<int const, Harp::InstTableEntry_t> const*) (stl_tree.h:2452)
==5409== by 0x4EBC881: std::map<int, Harp::InstTableEntry_t, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::map(std::initializer_list<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int> const&, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > const&) (stl_map.h:224)
==5409== by 0x4EDF494: __static_initialization_and_destruction_0(int, int) (instruction.h:49)
==5409== by 0x4EDF50B: _GLOBAL__sub_I_mem.cpp (mem.cpp:401)
==5409==
==5409== 1,008 bytes in 18 blocks are still reachable in loss record 35 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC920B: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC8256: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC735C: std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_get_node() (stl_tree.h:588)
==5409== by 0x4EC63EB: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_create_node<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) (stl_tree.h:642)
==5409== by 0x4EC509A: std::_Rb_tree_node<std::pair<int const, Harp::InstTableEntry_t> >* std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node::operator()<std::pair<int const, Harp::InstTableEntry_t> const&>(std::pair<int const, Harp::InstTableEntry_t> const&) const (stl_tree.h:556)
==5409== by 0x4EC2A93: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:1753)
==5409== by 0x4EBFEDD: std::_Rb_tree_iterator<std::pair<int const, Harp::InstTableEntry_t> > std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique_<std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node>(std::_Rb_tree_const_iterator<std::pair<int const, Harp::InstTableEntry_t> >, std::pair<int const, Harp::InstTableEntry_t> const&, std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_Alloc_node&) (stl_tree.h:2206)
==5409== by 0x4EBDDE4: void std::_Rb_tree<int, std::pair<int const, Harp::InstTableEntry_t>, std::_Select1st<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::_M_insert_unique<std::pair<int const, Harp::InstTableEntry_t> const*>(std::pair<int const, Harp::InstTableEntry_t> const*, std::pair<int const, Harp::InstTableEntry_t> const*) (stl_tree.h:2452)
==5409== by 0x4EBC881: std::map<int, Harp::InstTableEntry_t, std::less<int>, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > >::map(std::initializer_list<std::pair<int const, Harp::InstTableEntry_t> >, std::less<int> const&, std::allocator<std::pair<int const, Harp::InstTableEntry_t> > const&) (stl_map.h:224)
==5409== by 0x4EE1E91: __static_initialization_and_destruction_0(int, int) (instruction.h:49)
==5409== by 0x4EE1F08: _GLOBAL__sub_I_vx_driver.cpp (vx_driver.cpp:268)
==5409==
==5409== 1,024 bytes in 16 blocks are still reachable in loss record 36 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC7BFB: __gnu_cxx::new_allocator<Harp::DomStackEntry*>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC6E48: std::allocator_traits<std::allocator<Harp::DomStackEntry*> >::allocate(std::allocator<Harp::DomStackEntry*>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC5B07: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_allocate_map(unsigned long) (stl_deque.h:616)
==5409== by 0x4EC3CB7: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_initialize_map(unsigned long) (stl_deque.h:689)
==5409== by 0x4EC1081: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_Deque_base() (stl_deque.h:492)
==5409== by 0x4EBF155: std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::deque() (stl_deque.h:888)
==5409== by 0x4EBD38F: std::stack<Harp::DomStackEntry, std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > >::stack<std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >, void>() (stl_stack.h:149)
==5409== by 0x4EBB26C: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:738)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409==
==5409== 1,024 bytes in 16 blocks are still reachable in loss record 37 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC7BFB: __gnu_cxx::new_allocator<Harp::DomStackEntry*>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC6E48: std::allocator_traits<std::allocator<Harp::DomStackEntry*> >::allocate(std::allocator<Harp::DomStackEntry*>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC5B07: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_allocate_map(unsigned long) (stl_deque.h:616)
==5409== by 0x4EC3CB7: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_initialize_map(unsigned long) (stl_deque.h:689)
==5409== by 0x4ECA61A: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_Deque_base(std::allocator<Harp::DomStackEntry> const&, unsigned long) (stl_deque.h:500)
==5409== by 0x4EC9A0A: std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::deque(std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > const&) (stl_deque.h:949)
==5409== by 0x4EC8842: std::stack<Harp::DomStackEntry, std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > >::stack(std::stack<Harp::DomStackEntry, std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > > const&) (stl_stack.h:99)
==5409== by 0x4EC896B: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409==
==5409== 2,048 bytes in 16 blocks are still reachable in loss record 38 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6CEB: __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5902: std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3A6D: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC0DD0: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4EBEF2A: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_base(unsigned long, std::allocator<unsigned int> const&) (stl_vector.h:138)
==5409== by 0x4EBD0ED: std::vector<unsigned int, std::allocator<unsigned int> >::vector(unsigned long, std::allocator<unsigned int> const&) (stl_vector.h:284)
==5409== by 0x4EBB2AE: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:738)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409==
==5409== 2,048 bytes in 16 blocks are still reachable in loss record 39 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6CEB: __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5902: std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3A6D: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC0DD0: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4EBEF2A: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_base(unsigned long, std::allocator<unsigned int> const&) (stl_vector.h:138)
==5409== by 0x4EC9B62: std::vector<unsigned int, std::allocator<unsigned int> >::vector(std::vector<unsigned int, std::allocator<unsigned int> > const&) (stl_vector.h:328)
==5409== by 0x4EC898B: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409== by 0x4EC58A8: Harp::Warp* std::__uninitialized_copy_a<Harp::Warp const*, Harp::Warp*, Harp::Warp>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:289)
==5409==
==5409== 7,680 bytes in 16 blocks are still reachable in loss record 40 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC8CB2: __gnu_cxx::new_allocator<Harp::DomStackEntry>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC7C25: std::allocator_traits<std::allocator<Harp::DomStackEntry> >::allocate(std::allocator<Harp::DomStackEntry>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC6E73: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_allocate_node() (stl_deque.h:602)
==5409== by 0x4EC5B84: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_create_nodes(Harp::DomStackEntry**, Harp::DomStackEntry**) (stl_deque.h:727)
==5409== by 0x4EC3D10: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_initialize_map(unsigned long) (stl_deque.h:701)
==5409== by 0x4EC1081: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_Deque_base() (stl_deque.h:492)
==5409== by 0x4EBF155: std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::deque() (stl_deque.h:888)
==5409== by 0x4EBD38F: std::stack<Harp::DomStackEntry, std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > >::stack<std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >, void>() (stl_stack.h:149)
==5409== by 0x4EBB26C: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:738)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409==
==5409== 7,680 bytes in 16 blocks are still reachable in loss record 41 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC8CB2: __gnu_cxx::new_allocator<Harp::DomStackEntry>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC7C25: std::allocator_traits<std::allocator<Harp::DomStackEntry> >::allocate(std::allocator<Harp::DomStackEntry>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC6E73: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_allocate_node() (stl_deque.h:602)
==5409== by 0x4EC5B84: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_create_nodes(Harp::DomStackEntry**, Harp::DomStackEntry**) (stl_deque.h:727)
==5409== by 0x4EC3D10: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_M_initialize_map(unsigned long) (stl_deque.h:701)
==5409== by 0x4ECA61A: std::_Deque_base<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::_Deque_base(std::allocator<Harp::DomStackEntry> const&, unsigned long) (stl_deque.h:500)
==5409== by 0x4EC9A0A: std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> >::deque(std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > const&) (stl_deque.h:949)
==5409== by 0x4EC8842: std::stack<Harp::DomStackEntry, std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > >::stack(std::stack<Harp::DomStackEntry, std::deque<Harp::DomStackEntry, std::allocator<Harp::DomStackEntry> > > const&) (stl_stack.h:99)
==5409== by 0x4EC896B: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409==
==5409== 9,088 bytes in 1 blocks are still reachable in loss record 42 of 54
==5409== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x52AF34C: operator new(unsigned long, std::align_val_t) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409== by 0x4EB8577: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409== by 0x52D966E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409==
==5409== 12,288 bytes in 16 blocks are still reachable in loss record 43 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6D6E: __gnu_cxx::new_allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC599A: std::allocator_traits<std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::allocate(std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3B0B: std::_Vector_base<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC1317: void std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::_M_realloc_insert<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >(__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >&&) (vector.tcc:406)
==5409== by 0x4EBF385: void std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::emplace_back<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >(std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >&&) (vector.tcc:105)
==5409== by 0x4EBD4C9: std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::push_back(std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >&&) (stl_vector.h:954)
==5409== by 0x4EBB406: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:744)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409==
==5409== 12,288 bytes in 16 blocks are still reachable in loss record 44 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6DE6: __gnu_cxx::new_allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5A18: std::allocator_traits<std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::allocate(std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3B8D: std::_Vector_base<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC1A9F: void std::vector<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::_M_realloc_insert<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > >(__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >*, std::vector<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > > >, std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >&&) (vector.tcc:406)
==5409== by 0x4EBF645: void std::vector<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::emplace_back<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > >(std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >&&) (vector.tcc:105)
==5409== by 0x4EBD681: std::vector<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::push_back(std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >&&) (stl_vector.h:954)
==5409== by 0x4EBB4C6: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:749)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409==
==5409== 12,288 bytes in 16 blocks are still reachable in loss record 45 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6D6E: __gnu_cxx::new_allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC599A: std::allocator_traits<std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::allocate(std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3B0B: std::_Vector_base<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC0EDA: std::_Vector_base<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4EBF000: std::_Vector_base<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::_Vector_base(unsigned long, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > const&) (stl_vector.h:138)
==5409== by 0x4EC96B8: std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::vector(std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > const&) (stl_vector.h:328)
==5409== by 0x4EC88DA: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409== by 0x4EC58A8: Harp::Warp* std::__uninitialized_copy_a<Harp::Warp const*, Harp::Warp*, Harp::Warp>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:289)
==5409==
==5409== 12,288 bytes in 16 blocks are still reachable in loss record 46 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6DE6: __gnu_cxx::new_allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5A18: std::allocator_traits<std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::allocate(std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3B8D: std::_Vector_base<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC0FB0: std::_Vector_base<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4EBF0BA: std::_Vector_base<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::_Vector_base(unsigned long, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > const&) (stl_vector.h:138)
==5409== by 0x4EC97CE: std::vector<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > >::vector(std::vector<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > >, std::allocator<std::vector<Harp::Reg<bool>, std::allocator<Harp::Reg<bool> > > > > const&) (stl_vector.h:328)
==5409== by 0x4EC88F5: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409== by 0x4EC58A8: Harp::Warp* std::__uninitialized_copy_a<Harp::Warp const*, Harp::Warp*, Harp::Warp>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:289)
==5409==
==5409== 14,080 bytes in 1 blocks are still reachable in loss record 47 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6C78: __gnu_cxx::new_allocator<Harp::Warp>::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5869: std::allocator_traits<std::allocator<Harp::Warp> >::allocate(std::allocator<Harp::Warp>&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC398B: std::_Vector_base<Harp::Warp, std::allocator<Harp::Warp> >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC0B51: void std::vector<Harp::Warp, std::allocator<Harp::Warp> >::_M_realloc_insert<Harp::Warp>(__gnu_cxx::__normal_iterator<Harp::Warp*, std::vector<Harp::Warp, std::allocator<Harp::Warp> > >, Harp::Warp&&) (vector.tcc:406)
==5409== by 0x4EBEDF0: void std::vector<Harp::Warp, std::allocator<Harp::Warp> >::emplace_back<Harp::Warp>(Harp::Warp&&) (vector.tcc:105)
==5409== by 0x4EBCFD3: std::vector<Harp::Warp, std::allocator<Harp::Warp> >::push_back(Harp::Warp&&) (stl_vector.h:954)
==5409== by 0x4EB8670: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409==
==5409== 15,872 bytes in 1 blocks are still reachable in loss record 48 of 54
==5409== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x52AF34C: operator new(unsigned long, std::align_val_t) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==5409== by 0x4EFC819: Vcache_simX::Vcache_simX(char const*) (Vcache_simX.cpp:46)
==5409== by 0x4EB8589: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:140)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409== by 0x4EE37C0: void std::__invoke_impl<void, void (*)(vx_device*), vx_device*>(std::__invoke_other, void (*&&)(vx_device*), vx_device*&&) (invoke.h:60)
==5409== by 0x4EE2F96: std::__invoke_result<void (*)(vx_device*), vx_device*>::type std::__invoke<void (*)(vx_device*), vx_device*>(void (*&&)(vx_device*), vx_device*&&) (invoke.h:95)
==5409== by 0x4EE3D2E: decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (thread:234)
==5409== by 0x4EE3CCF: std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> >::operator()() (thread:243)
==5409== by 0x4EE3C9F: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(vx_device*), vx_device*> > >::_M_run() (thread:186)
==5409==
==5409== 32,832 bytes in 1 blocks are still reachable in loss record 49 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EE1AED: vx_dev_open (vx_driver.cpp:189)
==5409== by 0x109458: main (test.cpp:118)
==5409==
==5409== 196,608 bytes in 512 blocks are still reachable in loss record 50 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6ECE: __gnu_cxx::new_allocator<Harp::Reg<unsigned int> >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5C76: std::allocator_traits<std::allocator<Harp::Reg<unsigned int> > >::allocate(std::allocator<Harp::Reg<unsigned int> >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3E6B: std::_Vector_base<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC1641: void std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::_M_realloc_insert<Harp::Reg<unsigned int> >(__gnu_cxx::__normal_iterator<Harp::Reg<unsigned int>*, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >, Harp::Reg<unsigned int>&&) (vector.tcc:406)
==5409== by 0x4EBF42D: void std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::emplace_back<Harp::Reg<unsigned int> >(Harp::Reg<unsigned int>&&) (vector.tcc:105)
==5409== by 0x4EBD563: std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::push_back(Harp::Reg<unsigned int>&&) (stl_vector.h:954)
==5409== by 0x4EBB488: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:746)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409==
==5409== 196,608 bytes in 512 blocks are still reachable in loss record 51 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC6ECE: __gnu_cxx::new_allocator<Harp::Reg<unsigned int> >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC5C76: std::allocator_traits<std::allocator<Harp::Reg<unsigned int> > >::allocate(std::allocator<Harp::Reg<unsigned int> >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC3E6B: std::_Vector_base<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC1150: std::_Vector_base<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4EBF1E4: std::_Vector_base<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::_Vector_base(unsigned long, std::allocator<Harp::Reg<unsigned int> > const&) (stl_vector.h:138)
==5409== by 0x4ECBF16: std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >::vector(std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const&) (stl_vector.h:328)
==5409== by 0x4ECB8CC: void std::_Construct<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const&>(std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const&) (stl_construct.h:75)
==5409== by 0x4ECB378: std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >* std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*>(__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, __gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*) (stl_uninitialized.h:83)
==5409== by 0x4ECACF7: std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >* std::uninitialized_copy<__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*>(__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, __gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*) (stl_uninitialized.h:134)
==5409== by 0x4ECA2BC: std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >(__gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, __gnu_cxx::__normal_iterator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > const*, std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > >, std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >*, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > >&) (stl_uninitialized.h:289)
==5409== by 0x4EC9706: std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > >::vector(std::vector<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > >, std::allocator<std::vector<Harp::Reg<unsigned int>, std::allocator<Harp::Reg<unsigned int> > > > > const&) (stl_vector.h:331)
==5409==
==5409== 786,432 bytes in 16 blocks are still reachable in loss record 52 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC7272: __gnu_cxx::new_allocator<Harp::Reg<unsigned short> >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC61E6: std::allocator_traits<std::allocator<Harp::Reg<unsigned short> > >::allocate(std::allocator<Harp::Reg<unsigned short> >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC4BA9: std::_Vector_base<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4EC20F3: void std::vector<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::_M_realloc_insert<Harp::Reg<unsigned short> >(__gnu_cxx::__normal_iterator<Harp::Reg<unsigned short>*, std::vector<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > > >, Harp::Reg<unsigned short>&&) (vector.tcc:406)
==5409== by 0x4EBF795: void std::vector<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::emplace_back<Harp::Reg<unsigned short> >(Harp::Reg<unsigned short>&&) (vector.tcc:105)
==5409== by 0x4EBD785: std::vector<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::push_back(Harp::Reg<unsigned short>&&) (stl_vector.h:954)
==5409== by 0x4EBB5DF: Harp::Warp::Warp(Harp::Core*, unsigned int) (core.cpp:763)
==5409== by 0x4EB865E: Harp::Core::Core(Harp::ArchDef const&, Harp::Decoder&, Harp::MemoryUnit&, unsigned int) (core.cpp:158)
==5409== by 0x4EE2C64: vx_device::run() (vx_driver.cpp:141)
==5409== by 0x4EE2E31: vx_device::thread_proc() (vx_driver.cpp:163)
==5409== by 0x4EE2EA9: vx_device::__thread_proc__(vx_device*) (vx_driver.cpp:175)
==5409==
==5409== 786,432 bytes in 16 blocks are still reachable in loss record 53 of 54
==5409== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EC7272: __gnu_cxx::new_allocator<Harp::Reg<unsigned short> >::allocate(unsigned long, void const*) (new_allocator.h:111)
==5409== by 0x4EC61E6: std::allocator_traits<std::allocator<Harp::Reg<unsigned short> > >::allocate(std::allocator<Harp::Reg<unsigned short> >&, unsigned long) (alloc_traits.h:436)
==5409== by 0x4EC4BA9: std::_Vector_base<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::_M_allocate(unsigned long) (stl_vector.h:172)
==5409== by 0x4ECAE08: std::_Vector_base<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::_M_create_storage(unsigned long) (stl_vector.h:187)
==5409== by 0x4ECA46C: std::_Vector_base<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::_Vector_base(unsigned long, std::allocator<Harp::Reg<unsigned short> > const&) (stl_vector.h:138)
==5409== by 0x4EC98E4: std::vector<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > >::vector(std::vector<Harp::Reg<unsigned short>, std::allocator<Harp::Reg<unsigned short> > > const&) (stl_vector.h:328)
==5409== by 0x4EC8910: Harp::Warp::Warp(Harp::Warp const&) (core.h:154)
==5409== by 0x4EC8BF6: void std::_Construct<Harp::Warp, Harp::Warp const&>(Harp::Warp*, Harp::Warp const&) (stl_construct.h:75)
==5409== by 0x4EC7AA2: Harp::Warp* std::__uninitialized_copy<false>::__uninit_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:83)
==5409== by 0x4EC6CA9: Harp::Warp* std::uninitialized_copy<Harp::Warp const*, Harp::Warp*>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*) (stl_uninitialized.h:134)
==5409== by 0x4EC58A8: Harp::Warp* std::__uninitialized_copy_a<Harp::Warp const*, Harp::Warp*, Harp::Warp>(Harp::Warp const*, Harp::Warp const*, Harp::Warp*, std::allocator<Harp::Warp>&) (stl_uninitialized.h:289)
==5409==
==5409== 1,048,576 bytes in 1 blocks are still reachable in loss record 54 of 54
==5409== at 0x4C3089F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5409== by 0x4EDF76E: Harp::RAM::get(unsigned int) (mem.h:199)
==5409== by 0x4EDF961: Harp::RAM::operator[](unsigned int) (mem.h:306)
==5409== by 0x4EE250A: Harp::RAM::write(unsigned int, unsigned int, unsigned char*) (mem.h:219)
==5409== by 0x4EE2945: vx_device::upload(void*, unsigned long, unsigned long, unsigned long) (vx_driver.cpp:99)
==5409== by 0x4EE1CF4: vx_copy_to_fpga (vx_driver.cpp:241)
==5409== by 0x109334: upload_program(void*, char const*, unsigned int) (test.cpp:92)
==5409== by 0x109477: main (test.cpp:121)
==5409==
==5409== LEAK SUMMARY:
==5409== definitely lost: 0 bytes in 0 blocks
==5409== indirectly lost: 0 bytes in 0 blocks
==5409== possibly lost: 288 bytes in 1 blocks
==5409== still reachable: 3,164,942 bytes in 1,400 blocks
==5409== suppressed: 0 bytes in 0 blocks
==5409==
==5409== For counts of detected and suppressed errors, rerun with: -v
==5409== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

270
driver/sim/vx_driver.cpp Normal file
View File

@@ -0,0 +1,270 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <iostream>
#include <thread>
#include <mutex>
#include <chrono>
#include <vx_driver.h>
#include "../../simX/include/debug.h"
#include "../../simX/include/types.h"
#include "../../simX/include/core.h"
#include "../../simX/include/enc.h"
#include "../../simX/include/instruction.h"
#include "../../simX/include/mem.h"
#include "../../simX/include/obj.h"
#include "../../simX/include/archdef.h"
#include "../../simX/include/help.h"
#define CACHE_LINESIZE 64
#define PAGE_SIZE 4096
#define CHECK_RES(_expr) \
do { \
fpga_result res = _expr; \
if (res == FPGA_OK) \
break; \
printf("OPAE Error: '%s' returned %d!\n", #_expr, (int)res); \
return -1; \
} while (false)
///////////////////////////////////////////////////////////////////////////////
static size_t align_size(size_t size) {
return CACHE_LINESIZE * ((size + CACHE_LINESIZE - 1) / CACHE_LINESIZE);
}
///////////////////////////////////////////////////////////////////////////////
class vx_device;
class vx_buffer {
public:
vx_buffer(size_t size, vx_device* device)
: size_(size)
, device_(device) {
auto aligned_asize = align_size(size);
data_ = malloc(aligned_asize);
}
~vx_buffer() {
if (data_) {
free(data_);
}
}
auto data() const {
return data_;
}
auto size() const {
return size_;
}
auto device() const {
return device_;
}
private:
size_t size_;
vx_device* device_;
void* data_;
};
///////////////////////////////////////////////////////////////////////////////
class vx_device {
public:
vx_device()
: is_done_(false)
, is_running_(false)
, thread_(__thread_proc__, this)
{}
~vx_device() {
mutex_.lock();
is_done_ = false;
mutex_.unlock();
thread_.join();
}
int upload(void* src, size_t dest_addr, size_t size, size_t src_offset) {
if (dest_addr + size > ram_.size())
return -1;
ram_.write(dest_addr, size, (uint8_t*)src + src_offset);
return 0;
}
int download(const void* dest, size_t src_addr, size_t size, size_t dest_offset) {
if (src_addr + size > ram_.size())
return -1;
ram_.read(src_addr, size, (uint8_t*)dest + dest_offset);
return 0;
}
int start() {
if (this->wait(-1) != 0)
return -1;
mutex_.lock();
is_running_ = true;
mutex_.unlock();
return 0;
}
int wait(long long timeout) {
for (;;) {
mutex_.lock();
bool is_running = is_running_;
mutex_.unlock();
if (!is_running || 0 == timeout--)
break;
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return 0;
}
private:
void run() {
Harp::ArchDef arch("rv32i", false);
Harp::WordDecoder dec(arch);
Harp::MemoryUnit mu(PAGE_SIZE, arch.getWordSize(), true);
Harp::Core core(arch, dec, mu);
mu.attach(ram_, 0);
while (core.running()) {
core.step();
}
core.printStats();
}
void thread_proc() {
std::cout << "Device ready..." << std::endl;
for (;;) {
mutex_.lock();
bool is_done = is_done_;
bool is_running = is_running_;
mutex_.unlock();
if (is_done)
break;
if (is_running) {
std::cout << "Device running..." << std::endl;
this->run();
mutex_.lock();
is_running_ = false;
mutex_.unlock();
std::cout << "Device ready..." << std::endl;
}
}
}
static void __thread_proc__(vx_device* device) {
device->thread_proc();
}
bool is_done_;
bool is_running_;
std::thread thread_;
Harp::RAM ram_;
std::mutex mutex_;
};
///////////////////////////////////////////////////////////////////////////////
extern vx_device_h vx_dev_open() {
auto device = new vx_device();
return (vx_device_h)device;
}
extern int vx_dev_close(vx_device_h hdevice) {
if (nullptr == hdevice)
return -1;
delete (vx_device*)hdevice;
return 0;
}
extern vx_buffer_h vx_buf_alloc(vx_device_h hdevice, size_t size) {
if (nullptr == hdevice)
return nullptr;
auto buffer = new vx_buffer(size, (vx_device*)hdevice);
if (nullptr == buffer->data()) {
delete buffer;
return nullptr;
}
return (vx_buffer*)buffer;
}
extern void* vs_buf_ptr(vx_buffer_h hbuffer) {
if (nullptr == hbuffer)
return nullptr;
return ((vx_buffer*)hbuffer)->data();
}
extern int vx_buf_release(vx_buffer_h hbuffer) {
if (nullptr == hbuffer)
return -1;
delete (vx_buffer*)hbuffer;
return 0;
}
extern int vx_copy_to_fpga(vx_buffer_h hbuffer, size_t dest_addr, size_t size, size_t src_offset) {
if (nullptr == hbuffer)
return -1;
auto buffer = (vx_buffer*)hbuffer;
if (size + src_offset > buffer->size())
return -1;
return buffer->device()->upload(buffer->data(), dest_addr, size, src_offset);
}
extern int vx_copy_from_fpga(vx_buffer_h hbuffer, size_t src_addr, size_t size, size_t dest_offset) {
if (nullptr == hbuffer)
return -1;
auto buffer = (vx_buffer*)hbuffer;
if (size + dest_offset > buffer->size())
return -1;
return buffer->device()->download(buffer->data(), src_addr, size, dest_offset);
}
extern int vx_start(vx_device_h hdevice) {
if (nullptr == hdevice)
return -1;
return ((vx_device*)hdevice)->start();
}
extern int vx_ready_wait(vx_device_h hdevice, long long timeout) {
if (nullptr == hdevice)
return -1;
return ((vx_device*)hdevice)->wait(timeout);
}