Functional Test for the NMOS 6502 - request for verification
Re: Functional Test for the NMOS 6502 - request for verifica
It is fixed in the newest version dated 02-mar-2013.
I added a push pull test to verify flags and registers are not altered by PHA, but are correctly altered by PLA.
The new version is now on my 6502 emulation project page http://2m5.de/6502_Emu/index.htm
and the direct download link is http://2m5.de/6502_Emu/6502_functional_tests.zip
These links should always have the newest version from now on.
I added a push pull test to verify flags and registers are not altered by PHA, but are correctly altered by PLA.
The new version is now on my 6502 emulation project page http://2m5.de/6502_Emu/index.htm
and the direct download link is http://2m5.de/6502_Emu/6502_functional_tests.zip
These links should always have the newest version from now on.
6502 sources on GitHub: https://github.com/Klaus2m5
Re: Functional Test for the NMOS 6502 - request for verifica
Fantastic!
As an aside, have you thought about putting the test suite on github? I've noticed myself (and seen links posted by others) pulling up https://github.com/redline6561/cl-6502/ ... l_test.a65 in a browser, just because it's easy to check quickly without downloading and unzipping. Hosting it there would give a nice, visible, linkable canonical location.
Also, it would allow people to send you pull requests
As an aside, have you thought about putting the test suite on github? I've noticed myself (and seen links posted by others) pulling up https://github.com/redline6561/cl-6502/ ... l_test.a65 in a browser, just because it's easy to check quickly without downloading and unzipping. Hosting it there would give a nice, visible, linkable canonical location.
Also, it would allow people to send you pull requests
Re: Functional Test for the NMOS 6502 - request for verifica
(I've sent a pull request to redline6561 - whatever Klaus chooses to do, it would be good to have redline's version up to date)
Klaus: thanks, of course, for the extra check!
Cheers
Ed
Edit: my pull request was merged. Quick work!
Klaus: thanks, of course, for the extra check!
Cheers
Ed
Edit: my pull request was merged. Quick work!
Re: Functional Test for the NMOS 6502 - request for verifica
Thank you Ed for sending the pull request and getting the github version updated. I am currently not planning to put it up on github myself.
cheers, Klaus
cheers, Klaus
6502 sources on GitHub: https://github.com/Klaus2m5
Code coverage for Arlets core
I did run Klaus's test on Arlets core and it passed. Here is the code coverage report
from covered. I will try to see if I can extract the untouched code.
John Eaton
Covered covered-0.7.10 -- Verilog Code Coverage Utility
Written by Trevor Williams (phase1geo@gmail.com)
Freely distributable under the GPL license
:::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: Covered -- Verilog Coverage Summarized Report ::
:: ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Report generated from CDD file : Arlet_6502_cpu_def.cdd
* Reported by : Module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LINE COVERAGE RESULTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module/Task/Function Filename Hit/ Miss/Total Percent hit
---------------------------------------------------------------------------------------------------------------------
$root NA 0/ 0/ 0 100%
Arlet_6502_cpu_def cpu_def.v 375/ 5/ 380 99%
Arlet_6502_ALU_def cpu_def.v 30/ 0/ 30 100%
---------------------------------------------------------------------------------------------------------------------
Accumulated 405/ 5/ 410 99%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TOGGLE COVERAGE RESULTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Toggle 0 -> 1 Toggle 1 -> 0
Module/Task/Function Filename Hit/ Miss/Total Percent hit Hit/ Miss/Total Percent hit
---------------------------------------------------------------------------------------------------------------------
$root NA 0/ 0/ 0 100% 0/ 0/ 0 100%
Arlet_6502_cpu_def cpu_def.v 222/ 30/ 252 88% 224/ 28/ 252 89%
Arlet_6502_ALU_def cpu_def.v 79/ 1/ 80 99% 79/ 1/ 80 99%
---------------------------------------------------------------------------------------------------------------------
Accumulated 301/ 31/ 332 91% 303/ 29/ 332 91%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ COMBINATIONAL LOGIC COVERAGE RESULTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logic Combinations
Module/Task/Function Filename Hit/Miss/Total Percent hit
---------------------------------------------------------------------------------------------------------------------
$root NA 0/ 0/ 0 100%
Arlet_6502_cpu_def cpu_def.v 582/ 92/ 674 86%
Arlet_6502_ALU_def cpu_def.v 96/ 1/ 97 99%
---------------------------------------------------------------------------------------------------------------------
Accumulated 678/ 93/ 771 88%
from covered. I will try to see if I can extract the untouched code.
John Eaton
Covered covered-0.7.10 -- Verilog Code Coverage Utility
Written by Trevor Williams (phase1geo@gmail.com)
Freely distributable under the GPL license
:::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: Covered -- Verilog Coverage Summarized Report ::
:: ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Report generated from CDD file : Arlet_6502_cpu_def.cdd
* Reported by : Module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LINE COVERAGE RESULTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module/Task/Function Filename Hit/ Miss/Total Percent hit
---------------------------------------------------------------------------------------------------------------------
$root NA 0/ 0/ 0 100%
Arlet_6502_cpu_def cpu_def.v 375/ 5/ 380 99%
Arlet_6502_ALU_def cpu_def.v 30/ 0/ 30 100%
---------------------------------------------------------------------------------------------------------------------
Accumulated 405/ 5/ 410 99%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TOGGLE COVERAGE RESULTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Toggle 0 -> 1 Toggle 1 -> 0
Module/Task/Function Filename Hit/ Miss/Total Percent hit Hit/ Miss/Total Percent hit
---------------------------------------------------------------------------------------------------------------------
$root NA 0/ 0/ 0 100% 0/ 0/ 0 100%
Arlet_6502_cpu_def cpu_def.v 222/ 30/ 252 88% 224/ 28/ 252 89%
Arlet_6502_ALU_def cpu_def.v 79/ 1/ 80 99% 79/ 1/ 80 99%
---------------------------------------------------------------------------------------------------------------------
Accumulated 301/ 31/ 332 91% 303/ 29/ 332 91%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ COMBINATIONAL LOGIC COVERAGE RESULTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logic Combinations
Module/Task/Function Filename Hit/Miss/Total Percent hit
---------------------------------------------------------------------------------------------------------------------
$root NA 0/ 0/ 0 100%
Arlet_6502_cpu_def cpu_def.v 582/ 92/ 674 86%
Arlet_6502_ALU_def cpu_def.v 96/ 1/ 97 99%
---------------------------------------------------------------------------------------------------------------------
Accumulated 678/ 93/ 771 88%
Re: Functional Test for the NMOS 6502 - request for verifica
The code coverage test is interesting. Did you run with RDY toggling ? If you can find out what wasn't tested, we could find ways to improve the test suite.
Re: Functional Test for the NMOS 6502 - request for verifica
Arlet wrote:
The code coverage test is interesting. Did you run with RDY toggling ? If you can find out what wasn't tested, we could find ways to improve the test suite.
John Eaton
Re: Functional Test for the NMOS 6502 - request for verifica
I have done a test with RDY randomly toggling while performing the test suite, using $random. That's easy to test, because it doesn't require any cooperation from the test suite. For IRQ/NMI it's a little harder because it needs to be synchronized with the test suite. For instance, by writing to a special IO location to trigger an IRQ or NMI, preferably with a controlled delay.
Re: Functional Test for the NMOS 6502 - request for verifica
I don´t think, the delay is all that important. The only reason for a controlled delay would be to test, wether interrupts are synchronized with the beginning of the next instruction and you don't get halfway executed opcodes. Wether an interrupt is taken on the next instruction or on the instruction after that will not cause any problems by itself if the interrupt works correctly.
The rest only needs a simple feedback register to NMI/IRQ. That will allow you to test propper use of the stack and that nothing gets modified except the I-bit and the PC.
I will look into adding a register and bit definition to run at least a static test.
To test with more specific external hardware like a timer should be in a separate test.
The rest only needs a simple feedback register to NMI/IRQ. That will allow you to test propper use of the stack and that nothing gets modified except the I-bit and the PC.
I will look into adding a register and bit definition to run at least a static test.
To test with more specific external hardware like a timer should be in a separate test.
6502 sources on GitHub: https://github.com/Klaus2m5
Re: Functional Test for the NMOS 6502 - request for verifica
While you're in there changing things, I had one other idea: I find myself recompiling the latest version of your test, then checking the listing to set the "success" address in my test code (https://github.com/zellyn/go6502/blob/m ... al_test.go). How about putting the "success address" at a known location near the beginning of the file, so it stays consistent?
(Eventually, I plan on writing my own assembler, so I can just load the .a65 file directly, and then I can find out the label addresses easily. But that might take a while... I'm working on a golang translation of perfect6502 first, and the Apple ][+ emulator might prove more interesting than an assembler for a while.)
(Eventually, I plan on writing my own assembler, so I can just load the .a65 file directly, and then I can find out the label addresses easily. But that might take a while... I'm working on a golang translation of perfect6502 first, and the Apple ][+ emulator might prove more interesting than an assembler for a while.)
Re: Functional Test for the NMOS 6502 - request for verifica
You may not have noticed, but success is a macro! You can make it play "we are the champions" if you want. So you could replace the builtin success macro with your own like:
To keep the changes for upcoming versions you either need to replace this macro every time or you copy all configurable items to a separate include file and edit the new source to refer to the include file.
Code: Select all
success macro
jmp my_success ;test passed, no errors
endm
code ;put the success loop ahead of code
org code_segment-3
my_success
jmp * ;test passed, no errors
6502 sources on GitHub: https://github.com/Klaus2m5
Re: Functional Test for the NMOS 6502 - request for verifica
Aah. Of course. Thanks!
I'll probably just write a sed script to stick that in there each time.
fyi, right now I'm running your test suite against my first pass at a naive go-language translation of perfect6502. I expect it to take somewhere around three days, although I might get bored and start optimizing before then.
I'll probably just write a sed script to stick that in there each time.
fyi, right now I'm running your test suite against my first pass at a naive go-language translation of perfect6502. I expect it to take somewhere around three days, although I might get bored and start optimizing before then.
Re: Functional Test for the NMOS 6502 - request for verifica
I just ran the test suite on my 6502 Sandbox with W65C02 processor, and it passed. I did have ROM_vectors = 0.
Re: Functional Test for the NMOS 6502 - request for verifica
FYI, I am currently running my gate-level emulation in parallel with my instruction-level emulation, and finding discrepancies. Most are missing ignored reads.
However, it appears I managed to pass the functional tests with ZP,x and ZP,y instructions that would read from page 1 when the ZP address and x/y added to more than 0xFF.
However, it appears I managed to pass the functional tests with ZP,x and ZP,y instructions that would read from page 1 when the ZP address and x/y added to more than 0xFF.
Re: Functional Test for the NMOS 6502 - request for verifica
zellyn wrote:
FYI, I am currently running my gate-level emulation in parallel with my instruction-level emulation, and finding discrepancies. Most are missing ignored reads.
zellyn wrote:
However, it appears I managed to pass the functional tests with ZP,x and ZP,y instructions that would read from page 1 when the ZP address and x/y added to more than 0xFF.
Last edited by Klaus2m5 on Mon Mar 11, 2013 4:49 pm, edited 1 time in total.
6502 sources on GitHub: https://github.com/Klaus2m5