A hint when writing multibit-components

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

A hint when writing multibit-components

twinklehood
I'm just saying this for the people with minimal scripting experience following this book.

If you wish to avoid writing stuff like
Not(a=in[0],out=out[0]);
Not(a=in[1],out=out[0]);
....
It's possible to do so fairly easily with a one-liner. I personally use perl for this, for a 16bit Not, I'd do something like:

$ perl -e 'for($i=0;$i<16;$i++){print("Not(a=in[$i],out=out[$i]);\n")}' > Not16.txt

And then copy/pasta from that file. I should say I'm using linux, the syntax may be a little bit different in Windows.

Cheers