[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing Things (was Re: [f-cpu] Re: FC0 XBAR)



Hi,

you forgot to write where to fetch the tool, which operating
system it's running on and if it is PD. ;-)

JG

On Mon, 6 Aug 2001, Andreas Romeyke wrote:
> There is a tool called "graphviz" to draw in an easy way things like FSM,
> trees, flows and so on. (you are 100x faster than previous computer
> drawing ;-))
> 
> It uses a C-like (or tcl-like) syntax and places nodes and connections
> automatically in a right way.
> 
> There are two subtools, "dot" - to draw directed graphs (trees, or
> FMS) and "neato" - to draw undirected graphs and weight them automatically
> 
> These are very useful to make complex things easier to understand.
> 
> Here a simple example (that draws a FSM-graph of a 2bit-counter):
> 
> digraph zaehler {
> 	//     0 / 1
> 	// E0: counter start/stop
> 	// in future: E2: ring/saturate
> 	// E1: forewards/backwards
> 	
> 	// creating nodes 
> 	n1 [label="0"];
> 	n2 [label="1"];
> 	n3 [label="2"];
> 	n4 [label="3"];
> 	
> 	// forwards
> 	n1 -> n2 [label="E0=1\nE1=0"];
> 	n2 -> n3 [label="E0=1\nE1=0"];
> 	n3 -> n4 [label="E0=1\nE1=0"];
> 	n4 -> n1 [label="E0=1\nE1=0"];
> 	
> 	// backwards
> 	n1 -> n4 [label="E0=1\nE1=1"];
> 	n2 -> n1 [label="E0=1\nE1=1"];
> 	n3 -> n2 [label="E0=1\nE1=1"];
> 	n4 -> n3 [label="E0=1\nE1=1"];
> 
> 	//  E0 = 0, stop
> 	n1 -> n1 [label="E0=0"];
> 	n2 -> n2 [label="E0=0"];
> 	n3 -> n3 [label="E0=0"];
> 	n4 -> n4 [label="E0=0"];	
> }
> 
> If you want the graph as GIF or PS, do this:
> 
> dot -Tps counter.dot > counter.ps
> 
> or
> 
> dot -Tgif counter.dot > counter.gif
> 
> I hope that would help...
> 
> Bye Andreas

*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/