Attached are the input and output files, both in text format. The conversion logic is as follows:
These set of statements will get converted to one statement, which I have stated below.
assign n70 = n52 & G4gat;
assign n71 = G4gat & keyinput0;
assign n72 = n52 & keyinput0;
assign n73 = n70 | n71;
assign n74 = n73 | n72;
BASIC_1 dummy_0(.A (n52), .B (G4gat), .C (keyinput0), .Y(n74));
The general format is: BASIC_1 dummy_0(.A (a), .B (b), .C (c), .Y(y));
a & b will get the values from the RHS of line 1 (n52 & G4gat)
c will get value from the extreme rightmost data of line 2/line 3 (keyinput0)
y will get the value after the assign statement of line 5 (n74)
dummy_0 will be incremented to dummy_1 and dummy_2 on subsequent conversions.
if conversion is correct, this should be the answer: BASIC_1 satwik_0(.A (n52), .B (G4gat), .C (keyinput0), .Y(n74));
Also these 5 lines should be REPLACED by this line.
A general automation is required such that statements appearing in a text file are replaced. Normally 8,16,32,64 or 128 instances can be found in a given text file.