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

Request String Manipulation Support #74

Open
appwagner opened this issue Sep 22, 2017 · 0 comments
Open

Request String Manipulation Support #74

appwagner opened this issue Sep 22, 2017 · 0 comments

Comments

@appwagner
Copy link

Hi All,

I was wondering if it would be possible to add string manipulation support to admst ala, https://www.w3schools.com/xml/xsl_functions.asp . Specifically the substring and compare functions would be very useful. The context for my request is that I'm writing xml templates to translate Verilog arrays into std::vectors for a Verilog to SPICE translation. The problem I run into is that in an expression like

myvar = myarray[5];

myarray[5] has datatypename array with name myarray[5], its not a /module/variable with sizetype array. This makes finding the appropriate instance or model scope objects that reference myarray[5] challenging. If some string manipulation was supported it would be straight forward to remove the [5] from the datatypename and compare it to a list of model or instance variables in my model for appropriate translation. The code for adms is not that long and pretty clearly written, its not difficult to see that adding a new transform would involve declaring something like

static void Xmyxform (p_transform mytransform,p_admst dot,p_admst dotdot)

and writing in the appropriate manipulation. Unfortunately I lack a good understanding of the adms api (data structures ect.) so figuring how to do this completely on my own will take some time. If anyone can give me a little overview of the code, I think I could take it from there and would be happy to contribute to the project. Thanks very much for your help.

Cheers,

Andrew

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