I am writing a verilogams module to be used in my spectre sims. When this module is instantiated in my schematic, it needs to take in a path to a pwl file as a parameter input to the verilogams instance and then incorporate this filename as the file type for the "vsource" instance defined inside the verilogams module. In short, this is something I want to do(syntax is incorrect) :
parameter filename = "/projects/test.pwl";
vsource #(.type("pwl"),.file(filename)) V1(p,n);
I want to specify the particular pwl file to be used from the schematic and not by changing the verilogams code of the module. Any suggestions/comments will be greatly appreciated ?