1

There are several graph and circuit tools to draw, but I was unable to use them to do what I will describe below:

Suppose I have a block with three inputs and two outputs. I'd like to draw a rectangle with three dots on the left face and two dots on the right face. Each dots is an input or an output, depends on the side.

I'd like to connect blocks using scripts. Suppose a pseudo code like that:

block FA { a input, b input, cin input, s output, cout output }
logic_and and1 { a input, b input, o output }
logic_not not1 { a input, o output }
arrow a1 {and1.o , FA.a }
arrow a2 {FA.s, not1.a }

And as output I get an image like this:

Example of blocks connection

yED is fantastic, as well as Graphviz, but I couldn't create my own "link points" to connect the edges exactly where I want to.

I need a way to generate the script using the language that you advise me, then draw it.

I have very large circuits to draw and this task is unfeasible to be done by hand. I prefer to build a converter than draw more than eight thousand circuits. :-)

I hope someone can help me.

elmaia
  • 11
  • 1
  • Have you looked at verilog or VHDL hardware description languages? IDE's like Vivado from xilinx allow you to describe a digital circuit using the HDL languages. You can generate the equivalent schematic from it, if you want. Beside you can give input and check outputs, in other words simulate the circuit. – ajit Aug 01 '20 at 09:22

1 Answers1

0

dpic is a variant of the pic language. The dpic developer has created a set of M4 macros aimed at EEs. I don't use dpic for that purpose, so I can't vouch that it will do what you want, but I think it is worth a look.
http://mirror.utexas.edu/ctan/graphics/circuit_macros/doc/Circuit_macros.pdf
https://ece.uwaterloo.ca/~aplevich/dpic/dpic-doc.pdf

sroush
  • 5,375
  • 2
  • 5
  • 11