GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - capablemonkey/odb-pp-parser: Parse ODB++ files and output JSON representation of layers and nets

BranchesTags
Open more actions menu

Latest commit

 

History

42 Commits
42 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
sample
sample
 
 
spec
spec
 
 
.gitignore
.gitignore
 
 
.rspec
.rspec
 
 
.travis.yml
.travis.yml
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
README.md
README.md
 
 
main.rb
main.rb
 
 

Repository files navigation

odb++ parser

Build Status

Parses odb++ files to give a human readable JSON representation of a board layer. Currently only parses features and netlist files.

Built against the ODB++ Format Specification Version 8.1 (Sept. 2015), available here: http://www.odb-sa.com/resources/

Getting started

You'll need Ruby 2.0+. Install dependencies:

bundle install

Output will be sent to stdout

Parsing the board

To parse the board:

ruby main.rb layer sample/features sample/netlist sample/components
{
  "nets": [],
  "components": [],
  "pads": []
}

Parsing features

To parse the sample/features file:

ruby main.rb features sample/features
{
  "pads": [
    {
      "id": "209",
      "symbol": {
        "type": "round",
        "diameter": "55"
      },
      "x": "1.59",
      "y": "0.1"
    },
    {
      "id": "312",
      "symbol": {
        "type": "oval",
        "width": "24",
        "height": "74"
      },
      "x": "1.64",
      "y": "0.66"
    },
    {
      "id": "346",
      "symbol": {
        "type": "square",
        "side": "70"
      },
      "x": "0.25425295",
      "y": "0.69755837"
    }
  ]
}

Parsing netlist

To parse the sample/netlist file:

ruby main.rb netlist sample/netlist
{
  "nets": [
    {
      "name": "GND",
      "points": [
        {
          "x": "1.72",
          "y": "0.56"
        },
        {
          "x": "1.14",
          "y": "0.41"
        },
        {
          "x": "1.59",
          "y": "0.1"
        },
        {
          "x": "1.64",
          "y": "0.56"
        },
        {
          "x": "1.64",
          "y": "0.51"
        },
        {
          "x": "0.2552531",
          "y": "0.2975584"
        },
        {
          "x": "1.2197234",
          "y": "0.4059187"
        },
        {
          "x": "1.5294807",
          "y": "0.1026173"
        }
      ]
    }
  ]
}

Parsing layer

This includes net information for each pad:

To parse the layer:

ruby main.rb layer sample/features sample/netlist
{
  "pads": [
    {
      "id": "90",
      "symbol": {
        "type": "round",
        "diameter": 55.0
      },
      "x": 1.94,
      "y": 0.36,
      "net": "+5V"
    },
    {
      "id": "96",
      "symbol": {
        "type": "round",
        "diameter": 55.0
      },
      "x": 1.52,
      "y": 0.56,
      "net": "+5V"
    },
    {
      "id": "100",
      "symbol": {
        "type": "round",
        "diameter": 55.0
      },
      "x": 1.41,
      "y": 0.1,
      "net": "+5V"
    }
  ]
}

Running tests

To run tests:

rspec

Abilities

Currently it can identify these entities:

Standard symbols

  • round
  • square
  • rectangle
  • oval

Features

  • pads
  • lines

Nets

  • net_name
  • serial_num

Net points

  • net_num
  • radius
  • x
  • y
  • side
  • w (optional)
  • h (optional)
  • epoint
  • exp

Components

  • CMP records (components)
  • PRP records (properties)
  • TOP records (toeprints)

About

Parse ODB++ files and output JSON representation of layers and nets

Resources

Readme
Activity

Stars

18 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.