Designing circuit like code? - Page 1
Forum section: electronics / general

author: ix4r
author_rank: Newbie
timestamp: July 24, 2019, 04:14:21 pm
content: Hi,I've been looking around for options to design circuits like you write code, with no success so far.Maybe I am not looking in the right place (or with the wrong keywords), so I'd thought I'd ask here if you had any pointers and even experience in doing so.FTR I have used Eagle and KiCad so far in my designs, and I realize part of the design will require using similar tools to layout the PCB, I would like to avoid it in the early stages.I have also played with netlist, but it's not a viable "language", I'm looking for something higher level, kind of something bridging Verilog and circuit designs.Cheers,Ix4r

author: Bassman59
author_rank: Super Contributor
timestamp: July 24, 2019, 04:35:17 pm
content: Quote from: ix4r on July 24, 2019, 04:14:21 pmSkidlcomes to mind. I have zero experience with it.(NB: we did this at a previous employer. It has its good points and not-so-good points. Design entry used a custom language and back-end processing, not Python, which didn't exist then.)

author: techman-001
author_rank: Frequent Contributor
timestamp: July 25, 2019, 02:18:36 am
content: Quote from: ix4r on July 24, 2019, 04:14:21 pm"parametric" may be a useful term in your search.

author: hendorog
author_rank: Super Contributor
timestamp: July 25, 2019, 03:13:31 am
content: Quote from: Bassman59 on July 24, 2019, 04:35:17 pmSeconded, skidl is pretty awesome.

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: July 25, 2019, 03:39:49 am
content: Quote from: ix4r on July 24, 2019, 04:14:21 pmSearch for "functional hardware languages" or "hardware description languages".https://www.hindawi.com/journals/isrn/2012/271836https://en.wikipedia.org/wiki/Hardware_description_language

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 25, 2019, 08:07:45 am
content: Believe I've heard of HDLs that include analog, however, I'm not aware of any that include analogsynthesisas an output.It should still be possible -- standard building blocks and design methodologies can be applied with a number of analog elements, and post-synthesis optimizations could be applied to reduce the number of elements (e.g. transistors) required. The search space is still very large though, especially if reduced to the individual transistor level. It may simply be the case that there is insufficient economic value in solving this problem, whereas using more conventional design methods (ADC, DAC, sea of gates, digital synthesis) happens to be more economical, despite its gross inefficiency in terms of active devices (10x+ more transistors than might otherwise be needed).Tim

author: tggzzz
author_rank: Super Contributor
timestamp: July 25, 2019, 08:26:27 am
content: Quote from: ix4r on July 24, 2019, 04:14:21 pmThe two are completely different, so looking for such options is like looking for options to ride a horse like you drive a car, or options to insert a screw like you insert a nail.Understand the differences, then you will be able to select the appropriate tool for the job.

author: ix4r
author_rank: Newbie
timestamp: July 25, 2019, 11:25:44 am
content: skidl is exactly what I was looking for!Thanks to all of you for your help.I should have asked earlier

author: Bassman59
author_rank: Super Contributor
timestamp: July 26, 2019, 07:13:57 pm
content: Quote from: T3sl4co1l on July 25, 2019, 08:07:45 amYeah, that's not what's being asked for.What he wants is a text-based design entry method. Instead of placing resistor and op-amp symbols on a pictorial schematic and drawing lines between them, he wants to instantiate resistor and op-amp things in a text file, and the connection between them is specified by net names on port lists.Consider that it's VHDL with entity instantiations and signals connecting between the ports. The entities have useful information, mainly the footprint, but perhaps other stuff useful for BOMs such as manufacturer name and part number.A tool is used to parse the file and generate a netlist in the Kicad PCB format.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 26, 2019, 07:28:57 pm
content: Right, just boring old netlists have been around for, heh, probably half a century I would suppose. There are as many formats as there are PCB tools, but aside from formatting, they're usually something along the lines of:<part name> <node 1> [<node 2> [<node 3> [...]]] <model> [<parameters...>]For SPICE, the first letter of the part name identifies the type of part, but a PCB entry netlist probably doesn't need that.PCB netlists are most likely flattened? SPICE netlists for example can be hierarchical.SKiDL looks like basically this kind of netlist, if I understand correctly. That would be sort of the hardware equivalent of assembly code, I would say? More specifically, a macro assembler, so you can set directives and instantiate subcircuits.If that's good enough "programming", there you go; but if you're looking for something higher level, equivalent to say, C or VHDL, that's where you'll have a harder time.Cheers,Tim

author: hendorog
author_rank: Super Contributor
timestamp: July 27, 2019, 08:44:40 am
content: Quote from: T3sl4co1l on July 26, 2019, 07:28:57 pmSkidl is a netlist generator. Just like a Schematic Editor GUI is a netlist generator.However the Schematic editor GUI is a static generator, whereas Skidl can be dynamic.Skidl can generator hierarchial netlists apparently, but personally I haven't got that far yet.Not sure why you have gone 'assembler'. Just call it what it is. Its just a library which makes building netlists easier.The downside of skidl is that you don't get a schematic - unless you go and draw it manually from the netlist.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 28, 2019, 04:41:54 pm
content: For those interested in the topic, there have been a couple other threads already talking about it. Just look up "skidl" in the whole EEVBlog forum, as I think it was mentioned in all of these.We talked about the benefits of a schematic-less design entry tool, the usual/potential pitfalls, the possibility of generating schematics from them, etc.Not spoiling, but I'll just say that such a tool can (and should if you want something usable) be much more than just hand-written netlists.