Vlsir / Hdl21Schematics

Hdl21 Schematics
BSD 3-Clause "New" or "Revised" License
14 stars 2 forks source link

Complex Primitive Symbol Library with Restricted Hierarchy #36

Open curtisma opened 1 year ago

curtisma commented 1 year ago

I definitely agree that most of the time schematic Hierarchy is abused. In most cases you're better off writing HDL code. Especially if all your symbols are just the default square boxes with some pins.

However there are more circuits there are more basic building block circuits that require symbols that need to be used in other circuits.

The most important being an op-amp. Another example are basic logic gates and flip-flops. I'm sure we can come up with a short list of them.

These aren't primitives like the current symbols in your library, but they do have standard symbols. Their Implementation varies but their terminal characteristics are well understood.

I propose that we add these "complex primitive" symbols to the symbol library and then allow the user to define a mapping between these symbols and their schematic implementations in hdl21. This avoids the problem of communication seen with unrestricted Hierarchy but still enabling users to elegantly describe slightly more complicated circuits such as a bandgap containing an op-amp.