OpenCores
Issue List
RST instruction #3
Open andylgh opened this issue almost 13 years ago
andylgh commented almost 13 years ago

hello?I download your code for study?I doubt the RST instructions in your cpu8080.v?line 1008~1010 ?have a problem?as follow?

 if (intcyc) { wdatahold2, wdatahold } <= pc;
    else { wdatahold2, wdatahold } <= pc+16'h3;
{ wdatahold2, wdatahold } <= pc+16'h1; // of address after call

I think you should modify as follow?

   if (intcyc) { wdatahold2, wdatahold } <= pc;
    else { wdatahold2, wdatahold } <= pc+16'h1; // of address after call
Richard.Ivy commented about 6 years ago

I agree that there is a problem with RST instructions. The following is my suggestion vor modifying CPU8080.v starting at line 1009.

Change if (intcyc) { wdatahold2, wdatahold } <= pc; else { wdatahold2, wdatahold } <= pc+16'h3; { wdatahold2, wdatahold } <= pc+16'h1; //adr after call . . . to if (intcyc) { wdatahold2, wdatahold } <= pc; else { wdatahold2, wdatahold } <= pc+16'h1;
. . .


Assignee
No one
Labels
Bug