XaiJu
JOTEGO
JOTEGO

patreon


NeoGeo Pocket CPU: Test Coverage

For the last two weeks, Samuel has kept working full time on the NGP CPU. I asked him to use a FOSS tool called covered to check the test bench converage. But, what is coverage? In the early days of digital electronics the engineer had to manually calculate all the digital functions and choose individual logic gates (AND, OR, etc) to implement them. The design test was often done by building parts of it in discrete logic and testing on a real work bench. The Yamaha sound chips went through this phase of building individual parts before integrating them. If you look for the Yamaha part numbers you will find that each individual part of the YM2203 (the father of all FM chips) had been made previously as an individual chip: the phase generator, the operator, etc.

As computers got more able to help in the electronics design, engineers in the industry started using Verilog. Making a design in Verilog is similar to writing software in so far as both tasks are done in text files. The logic behaviour could be simulated in a computer now and it was important to test as much as possible before going through the expensive fabrication process. Digital designers started to write test benches. But, how do you tell if your tests are enough? The first answer to this was coverage. The idea is to count the text lines in the design that the test has exercised. For instance, if you have a CPU that can do addition and subtraction but you have only tested for the addition, your coverage will be low. The coverage test will highlight the subtraction code as red, pointing to missing tests. Coverage analysis also looks at individual signals: the tests should exercise each bit in the design so it transitions from 0 to 1, and 1 to 0. That is called toggle coverage.

Design verification has got more and more critical as digital chips have become larger and fabrication cost has become more expensive. Yes, cost per transistor is smaller now but the chip mask cost is larger. The king chair has been taken away from digital designers and the digital verification group is the largest one in modern digital projects now. If you look at an Intel chip, the largest group working on it would be verification, with the design and physical implementation groups coming after them.

I haven’t heard of any retro FPGA project running coverage. It just takes too long to do things right and for small blocks you can get away without it. What that means is that a lot of testing is done by the user community, who will load the core and report problems. I have been trying to approach my FOSS projects as close as possible to industry standard workflows. But, there is only so much one man can do. I am very glad to count on Samuel now to improve the quality of the work delivered. Yet, it has been half disappointing, half reassuring, that despite all the new tests written by Samuel to increase coverage, no bugs were found. I don’t think I can design a full CPU without making a mistake, so I’m still hoping the next test Samuel writes will find a bug.

On other fronts, Gyurco found the missing connection in Out Run preventing it from booting up. Gyurco mostly works on the MiST platform and has been helping at critical times since I started making cores. I’m really grateful. I will resume the work on the Out Run core.

Director Skutis finished the schematics on Insector X. This game runs on similar hardware to Extermination, which Esperanza was working on before her holidays (we miss her). I have started the FPGA core for this hardware and we will see the first beta next week, on the 30th of September. Skutis is becoming a master at extracting PCB schematics and he has started using the same tools we do, so we can share information and help each other better. He’s got quite an interesting pipeline of schematics coming up to keep us busy.

There has been no firmware update for the Pocket, so the situation there hasn’t changed much. We still cannot control arcade game DIP switches and I have found it a bit unstable when starting games and swapping cores. So I am a bit hesitant about releasing a core for the current firmware. Let’s see if there is an update during the coming week so the 30th beta can include the Pocket too.

Español

Durante las últimas dos semanas, Samuel ha seguido trabajando a tiempo completo en la CPU de NGP. Le pedí que usara una herramienta de FOSS llamada "covered" para comprobar la convergencia del banco de pruebas. Pero, ¿qué es la cobertura? En los primeros días de la electrónica digital, el ingeniero tenía que calcular manualmente todas las funciones digitales y elegir puertas lógicas individuales (Y, O, etc.) para implementarlas. La prueba de diseño a menudo se realizaba construyendo partes de él en lógica discreta y probando en un banco de trabajo real. Los chips de sonido de Yamaha pasaron por esta fase de construcción de piezas individuales antes de integrarlas. Si busca los números de parte de Yamaha, encontrará que cada parte individual del YM2203 (el padre de todos los chips FM) se había fabricado previamente como un chip individual: el generador de fase, el operador, etc.

