Extracting Memory from Images

This tutorial will show you how to extract the bit values from an image layer of memory blocks. You will learn how to setup the memory extraction, perform the memory extraction, manually edit uncertain bits, and export the results to an Excel file.

Adding Template Cells

  1. Open examples\Memory Extraction\Pix2Net.prj.

  2. Go to the Cell tab and click Add Cell.

    addcell

  3. In the Overlay window, click-and-drag in the upper left corner to create a cell around the block in the upper left corner.

    memoryblock

  4. Right-click on the new cell in the Project Cells window to bring up the context menu. Select Rename <cell> and rename the cell to Memory Block.

  5. Right-click on the cell again and select Electrical Properties. Change the cell’s type to ROM and click the Save button.

    electricalproperties

  6. Right-click in the Overlay window to bring up a context menu. Choose Selected Cell → Identify as Origin Block. This tells Pix2Net that this cell will act as the upper-left corner of the region of interest.

  7. Bring up the context menu again and choose Selected Cell → Identify as Contrast Block. This tells Pix2Net that this cell is a good template for the other blocks; it is neither extremely dark nor extremely bright. For this demo, we are able to use our origin block as our contrast block, but that will not always be the case.

  8. In the Overlay window, add a new cell around the first bit.

    firstbit

  9. In the Project Cells window, rename the new cell to Memory Bit.

  10. Select the Add Cell Instance tool.

    addcellinstance

  11. Add more Memory Bit instances by clicking on each bit. If you make a mistake, use the Move tool to move the instance into the correct place.

    memorybits

  12. Select the Select tool.

    select

  13. Click on a dark instance to select it. Right-click to bring up the context menu. Choose Selected Cell → Identify as 1-bit. Repeat the same process for a light instance, except choose Selected Cell → Identify as 0-bit. Pix2Net will use these templates to decide if a bit is a 0 or a 1.

    identifybit

Extracting Memory

  1. Go to the Image tab and click Extract Memory.

    extractmemory

  2. We need to fill out the dialog:

    • The first table in the dialog shows the cells we’ll be searching the images for (only cells of type ROM will be listed). The default Min Correlation of 80 is fine for this example.
    • Layer specifies the image layer to use. There is only one layer in the project, so this is an easy choice.
    • Block Labels specifies the label category to add our results to. Since this is the first time we’re doing an extraction, we have no choice but to create a new category.
    • Block Search Area is the width and height, in microns, of the search area. When the cell search starts, you will see a little red box that shows you where Pix2Net is looking for the next block. We are setting the width and height of that box here. We will use 80 and 15 microns.
    • Grid Size is the width and height of the region of interest, in terms of blocks. Our grid is 5 blocks wide and 17 blocks tall.
    • Block Focus Size is for bit identification. When Pix2Net is trying to determine if a bit is dark or light, it is using the intensity of the contrast block as a base line. However, the contrast block may have bad pixels around its edges. We’ll stick with the defaults, which means we’re telling Pix2Net to use the middle 80% of the contrast block when calculating the base line.
    • Bit Focus Size is for bit identification.
    • Bit Focus Weight is for bit identification.
    • To understand what Refine Block Locations does, you must understand the memory extraction process. First, Pix2Net will find all of the blocks along the edges of the region of interest. Then it will estimate where all of the inner blocks are by using interpolation. Refine Block Locations tells Pix2Net to improve on this interpolation by individually examining each block and adjusting its placement.
    • Identify Bits tells Pix2Net to perform bit identification after the blocks have been found.

    extractmemorydlg

  3. Press the Extract button to start extraction. After the process completes, you should see the detected bits:

    detectedbits

Editing Bits

  1. Go to the View tab and click Reports.

    reports

  2. A report of uncertain bits has been generated. Click on the report to see the list of potential problems.

    bitreport

  3. Click on a problem to go straight to the uncertain bit. If the bit is wrong, go to the Labels tab and click on Select Label.

    selectlabel

  4. Click on the bit label to select it. Click Edit Label, change the value to the correct value, and then click the Save button.

Exporting Bits

Note: This feature has been temporarily disabled.
  1. Go to the Image tab and click Export Bits.

    exportbits

  2. Set the filename to the desired location. Row Drift determines, going from left to right, how far two consecutive bits can differ vertically and still be in the same row. Let’s use a value of 500. Finally, leave the default values for Flip and Rotate, because we don’t want to flip or rotate the values.

    exportbitsdlg

  3. Click the Export button. A csv file will be generated, which can be opened in Excel.