开发者

Extending Sugiyama's Layout Algorithm for block with more than one input

开发者 https://www.devze.com 2023-01-07 11:39 出处:网络
I\'m messing around with using Sugiyama\'s directed graph layout algorithm to generate nice plots o开发者_StackOverflowf verilog circuits. The problem I\'m having is that the layout algorithm assumes

I'm messing around with using Sugiyama's directed graph layout algorithm to generate nice plots o开发者_StackOverflowf verilog circuits. The problem I'm having is that the layout algorithm assumes that each block (or vertex) has only one input or output edge. But real circuits can have blocks that have multiple input and output connections, which ideally remain in a fixed order.

I was thinking of adding extra vertexes for each input, but somehow treating all the vertices connected to one block as a unit - in Python, something like [ [a.in], [b.in], [c.in1, c.in2] ] where c is a block with 2 inputs. The list would be flattened when building the connection matrices between layers.

Am I on the right track? Is there an easier way to do this? Can you point me to any resources which will help me extend Sugiyama's algorithm to deal with such blocks?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号