A medida que las computadoras se volvieron más capaces de ayudar en el diseño electrónico, los ingenieros de la industria comenzaron a usar Verilog. Hacer un diseño en Verilog es similar a escribir software en la medida en que ambas tareas se realizan en archivos de texto. El comportamiento lógico ahora se podía simular en una computadora y era importante probar tanto como fuera posible antes de pasar por el costoso proceso de fabricación. Los diseñadores digitales comenzaron a escribir bancos de pruebas. Pero, ¿cómo sabes si tus pruebas son suficientes? La primera respuesta a esto fue la cobertura. La idea es contar las líneas de texto en el diseño que ha ejercido la prueba. Por ejemplo, si tiene una CPU que puede sumar y restar pero solo ha probado la suma, su cobertura será baja. La prueba de cobertura resaltará el código de sustracción en rojo, indicando las pruebas faltantes. El análisis de cobertura también analiza las señales individuales: las pruebas deben ejercitar cada bit en el diseño para que pase de 0 a 1 y de 1 a 0. Eso se llama cobertura de conmutación (o "toggle").

La verificación del diseño se ha vuelto cada vez más crítica a medida que los chips digitales se han vuelto más grandes y el costo de fabricación se ha vuelto más caro. Sí, el costo por transistor es menor ahora, pero el costo de la máscara del chip es mayor. Se les ha quitado la silla del rey a los diseñadores digitales y el grupo de verificación digital es el más grande en proyectos digitales modernos ahora. Si observa un chip Intel, el grupo más grande que trabaja en él sería el de verificación, seguido de los grupos de diseño e implementación física.

No he oído hablar de ningún proyecto retro FPGA que ejecute cobertura. Simplemente lleva demasiado tiempo hacer las cosas bien y para bloques pequeños puedes salirte con la tuya. Lo que eso significa es que la comunidad de usuarios realiza muchas pruebas, quienes cargarán el núcleo e informarán sobre los problemas. He intentado acercarme a mis proyectos FOSS lo más cerca posible de los flujos de trabajo estándar de la industria. Pero, solo hay tanto que un hombre puede hacer. Estoy muy contento de contar ahora con Samuel para mejorar la calidad del trabajo entregado. Sin embargo, ha sido mitad decepcionante, mitad tranquilizador, que a pesar de todas las nuevas pruebas escritas por Samuel para aumentar la cobertura, no se encontraron errores. No creo que pueda diseñar una CPU completa sin cometer un error, así que todavía espero que la próxima prueba que escribe Samuel encuentre un error.

En otros frentes, Gyurco encontró la conexión faltante en Out Run que impedía que se iniciara. Gyurco trabaja principalmente en la plataforma MiST y ha estado ayudando en momentos críticos desde que comencé a hacer núcleos. Estoy muy agradecido. Reanudaré el trabajo en el núcleo de Out Run.

El director Skutis terminó los esquemas de Insector X. Este juego se ejecuta en un hardware similar a Extermination, en el que Esperanza estaba trabajando antes de sus vacaciones (la extrañamos). He iniciado el núcleo FPGA para este hardware y veremos la primera beta la próxima semana, el 30 de septiembre. Skutis se está convirtiendo en un maestro en la extracción de esquemas de PCB y ha comenzado a usar las mismas herramientas que nosotros, para que podamos compartir información y ayudarnos mejor. Tiene una tubería bastante interesante de esquemas para mantenernos ocupados.

No ha habido ninguna actualización de firmware para Pocket, por lo que la situación allí no ha cambiado mucho. Todavía no podemos controlar los interruptores DIP de los juegos de arcade y lo he encontrado un poco inestable al iniciar juegos e intercambiar núcleos. Así que dudo un poco acerca de lanzar un núcleo para el firmware actual. Veamos si hay una actualización durante la próxima semana para que la versión beta número 30 también pueda incluir el Pocket.

Japanese

この 2 週間、Samuel はフルタイムで NGP CPU に取り組んできました。テストベンチの収束を確認するためにcoveredというFOSSツールを使ってもらいました。しかし、カバレッジとは何ですか?初期のデジタル エレクトロニクスでは、エンジニアはすべてのデジタル機能を手動で計算し、それらを実装するために個々の論理ゲート (AND、OR など) を選択する必要がありました。設計テストは、多くの場合、個別のロジックでその一部を構築し、実際の作業台でテストすることによって行われました。ヤマハのサウンドチップは、統合する前に個々のパーツを構築するこの段階を経ました。ヤマハの部品番号を調べると、YM2203 (すべての FM チップの父) の各部品が以前は個別のチップとして作成されていたことがわかります: フェーズ ジェネレーター、オペレーターなど。

