Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When quotation mask appears in the parameter lists, an Escape character is needed #3

Open
wyu0725 opened this issue Jan 5, 2021 · 0 comments

Comments

@wyu0725
Copy link

wyu0725 commented Jan 5, 2021

Hello. Nice plugin this is. It solves my problem for tb file generation. I find a bug when there are quotation marks in the parameter lists.
This happened when I created the tb for module like this
module some_mod #(
parameter IO_STANDARD = "LVCMOS33",
parameter IODELAY_GROUP_NAME = "BANKx_GROUP",
parameter MASTER = 1
)(
input clk
);
At line 184 in the instance.vim, command "vim.command('let @*= "%s"' % instance_snippet)" would fail due to the quotation marks. I added this judgement statements to the "parse_module_para(self)", and the problem solved.

par_val = line[line.find('=')+1:].replace(',', '').strip().rstrip()
if par_val.find('"') != -1:
par_val = par_val.replace('"','\"').strip()
para_dict['para_value'] = par_val

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant