PyHDI / Pyverilog

Python-based Hardware Design Processing Toolkit for Verilog HDL
Apache License 2.0
640 stars 180 forks source link

How to append new assign to a module from verilog code? #94

Open zilongwang123 opened 3 years ago

zilongwang123 commented 3 years ago

I have a test.v as: ''' module top ( input CLK, input RST, input add, output [7:0] led );

assign led = 8;

endmodule '''

I want to add a 'assign led = add + RST;' before endmodule, What's the easiest way to do this?