Author Topic: Designing circuit like code?  (Read 2078 times)

0 Members and 1 Guest are viewing this topic.

Offline ix4rTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Designing circuit like code?
« on: July 24, 2019, 04:14:21 pm »
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
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Designing circuit like code?
« Reply #1 on: July 24, 2019, 04:35:17 pm »
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.

Skidl comes 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.)
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Designing circuit like code?
« Reply #2 on: July 25, 2019, 02:18:36 am »
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

"parametric" may be a useful term in your search.
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1627
  • Country: nz
Re: Designing circuit like code?
« Reply #3 on: July 25, 2019, 03:13:31 am »
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.

Skidl comes 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.)

Seconded, skidl is pretty awesome.
 

Offline thermistor-guy

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: au
Re: Designing circuit like code?
« Reply #4 on: July 25, 2019, 03:39:49 am »
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.
...

Search for "functional hardware languages" or "hardware description languages".

https://www.hindawi.com/journals/isrn/2012/271836
https://en.wikipedia.org/wiki/Hardware_description_language
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22368
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Designing circuit like code?
« Reply #5 on: July 25, 2019, 08:07:45 am »
Believe I've heard of HDLs that include analog, however, I'm not aware of any that include analog synthesis as 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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20517
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Designing circuit like code?
« Reply #6 on: July 25, 2019, 08:26:27 am »
I've been looking around for options to design circuits like you write code, with no success so far.

The 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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline ix4rTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: Designing circuit like code?
« Reply #7 on: July 25, 2019, 11:25:44 am »
skidl is exactly what I was looking for!

Thanks to all of you for your help.
I should have asked earlier ;)
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Designing circuit like code?
« Reply #8 on: July 26, 2019, 07:13:57 pm »
Believe I've heard of HDLs that include analog, however, I'm not aware of any that include analog synthesis as 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

Yeah, 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.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22368
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Designing circuit like code?
« Reply #9 on: July 26, 2019, 07:28:57 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1627
  • Country: nz
Re: Designing circuit like code?
« Reply #10 on: July 27, 2019, 08:44:40 am »
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

Skidl 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.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15260
  • Country: fr
Re: Designing circuit like code?
« Reply #11 on: July 28, 2019, 04:41:54 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf