Yu-Maryland / Gamora

Gamora: Graph Learning based Symbolic Reasoning for Large-Scale Boolean Networks (DAC'23)
Other
47 stars 4 forks source link

Ask for details about the data generation part of GAMORA #6

Open Jedges opened 3 months ago

Jedges commented 3 months ago

Hello author, I would like to ask whether it is possible to export the generated AIG and the labels in the GAMORA task correspond to the nodes in the AIG when generating multipliers of different bit widths through abc, because the graph structure currently generated does not contain NOT nodes, and I need this information. At the same time, how is the node encoding performed after Technology Mapping, because I noticed that in the corresponding node-feat.csv file, the dimension of the node encoding is no longer a simple 3 dimensions.

Jedges commented 3 months ago

Also note that in the code provided, the implementation for generating the booth multiplier is TBD, so how can I generate a booth multiplier like the one in your dataset through abc?

ycunxi commented 2 months ago

Also note that in the code provided, the implementation for generating the booth multiplier is TBD, so how can I generate a booth multiplier like the one in your dataset through abc?

You will see booth.bar in this link. The booth multiplier datasets have been released. Regarding generation, you can check ABC to modify the command to generate booth encoded multiplier, or directly load Booth multipliers (readable by abc of course).

https://huggingface.co/datasets/yucx0626/Gamora-CSA-Multiplier

ycunxi commented 2 months ago

Hello author, I would like to ask whether it is possible to export the generated AIG and the labels in the GAMORA task correspond to the nodes in the AIG when generating multipliers of different bit widths through abc, because the graph structure currently generated does not contain NOT nodes, and I need this information. At the same time, how is the node encoding performed after Technology Mapping, because I noticed that in the corresponding node-feat.csv file, the dimension of the node encoding is no longer a simple 3 dimensions.

A simple method would be just convert the AIG into a AND-NOT network at the edgelist level. You can try networkx which should do the job.

lydiawunan commented 2 months ago
  1. Regarding getting the NOT node information, I would recommend reconstructing the network based on node features and the edge list.
  2. Due to some engineering issues, the current node features have 4 dimensions, but the first two are duplicated, making it 3 unique features. The first two dimensions indicate whether the node is PI/PO or intermediate. The third and fourth dimensions indicate whether the input to this node is negated or not.
  3. We generate Booth multipliers manually. Here is an example of how to generate it.
    • First, write the verilog file "mult8.v" of a multiplier:
      
       module comp (a,b,c);
           input wire [7:0] a, b;
           output wire [15:0] z;
           assign z = a * b;
       endmodule
    • Second, use abc to generate the "booth_mult8.blif" file
      ./abc -c "%read mult8.v;%blast -b;&put;ps;write booth_mult8.blif;"
    • Third, use python script to generate the dataset
      python ABC_dataset_generation_map.py --datagen 2 --designfile booth_mult8
Jedges commented 2 months ago

Thanks very much for your reply. I will carry out the next experiment according to your suggestion.