Author Topic: VHDL question (solved)  (Read 1706 times)

0 Members and 3 Guests are viewing this topic.

Offline DagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
VHDL question (solved)
« on: October 24, 2015, 04:21:29 pm »
I have an entity with a generic of type natural. Then I have a function which takes a natural number as an argument and returns a natural number. I then try to create a variable in the entity with such as "variable foo : unsigned(my_function(my_generic) downto 0);" and modelsim will complain "no feasible subprogram found" about the my_function call. I pretty much also tried different types for the generic and function return type/argument etc. but no dice. This function works fine when called with for example some_other_variable'length but not with the generic.

What is happening?

Edit: Gah solved, I had an enumerated type the same name and I didn't realize this due to case insensitiveness...
« Last Edit: October 24, 2015, 04:23:19 pm by Dago »
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->