コンピュータがエレクトロニクス設計に役立つようになるにつれて、業界のエンジニアは Verilog を使い始めました。 Verilog でデザインを作成することは、両方のタスクがテキスト ファイルで実行されるという点で、ソフトウェアを作成することに似ています。現在、ロジックの動作はコンピューターでシミュレートできるため、費用のかかる製造プロセスを経る前に、可能な限りテストすることが重要でした。デジタル デザイナーはテスト ベンチを書き始めました。しかし、テストが十分かどうかをどのように判断しますか?これに対する最初の答えはカバレッジでした。アイデアは、テストが実行したデザイン内のテキスト行をカウントすることです。たとえば、足し算と引き算ができる CPU を持っていて、足し算だけをテストした場合、カバレッジは低くなります。カバレッジ テストでは、欠落しているテストを示す減算コードが赤で強調表示されます。カバレッジ分析では、個々の信号も調べます。テストでは、デザインの各ビットを実行して、0 から 1、および 1 から 0 に遷移する必要があります。これは、トグル カバレッジと呼ばれます。

デジタル チップの大型化と製造コストの高騰に伴い、設計検証の重要性はますます高まっています。はい、トランジスタあたりのコストは小さくなりましたが、チップ マスクのコストは大きくなっています。デジタル デザイナーから王様の椅子が奪われ、デジタル検証グループは現在、現代のデジタル プロジェクトで最大のグループです。インテルのチップを見てみると、最大のグループは検証であり、その後に設計および物理実装グループが続きます。

カバレッジを実行しているレトロ FPGA プロジェクトについては聞いたことがありません。物事を正しく行うのに時間がかかりすぎて、小さなブロックの場合はそれなしで逃げることができます.つまり、コアをロードして問題を報告するユーザー コミュニティによって多くのテストが行​​われるということです。私は FOSS プロジェクトを業界標準のワークフローにできる限り近づけようと試みてきました。とはいえ、一人でできることは限られています。提供される仕事の質を向上させるために、今、Samuel を頼りにできることをとてもうれしく思います。それでも、Samuel がカバー範囲を拡大するために新しいテストをすべて作成したにもかかわらず、バグが見つからなかったということは、半分がっかりし、半分は心強いものでした。間違いなく完全な CPU を設計できるとは思わないので、Samuel が書いた次のテストでバグが見つかることを期待しています。

他の面では、Gyurco は Out Run の接続が失われ、起動できないことを発見しました。 Gyurco は主に MiST プラットフォームで作業しており、私がコアの作成を開始して以来、重要な時期に支援してきました。本当に感謝しています。 Out Runコアの作業を再開します。

Skutis ディレクターは、Insector X の回路図を完成させました。このゲームは、Esperanza が休暇前に取り組んでいた Extermination と同様のハードウェアで実行されます (彼女がいなくて寂しいです)。このハードウェアの FPGA コアを開始しました。来週の 9 月 30 日に最初のベータ版が公開されます。 Skutis は PCB 回路図の抽出の達人になりつつあり、彼は私たちと同じツールを使い始めたので、情報を共有し、お互いによりよく助け合うことができます。彼は非常に興味深い回路図のパイプラインを用意しており、私たちを忙しくさせています。

Pocket はファームウェアの更新がなかったので、状況はあまり変わっていません。アーケード ゲームの DIP スイッチはまだ制御できず、ゲームの開始時やコアの交換時に少し不安定であることがわかりました。そのため、現在のファームウェアのコアをリリースすることに少し躊躇しています。 30 番目のベータ版に Pocket も含めることができるように、来週中にアップデートがあるかどうか見てみましょう.

NeoGeo Pocket CPU: Test Coverage NeoGeo Pocket CPU: Test Coverage NeoGeo Pocket CPU: Test Coverage NeoGeo Pocket CPU: Test Coverage

Comments

Gracias por todo 🙂

Salvador Perugorria Lorente

I'm very grateful for the work that you do to preserve the past. Thank you to you and your crew.

4Slippy


More Creators