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

Is is possible to set generics of type "TIME"? #86

Closed
gunnarstjernberg opened this issue Nov 18, 2015 · 3 comments
Closed

Is is possible to set generics of type "TIME"? #86

gunnarstjernberg opened this issue Nov 18, 2015 · 3 comments

Comments

@gunnarstjernberg
Copy link

If I use a generic of type TIME in my testbench, it seems I cannot alter the value of said generic from the python script.

Example:

Defintiion at the TB top level design
g_clk_axi : TIME := 4 ns;

The python script statement:
tc_debug_0.set_generic("g_clk_axi", "4ns")

vsim message:

** Warning: (vsim-3351) Invalid value ""4ns"" for generic "g_clk_axi". Not using this value.

The normal vsim use would be -gg_clk_axi=4ns but as vuint parses the above to -gg_clk_axi="4ns" it does not work.

Is tere any other way of controlling the TIME generic?

@kraigher
Copy link
Collaborator

I can see if I can make it work. In the meantime you could make it a string generic and use time'value to convert to a time value in VHDL.

@gunnarstjernberg
Copy link
Author

Sounds good. I can us this work-around for the time being. Thanks!

@kraigher
Copy link
Collaborator

You should be able to set generics of type time now. Expect if you use GHDL.

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

2 participants