Giter Club home page Giter Club logo

Comments (10)

MorrisMA avatar MorrisMA commented on August 21, 2024

Directly load the image into a 16kB SRAM, which is all that's needed to run the full 6502 suite of functional tests. In other words, use the capability of the FPGA simulator and/or FPGA power-on configuration to initialize the Block RAMs with the functional test code and directly vector to the tests. on reset. There's no need to copy from ROM to RAM. This approach is readily supported by Verilog and ISim.

from 6502_65c02_functional_tests.

BigEd avatar BigEd commented on August 21, 2024

I'm assuming there could be a situation where a user has a ROM which they can program up, and a RAM, but no ready way to load RAM. Of course they could do a block move, but that would involve some relocation, unless they are able to build for one target address and load at another. Simplest (for the user) would be if the code were ROM-friendly.

I agree that in this specific case they could probably modify their emulator or HDL design to run the code as-is.

from 6502_65c02_functional_tests.

MorrisMA avatar MorrisMA commented on August 21, 2024

In Verilog, the initial statement may used to invoke a system process that can perform the required initialization operations without additional coding. In the simulation, the following instantiation sets up the RAM model to load the memory initialization file for the 6502 functional test:

M65C02_RAM #(
.pAddrSize(pRAM_AddrWidth),
.pDataSize(8),
.pFileName("Src/65C02_FT.txt")
) RAM (

In the RAM model, the specified memory initialization file is loaded by the initial statement and the $readmemh() system function:

reg [(pDataSize - 1):0] RAM [pRAM_Max:0];

initial
$readmemh(pFileName, RAM, 0, pRAM_Max);

from 6502_65c02_functional_tests.

Klaus2m5 avatar Klaus2m5 commented on August 21, 2024

I will implement a new configuration variable "disable_selfmod" with a big warning about the untested instructions when using it.

from 6502_65c02_functional_tests.

BigEd avatar BigEd commented on August 21, 2024

Sounds great, thanks!

from 6502_65c02_functional_tests.

MorrisMA avatar MorrisMA commented on August 21, 2024

Leave it to a neo-luddite to comment on a thread not his own. My apologies to BigEd and Klaus2M5.

from 6502_65c02_functional_tests.

BigEd avatar BigEd commented on August 21, 2024

Not a problem for me! If you have a stackoverflow account you might want to join in over there - I don't have one. But it might be better to wait until a fix.

from 6502_65c02_functional_tests.

Klaus2m5 avatar Klaus2m5 commented on August 21, 2024

Not a problem at all!

from 6502_65c02_functional_tests.

Klaus2m5 avatar Klaus2m5 commented on August 21, 2024

The config switch "disable_selfmod" was added.

from 6502_65c02_functional_tests.

Klaus2m5 avatar Klaus2m5 commented on August 21, 2024

The self modifying immediate opcodes are moved to data RAM and will be tested even if the code itself is executed in ROM. The remaining self modifying branch range test still needs to be disabled, but is supplemented with an early relative addressing test.

from 6502_65c02_functional_tests.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.