Skip to main content
10 events
when toggle format what by license comment
Nov 3, 2015 at 15:39 comment added andrsmllr Be aware that you are using VHDL-1993. Some things which don't work with VHDL-1993 may very well be improved in VHDL-2002 or VHDL-2008. Sadly enough, VHDL-2008 is not supported very well by most vendors (Xilinx, Altera, ..). I'm not sure however, if this problem persists in VHDL-200X. At least with Xilinx ISE/Vivado I think the way you assign the port is demoted to a warning.
Nov 3, 2015 at 15:13 comment added user8469759 Yeah i'm freaking out for god sake, it's terrible to debug the vhdl code. So was at least my explanation correct?
Nov 3, 2015 at 15:09 comment added andrsmllr Also you answered your question yourself: — The name is an indexed name whose prefix is a locally static name, and every expression that appears as part of the name is a locally static expression. Since m is not locally static the whole expression e.g. x(m - 2 downto 0) is not a locally static expression, thus the error. Another work around that should fix this is to declare a constant which is assigned the generic m. This constant can then be used in a locally static expression.
Nov 3, 2015 at 14:57 comment added andrsmllr Great! Requiring work arounds like this is why VHDL is said to be verbose ;-)
Nov 3, 2015 at 14:33 comment added user8469759 Since the problem arises with the port map, i solved by declaring a signal x_loc, with the desired mapping, and then port the x in componentEntity into x_loc, so i avoided the problem. I was hoping in something shorter... but it's fine.
Nov 3, 2015 at 14:32 comment added user8469759 Your last statement doesn't work too (because the expression isn't a locally static name). Locally static name means that the name is a simple name, indexed name or selected name that does involves a static evaluation, locally means that the evaluation depends from the current entity. I had two problem in my code, the first was the wrong use of the generic, which wasn't visible as you pointed out, the second is the the parameter m depends from the top entity, so the expression is globally static instead of local.
Nov 3, 2015 at 13:25 comment added user8469759 But what's the problem in the updated version?
Nov 3, 2015 at 13:21 comment added andrsmllr Oh ok. You could change the port assignment to port map( x => "0" & x(m-2 downto 0) );.
Nov 3, 2015 at 13:08 comment added user8469759 I did as you told me, a new error just came out, see the update.
Nov 3, 2015 at 13:04 history answered andrsmllr CC BY-SA 3.0