atarionline.pl W65C816 miał błąd - Forum Atarum

Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.

  • :
  • :

Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.

    • 1: CommentAuthormarok
    • CommentTime17 Jan 2023
     
    Spodziewam się, że to ciekawostka raczej niż coś, co dotyczy naszych zastosowań (rozwiązań hardwarowych).

    Chodzi o wiarygodne doniesienia, że 65816 miał przynajmiej w pierwszych wersjach działać niewłaściwie w niektórych sytuacjach.

    Pierwsze doniesienie, choć nie do końca umiem to zinterpretować:
    The 65816 makes some mistakes (like SEP #$20; STA; REP #$30 to do a store of one byte)


    Jak sprawdzam (bo jeszcze mylę) SEP #$20 przełącza akumulator na rozmiar 8 bitów. STA, zaraz potem, jest więc tym rozkazem kluczowym, o który może chodzić (zapis do dwóch bajtów, bez przełączenia na 8 bit?; adresacja jest wyraźnie bez znaczenia). REP #$30 przełącza akumulator (powrotnie?) oraz dodatkowo rejestry indeksowe na 16 bit.

    Chodzi więc o sytuację, gdy rejestr od rozmiaru akumulatora (M) przełączany jest z pewnością (SEP #$30 to właśnie sugeruje) z 16 bit na 8 bit i następuje zaraz potem (czy to może mieć znaczenie że zaraz?) zapis do pamięci z akumulatora (czy błąd dotyczyłby też odczytu?). Ostatnia instrukcja (SEP #$30) w zasadzie nie powinna do tego ew. błędu się w żaden sposób już przyczyniać (na chłopski rozum).

    Podane jako zaledwie przykład tych, liczba mnoga, błędów (póki co nic chyba nie wiadomo o jakiś innych).

    Jest to doniesienie użytkowynika AppleII(?).


    Redagując (wystarczająco długo) ten wpis, znalazłem więcej źródeł, które wyjaśniają mocno całą sytuację (więc wtrącam jeszcze trochę cytatów).

    ->link<-
    Why did early versions of the 65C816 CPU need a suffixed NOP to every SEP and REP instruction? I saw comments in some source code pointing at this. Looking around in official WDC's documentation and others didn't reveal even a hint on this subject.


    The original comment was "NOP necessary for early versions of '802/'816 >4MHz.", mentioned in a source code of a Forth implementation which is not publicly available. A connection to a timing issue seems obvious


    Another usenet post (comp.sys.apple2, 1990): "Bill Mensch did a good job on the instruction set, but his mask leaves a lot to be desired since it does not lend itself to high speed operation. Unless they've fixed things, on the 8 mhz parts REP and SEP take 250 ns to operate so you have to put a NOP after each one OR you have to stretch the clock the way the transwarp does. WDC has admitted that this is caused by very long signal lines."


    (chyba najważniejsze)
    The original 65816 layout was done by hand and was not amenable to high speeds. In particular, REP/SEP (perhaps PLP as well) instructions didn't complete in 3 cycles when overclocked. (Even today, the data sheet notes, "the MX [pin] output is invalid during the instruction cycle following REP, SEP and PLP instruction execution").

    The Transwarp GS accelerator stretched clock cycles to work around that problem.

    In 1992, a Sanyo redesign fixed the issues and enabled higher speeds.

    (Sourced from comp.sys.apple2 archives and GEnie A2 Transwarp GS archives)



    Drugie doniesienie pochodzi z dokumentacji procesora 65C832. Przez lata można było go przeoczyć, ale to bliski kuzyn 65816. Z pewnością dlatego, że mógł to być tylko prototyp. Doniesienia o nim z dalszej już nawet przeszłości znaleźć można na naszych forach w tym wątku:
    ->link<-

    Jest w niej wyszczególniona specjalna adnotacja, że:
    8.23 REP/SEP
    WDC had problems using the REP and SEP instructions in early versions of the high-speed W65C816 and W65C802 devices and has been corrected on all W65C802 devices.



    A tutaj (w wywiadzie, który był wspominany całkiem niedawno na naszych forach) jest sporo o 65C832 (choć mi osobiście ciężko dokładnie to zrozumieć)
    going from my 816, to something competitive, you need about 1,000 engineers. And so that’s why I never did it. Now did I specify it? Can you find a datasheet for the 65c832? You can. Do we have a product name to the 65c832pxb, for programmable accelerator board, we do, we have one of those. We sell those. So the thing is, is that when you go from the 816, you have to add about 500 engineers. And the reason why, is because you have to compete with Intel, AMD, and at the time IBM.