berkeley-abc/abc

the command write_bench only write the internal nodes in the form of LUT instead of AND and NOT?

Hinataee opened this issue · 1 comments

I want to write a bench file with internal nodes in the form of AND and NOT. I use the command write_bench, but only get internal nodes in the form of LUT. Is there any other command I need to perform? or I should write program to process it by myself? the following is the commands that I have used:

abc 01> read adder_0.bench
abc 02> strash
abc 03> rewrite
Abc_NtkRewrite: success : 5; fail : 374
abc 03> write_bench test.bench

want:

62 = AND(0, 17)
63 = AND(441, 442)
64 = AND(13, 14)
65 = AND(443, 64)

actually get:

n96         = LUT 0x8 ( 0, 17 )
n97         = LUT 0x1 ( 15, 16 )
n98         = LUT 0x8 ( 13, 14 )
n99         = LUT 0x4 ( n97, n98 )

I suggest read the command line usage before using it:

abc 01> write_bench -h
usage: write_bench [-lh] 
                 writes the network in BENCH format
        -l     : toggle using LUTs in the output [default = yes]
        -h     : print the help massage
        file   : the name of the file to write (extension .bench)

You are using the default int Io_WriteBenchLut( Abc_Ntk_t * pNtk, char * FileName ); interface, but what you want is int Io_WriteBench( Abc_Ntk_t * pNtk, const char * FileName );. Enable -l and you'll get what you want.