6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Jun 01, 2024 11:14 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: hazards?
PostPosted: Thu Nov 04, 2021 3:12 am 
Offline

Joined: Sun Oct 03, 2021 2:17 am
Posts: 114
Does the 65x architecture have hazards, like MIPS? Do I need to be careful of the pipeline?


Top
 Profile  
Reply with quote  
 Post subject: Re: hazards?
PostPosted: Thu Nov 04, 2021 3:57 am 
Offline

Joined: Fri Apr 15, 2016 1:03 am
Posts: 136
No.
65xx CPUs can execute any sequence of instructions without inserting programmed delays.


Top
 Profile  
Reply with quote  
 Post subject: Re: hazards?
PostPosted: Thu Nov 04, 2021 4:03 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8447
Location: Southern California
The pipeline is quite short (only fetching the next instruction's op code while finishing an already-executing instruction), and you don't have to worry about stalls resulting from things like refilling the pipeline after a branch.  (I'm not familiar with MIPS, so I don't know if that's what you're referring to.)  The only thing I can think of to comment is that if the IRQ\ goes down during phase2 of the operand fetch of a branch instruction, it will, according to my tests on the '816, take the branch if appropriate and sometimes execute one more instruction before the interrupt sequence starts.  With a quick look at my test results from quite a few examples I tried, I don't seem to be able to nail down the pattern.  Also, see this topic regarding whether an interrupt can delay the execution of the instruction immediately following an SEI instruction.  But generally, like Lee says, you don't have to worry about it.

Edit:  See also the lengthy topic A taken branch delays interrupt handling by one instruction (about the NMOS '02).  It has more links too.  I should probably go back and re-read it myself.

Edit2:  See also the topic If an interrupt occurs on a BRK instruction, regarding the NMOS 6502 bug.  The NMOS had other bugs too, all corrected in the CMOS version and the 65816.  I have put all the NMOS-CMOS differences together in one article at http://wilsonminesco.com/NMOS-CMOSdif/ .  (Let us know if I'm getting too far off of what you were thinking of.)

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: hazards?
PostPosted: Thu Dec 29, 2022 7:49 am 
Offline

Joined: Sun Oct 03, 2021 2:17 am
Posts: 114
Oh, ok. I've since discovered that the Super FX chip on the other hand does have delay slots.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: