Skip to main content

A Cross-Language Interchange Format for Hardware Description Based on JSON

Project description

BLADE


DesignFormat

DesignFormat is a file format for storing fully expanded, hiearchical design data. It is uses JSON as a storage format as many languages offer native and relatively performant JSON parsers - making it easy to share data between different environments. DesignFormat is intended to be used as the interchange format between different tools, eliminating the need for multiple tools to parse the source data - which can introduce inconsistencies and errors.

Types

  • DFBase: Base class, provides every other object with an ID, a description, and a map of arbitrary attributes (for passing options).
  • DFDefine: Defines a named constant value related to the design.
  • DFBlob: Can carry an arbitrary number of DesignFormat nodes of different types.
  • DFProject: The root node exported to file. Provides interconnect and constant definitions, and holds the root blocks defined in the project.
  • DFInterconnect & DFInterconnectComponent: Represents a connection type, comprised of components which can either be complex (other DFInterconnect instances) or simple (wire connections with a specified width and direction).
  • DFBlock: Represents a block in the design hierarchy with ports, connections, and child blocks. It can also hold a register interface definition.
  • DFPort: Represents a port on a block, with a specified direction (input or output) and a type (referencing a DFInterconnect type).
  • DFConstantTie: A point that can be connected to an input port to hold it at a constant value.
  • DFConnection: Defines a connection between two points (either two ports, or a contant tie and a port).
  • DFRegister: Represents a register with an address, access modes, and a set of fields.
  • DFRegisterField: Represents a single field within the register with a name, a width and a reset value.

Using the Javascript library

Loading a DFProject

const df_models = require('./javascript/df_models.js');
const fs        = require('fs');

let data    = JSON.parse(fs.readFileSync('./my_file.df_project').toString());
let project = (new df_models.DFProject()).loadObject(data);

Loading a DFBlob

const df_models = require('./javascript/df_models.js');
const fs        = require('fs');

let data    = JSON.parse(fs.readFileSync('./my_file.df_blob').toString());
let project = (new df_models.DFBlob()).loadObject(data);

Using the Python library

Loading a DFProject

from df_models import DFProject
import json

project = None
with open('./my_file.df_project', 'r') as fh:
    project = DFProject().loadObject(json.load(fh))

Loading a DFBlob

from df_models import DFBlob
import json

project = None
with open('./my_file.df_blob', 'r') as fh:
    project = DFBlob().loadObject(json.load(fh))

Generating Documentation

System Requirements

The following dependencies are not mandatory, but are required for building the documentation:

$> pip install sphinx recommonmark sphinx-markdown-tables sphinx-rtd-theme sphinx-js
$> npm install -g jsdoc

Building the Documentation

To build the documentation, open this directory in a terminal and execute:

$> make build

HTML documentation will be generated under documentation/build/html.

Project details


Release history Release notifications | RSS feed

This version

1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

designformat-1.3.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

designformat-1.3-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

Details for the file designformat-1.3.tar.gz.

File metadata

  • Download URL: designformat-1.3.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4

File hashes

Hashes for designformat-1.3.tar.gz
Algorithm Hash digest
SHA256 c231ca297f329f8da1f28a29eb2f717e066a1cfc4c7db59ac12c76ef7da586da
MD5 0762de1bd0dfb5afe78b9cdb4956bb3d
BLAKE2b-256 f3d1348099536eb159400ad94b5be03fcff33dcb4ac198cd3cb1f6db5686475e

See more details on using hashes here.

File details

Details for the file designformat-1.3-py3-none-any.whl.

File metadata

  • Download URL: designformat-1.3-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4

File hashes

Hashes for designformat-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d42cb5e36fd73ea0e1e733f047fb1f00f7ee4bd464da8cad27991f90aa602515
MD5 ecba13ce4152586658b6b0b2bf3ba531
BLAKE2b-256 9a152db02ed5f1f10b93f829fa2e05c97897508a73ac43880080f4a3e8ed6ae7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page