Skip to content

Additional Brainstrom

Andrew M. Keller edited this page Sep 21, 2020 · 1 revision

Tools Brainstorm:

We need the tools to support multiple languages. I want the tools to be so clean, so simple, so pure. But the challenge is that the tools are trying to do something involved, and that takes time and complexity. Now if I were to boil down some of the number one things that I would like to see in the tools, I would say "simplification". Make the tools more simple and easier for the user to use. Imagine that You hold in your hands a netlist that you want to work on.

Step 1)

Make parsing easy - We have done this. We need to add support for structural verilog.

# This command parses a netlist and loads it into memory. It automatically decided which parser to use based on the file name.
>>> netlist = sdn.parse("name-of-netlist-to-parse.edf.v.vhd.vo.vho.bla")

Step 2)

Make queries easy - We have mostly done this, but it would be good to revisit this and tighten it down a bit.

Scope of names and what that looks like. You could imagine that netlist.libraries['NAME OF LIBRARY']. Do we include EDIF.idenfier?

should they return lists?

  • sdn.get_netlists
  • sdn.get_libraries
  • sdn.get_definitions
  • sdn.get_ports
  • sdn.get_pins
  • sdn.get_cables
  • sdn.get_wires
  • sdn.get_instances

Hierchical refernces Absolute vs. Relative?

  • sdn.get_hinstances

  • sdn.get_hports

  • sdn.get_hpins

  • sdn.get_hcables

  • sdn.get_hwires

  • netlist.libraries

  • netlist.top_instance

  • netlist.name

  • library.netlist

  • library.definitions

  • library.name

  • definition.library

  • definition.references

  • definition.ports

  • definition.cables

  • definition.children

  • definition.name

  • definition.is_leaf()

  • port.definition

  • port.pins

  • port.name

  • port.direction

  • port.is_array

  • port.is_downto

  • port.is_scalar

  • port.lower_index

  • inner_pin.port

  • inner_pin.wire

  • cable.definition

  • cable.wires

  • cable.name

  • cable.is_array

  • cable.is_downto

  • cable.is_scalar

  • cable.lower_index

  • wire.cable

  • wire.pins

  • instance.parent

  • instance.reference

  • instance.pins

  • instance.name

  • outer_pin.instance

  • outer_pin.inner_pin

Step 3)

Make creation easy

  • sdn.Netlist()

  • sdn.Library()

  • sdn.Definition()

  • sdn.Port()

  • sdn.InnerPin()

  • sdn.Cable()

  • sdn.Wire()

  • sdn.Instance()

  • sdn.OuterPin()

  • netlist.create_library

  • netlist.add_library

  • library.create_definition

  • library.add_defintion

  • definition.create_port

  • definition.add_port

  • definition.create_cable

  • definition.add_cable

  • definition.create_child?

  • definition.add_child

  • port.create_pin

  • port.create_pins

  • port.add_pin

  • cable.create_wire

  • cable.create_wires

  • cable.add_wire

  • wire.connect_pins

  • instance.reference = (manages outer_pins based on reference)

Step 4)

Make distruction easy

  • netlist.remove_library

  • netlist.remove_libraries_from

  • library.remove_definition

  • library.remove_definitions_from

  • definition.remove_port # Will disconnect any connections to ports on references

  • definition.remove_ports_from # Same as above

  • definition.remove_cable

  • definition.remove_cables_from

  • definition.remove_child

  • definition.remove_children_from

  • port.remove_pin # Same as above

  • port.remove_pins_from # Same as above

  • cable.remove_wire

  • cable.remove_wires_from

step 5)

Make modification easy

  • netlist.libraries = Itterator of different order

  • library.definitions = Iterator of different order

  • definition.ports = Iterator of different order

  • definition.cables = Iterator of different order

  • definition.children = Iterator of different order

  • port.pins = Iterator of different order

  • cable.wires = Iterator of different order

  • wire.pins = Iterator of different order

Step 6)

Make higher-level function/application easy

  • clone

  • uniquify

  • flatten

  • NMR

  • organ_insertion

  • network_insertion

Step 7)

Refine, tighten, test, prove.

Ongoing discussion:

  • Plugin framework
  • Netlist managers (who manages the EDIF namespace? is that in the core or is that only parse/composer or is that it's own thing (a sweet plug in that does it all in the background))?
  • Support alias?

Step 8)

  • Added functionality
  • other voter insertion algorithms
  • other voter insertion patterns (domain specfic, outside of feedback loops).
  • Device families and resource utilization?
  • Primitive library support <- (parse verilog)?
  • Supporting connectors
  • Supporting inline inverters or logical nots.
  • Support VQM for Intel
  • Support for logging at debug up to fatal level.
  • Better management of errors.

Step 9)

Optimize for performance

  • Pulling constructs down to c++
  • pull parsing into c++
  • pull data structure into c++

Other

Using properties to shortcut to python properteis on objects.

Study verific documentation.

Simplify hierarchical references.

Add some shortcuts to the API:

  • wire_index = wire.cable.wires.index(wire)

  • wire_index = wire.index

  • [get_property INDEX wire]

  • wire['INDEX']

  • is_flat = instance.reference.is_flat()

  • is_flat = href.item.reference.is_flat()

  • instance.is_flat

  • href.item.reference

  • href.reference

  • href.parent

  • sdn.get_hinstances(href.item.parent)

for example definition.create_child(name=, reference=, properties={'INIT':'16'hsadf'})

Name of inner vs outer pins, confusing when you think about direction of ports.

callback framework:

  • callbacks within callbacks
  • callback depenedcyies (

Logging

Error handling

simple reports on the number of primitive objects in the dessing

load netlist view composition

Dont replicat these...

filters

Naming EDIF.identifer

Do we want to lock names down?

Possible change release for 2.0?