-
Notifications
You must be signed in to change notification settings - Fork 141
Implement MIPS III doubleword memory instructions #215
Comments
@inedostoev Any progress? |
I and @TimofeevAlex would like to do it in the coming days. |
@inedostoev Igor reported you faced some issue, could you please explain? |
Yes, I try. As I understend, in MIPS III introduce doubleword instructions, and I thought about it realization. On wikipedia I read, for example realization of instruction |
I think the only way is to have 64-bit registers. I suggest to have a |
I change variable |
Please invent one :-) Try to use value different to other NO_VALs. |
When I change core/perf_sim.cpp:364:16: required from here
core/perf_sim.cpp:296:5: error: no matching function for call to ‘WritePort<long unsigned int>::write(uint128, Cycle&)’
wp_execute_2_execute_bypass->write( instr.get_v_dst(), cycle);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from core/perf_sim.h:15:0,
from core/perf_sim.cpp:6:
./infra/ports/ports.h:246:24: note: candidate: void WritePort<T>::write(const T&, Cycle) [with T = long unsigned int]
template<class T> void WritePort<T>::write( const T& what, Cycle cycle)
^~~~~~~~~~~~
./infra/ports/ports.h:246:24: note: no known conversion for argument 1 from ‘uint128 {aka boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void> >}’ to ‘const long unsigned int&’
core/perf_sim.cpp: In instantiation of ‘void PerfSim<ISA>::clock_memory(Cycle) [with ISA = MIPS]’: As I understang, it is problem with converting 128-bit to 64-bit, because |
Yep, 128-bit should poison everything. You may consult @denislos for data bypassing unit internals. |
Now I have problems with unit test, with func_sim. func_sim/t/unit_test.cpp:41: Failure
Death test: {{ mips.run_no_limit( valid_elf_file); } ::exit(0); }
Result: died but not with expected exit code:
Terminated by signal 6 (core dumped)
Actual msg:
[ DEATH ] test.out: infra/memory/memory.cpp:93: void FuncMemory::write(uint64, Addr, uint32): Assertion `addr != 0' failed.
[ DEATH ] I understand, that in function |
Run the trace in functional simulator in verbose mode ( |
Ok, thank you, I will try |
Good day. I finally figured out with [==========] Running 5 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 3 tests from Perf_Sim_init
[ RUN ] Perf_Sim_init.Process_Correct_Args_Of_Constr
/home/inedostoev/mipt-mips/simulator/core/t/unit_test.cpp:21: Failure
Death test: {{ PerfSim<MIPS> mips( false); } ::exit(0); }
Result: died but not with expected exit code:
Exited with exit status 1
Actual msg:
[ DEATH ] No ReadPorts for MEMORY_2_EXECUTE_BYPASS key
[ DEATH ]
[ FAILED ] Perf_Sim_init.Process_Correct_Args_Of_Constr (3 ms)
[ RUN ] Perf_Sim_init.Make_A_Step
/home/inedostoev/mipt-mips/simulator/core/t/unit_test.cpp:27: Failure
Death test: {{ PerfSim<MIPS>( false).run( valid_elf_file, 1); } ::exit(0); }
Result: died but not with expected exit code:
Exited with exit status 1
Actual msg:
[ DEATH ] No ReadPorts for MEMORY_2_EXECUTE_BYPASS key
[ DEATH ]
[ FAILED ] Perf_Sim_init.Make_A_Step (3 ms)
[ RUN ] Perf_Sim_init.Process_Wrong_Args
/home/inedostoev/mipt-mips/simulator/core/t/unit_test.cpp:34: Failure
Death test: PerfSim<MIPS>( false).run( "./1234567890/qwertyuop", 1)
Result: died but not with expected error.
Expected: ERROR.*
Actual msg:
[ DEATH ] No ReadPorts for MEMORY_2_EXECUTE_BYPASS key
[ DEATH ]
[ FAILED ] Perf_Sim_init.Process_Wrong_Args (5 ms)
[----------] 3 tests from Perf_Sim_init (11 ms total)
[----------] 2 tests from Perf_Sim
[ RUN ] Perf_Sim.Run_Full_Trace Problem with ports, but I change all to |
Double-check type of |
Sorry, my bad
|
Do you guys have any tests for behavior of these instructions? I just realized that our beloved SPIM's |
Of course, we add simple tests |
MIPS III introduced a lot of doubleword instructions which operate with 64 bit extended registers. They are rarely used as most of MIPS HW is 32-bit, but we might be interested to keep them as well
ld
ldl
ldr
lwu
sd
sdl
sdr
The text was updated successfully, but these errors were encountered: