Почему некоторые процессоры имеют неофициальные коды и / или ошибки?

275
Juan Antonio Gomez Moriano

В последнее время я пишу (или пытаюсь) эмулятор для процессора 6502 NES.

Я многому учусь, некоторые из них меня действительно удивляют, и мне было интересно, чем это объясняется, в частности, две вещи пришли мне на ум

  1. Существование ошибок, в частности 6502, похоже, имеет ошибку в режиме косвенной адресации, по крайней мере, для первых процессоров (это влияет на тот, который используется в NES)
  2. Неофициальные коды операций: Опять же, действительно удивительно, что существуют коды, которые еще не являются официальными, но некоторые из них кажутся совершенно бесполезными (например, DOP и TOP, которые являются вариациями NOP), а некоторые из них представляют собой композицию других кодов операций ( такой SAX или DCP).

Вопрос в том, как это возможно, что при изготовлении миллионов этих процессоров они приводили к ошибкам (такой как режим косвенной адресации), а также, с какой стати вы, как производитель, включили неофициальные коды операций, которые могут быть удалены в следующих версиях ? Это происходит также с более новыми процессорами?

-1

2 ответа на вопрос

1
JakeGould

The question is, how is it possible that when manufacturing millions of those CPUs, they ended up with bugs (such the indirect addressing mode) and also, why on earth would you as a manufacturer include unofficial operation codes that may be removed in following revisions?

Why are CPUs any different than software? Companies spend millions of dollars on software development, manufacturing and marketing. Why then would a flawed product get loose?

I mean Apple is a major computer and data company right? How then can one explain how such a big company would—for example—release the iPhone 4 with bad antenna issues? Or heck, release a few seconds of white noise as a Taylor Swift song in Canada?

Your presumption is because a company is big and has checks & balances that those checks and balances should then be flawless. Which is simply not the case in any human endeavor no matter how many layers of quality assurance one has.

In the case of unofficial operation codes, it can easily be explained by rushed development or code being readied for future development. If a new CPU is made, the engineers will most likely have a massive list of desired features. Some will be made. Some will not. And some will be made yet would be impractical to officially stamp as “Yes this is working, uses this.”

This is the reason—for example—why pretty much every CPU out there has revisions. And why in the multi-CPU systems—ones with multiple physical CPUs—it is often important that all CPUs match the same production batch.

То, что вы считаете плохим, возможно, было нарочно. Нинтендо, как известно, иногда делал это. Недокументированные функции недокументированы по причине. Ramhound 9 лет назад 0
@Ramhound Никогда не говорил, что недокументированные функции были плохими. Просто сказал, что разработка могла быть срочно отправлена. JakeGould 9 лет назад 0
1
misha256

how is it possible that when manufacturing millions of those CPUs, they ended up with bugs

  • It's really, really hard to design CPUs let alone CPUs that are totally bug-less.

  • Often subtle bugs are only discovered in the real-world once a product is released, because there is no way you can test to the scale and breadth that millions of end-users can.

  • Competition plays a huge part. Getting to the market first, or at least in a timely fashion, is important otherwise you loose business to competitors and eventually go out of business. That pressure versus the pressure to create quality is why you often get something that is only good enough.

  • For some reason, in the IT world especially, the demand for new and improved massively outweighs the demand for updated and refined. It's your fault as much as mine. For example, if Intel continuously refined the 80486 CPU I suppose it would be exceptionally close to bug-free by now. But what could you do with an 80486 these days, really? I certainly wouldn't be buying one today, nor would you.

why on earth would you as a manufacturer include unofficial operation codes that may be removed in following revisions?

Unofficial op-codes exist for a variety of reasons:

  • Some are found to have bugs or side-effects at a point during development where it would be too expensive and/or time-consuming to fix or remove.

  • Some are the result of time constraints where they could not be tested thoroughly enough and there isn't enough certainly that they will work correctly.

  • Some are put in place as a proof-of-concept or prototype for the future and might see adoption in later CPU revisions/generations.

  • Some exist for internal testing purposes only.

  • And no doubt some are put in there just for fun, aka Easter Eggs

Похожие вопросы