Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of layout port check - checks pin position, shape, and label. #296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

d-m-bailey
Copy link
Contributor

Added a port check that verifies that all ports (pins and corresponding labels) in the golden user wrapper layout are present at the same positions in the user wrapper layout. The actual datatype - pin or label - is irrelevant; only the layer names are considered. Box shapes are pins and text are labels. Pins and labels in the user layout but not the golden layout are ignored; this allows internal user ports. Extra user ports in the interface area will be flagged in the XOR check.

This check is run after the XOR check.

Tested on

caravel_user_project (did not pass: see below. Passes independent check when internal ports are removed from golden wrapper.)
caravel_user_project_analog
openframe_timer_example
caravel_user_mini

The golden user_project_wrapper_empty.gds file in caravel has the internal power grid as pins. These are not required on the user project, so user_project_wrapper_empty.gds file should also be updated in the mpw_precheck docker container. See this PR.

Note that the golden layout is pulled from mpw_precheck/_default_content/gds for gf180mcu pdks and type mini but from caravel/gds for all others. Maybe this should be standardized. @jeffdi @DavidRLindley
The caravel directory used in mpw_precheck is currently part of the docker container that will need to be rebuilt.

The following error conditions were also tested independently (not as part of mpw_precheck).

  • Missing klayout layer file
  • No port layers in klayout layer file
  • Missing golden and/or user layout
  • No ports in golden or user layout
  • Multiple labels at same location and layer
  • Multiple labels on the same pin
  • Missing labels in user layout
  • Golden labels not in user layout (different or missing)
  • Golden pins not in user layout (moved or missing)

Sample errors while reading layout

29-Jan-2025 21:20:38 | ERROR   | Multiple text on layer met2 @(2392.690,3521.200). io_out[16] != io_out[16]x
29-Jan-2025 21:20:38 | ERROR   | Multiple text for met2 pin @(left=2717.170,bottom=3517.600). io_out[15]x != io_out[15]
29-Jan-2025 21:20:38 | INFO    | {{PORT CHECK UPDATE}} failed to complete. For details, see /home/user/2504/pin_check/logs/port_check.log
29-Jan-2025 21:20:38 | INFO    | Port Check Dirty

Sample errors when comparing layouts

29-Jan-2025 21:19:45 | ERROR   | missing port io_in[17] on met2 pin centered @(4298.700,7042.400) in user_project_wrapper of /home/user/2411/port_check_test/gds/user_project_wrapper.gds.
29-Jan-2025 21:19:45 | ERROR   | unlabeled port (expected analog_io[10]) on met2 pin centered @(4461.540,7042.400) in user_project_wrapper of /home/user/2411/port_check_test/gds/user_project_wrapper.gds.
29-Jan-2025 21:19:45 | ERROR   | unlabeled port (expected io_oeb[16]) on met2 pin centered @(4623.460,7042.400) in user_project_wrapper of /home/user/2411/port_check_test/gds/user_project_wrapper.gds.
29-Jan-2025 21:19:45 | ERROR   | incorrect port io_in[16 (expected io_in[16]) on met2 pin centered @(4948.220,7042.400) in user_project_wrapper of /home/user/2411/port_check_test/gds/user_project_wrapper.gds.
29-Jan-2025 21:19:45 | ERROR   | missing port analog_io[9] on met2 pin centered @(5110.140,7042.400) in user_project_wrapper of /home/user/2411/port_check_test/gds/user_project_wrapper.gds.
29-Jan-2025 21:19:45 | ERROR   | missing port io_out[15] on met2 pin centered @(5434.900,7042.400) in user_project_wrapper of /home/user/2411/port_check_test/gds/user_project_wrapper.gds.
29-Jan-2025 21:19:45 | INFO    | {{PORT CHECK UPDATE}} Total port differences: 6. For details, see /home/user/2504/pin_check/logs/port_check.log
29-Jan-2025 21:19:45 | INFO    | Port Check Dirty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant