After fixing a number of bugs in my core, the Python microarchitecture simulator passed the I-ADD-01 test. Of course, that means that a bunch of other instructions must be basically working. I spent a bunch of time today trying to figure out why I was getting wonky add instruction results, when it turned out that the add instruction was fine and that other instructions like bltu and srai were broken and were screwing up the output.
I haven't yet tested the Verilog; I've written the Verilog code and compiled it with both Icarus and Verilator, but I haven't yet got usable Verilator testbench code. I'll probably run the other 54 compliance tests on the Python simulator before I run them on the Verilog simulator.
I'm still not at all confident that I'll have this wrapped up by the deadline, but I'll keep trying.Eric
ADDI-01 does not use BLTU or SRAI
You should try to setup somewhat usable verilator testbench ASAP, it helps also helps to avoid running out time, well I said that to myself too, but am still not yet done with the verilator, still on to-do
On Sunday, 18 November 2018 11:54:39 UTC+1, Eric Smith wrote:I think the RV32I compliance test for misaligned load/store is flawed. It assumes a misaligned access will cause a trap, which is allowed but not required by the RISC-V ISA spec v2.2. My core implements misaligned accesses without trapping, which is also allowed. If the test was written properly, the trap handler would perform the misaligned access the way the architecture intends, and then the test would pass whether it traps or not. However, the test is actually written to assume the trap, and the trap handler records mtvec(mbadaddr) and mcause into the result signature but does not emulate the misaligned access.
The tests are not perfect, and some of them could be argued to be wrong/meaningless, but for the context of this contest those tests are the confirmance test case selected, so you need to pass test as primary goal