Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9185503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:17:35+00:00 2026-06-17T19:17:35+00:00

I wish to resize an entity port after a generic parameter in VHDL. Here’s

  • 0

I wish to resize an entity port after a generic parameter in VHDL.

Here’s my entity declaration :

library ieee;
use ieee.std_logic_1164.all;
use IEEE.math_real.all;
use ieee.numeric_std.all;

entity counter is
generic( 
    ticks   : natural := 10
);
port(
        clk : in  std_logic;
        f_v : in std_logic_vector(natural(FLOOR(LOG2(Real(ticks)))) downto 0); --forced value
        res : in std_logic;
          z : out std_logic_vector(natural(FLOOR(LOG2(Real(ticks)))) downto 0)
);
end counter;

More specificly, I want to size f_v and z after the function nest natural(FLOOR(LOG2(Real(ticks)))) when instantiating a counter entity.

The code compiles, but when I try to generate a symbol file, I got the following error messages :

Error (10017): Can't create symbol/include/instantiation/component file for entity "counter" because port "f_v" has an unsupported type    

Error (10017): Can't create symbol/include/instantiation/component file for entity "counter" because port "z" has an unsupported type

I am using Altera Quartus II 9.1 Web Edition.

How can I get this working?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:17:36+00:00Added an answer on June 17, 2026 at 7:17 pm

    This works for me using Quartus II 12.1 (full version). You should know right up front that when it comes to VHDL, there’s a difference between code that is valid and appears to be synthesizable, and code that your synthesis tool can actually understand. Such problems happen a lot with older tools and when you try to do something in a non-standard way or use features of the language that are not commonly used. In your case the tool is most likely having problems with the real type. I would recommend either:

    1. Upgrading to the newest version of Quartus II
    2. Passing the width of the ports as a generic instead
    3. Using your own log2 function from a library (this is what I do.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple 'bars' which I wish to resize and drag along a x-axis.
Actually I wish to do the Image Crop or Resize, etc with my picture
I wish to edit ini files over web server, decided to use django, been
I wish to get the server name and the current application's port on server
I'm using windows forms and listviewclass. I wish to lock possibility to resize columns
My end goal here is to resize the input image to 100px width, 125px
I wish to use the iBox plugin but I don't know how to: 1)
I wish to use Google custom search and in particular would like to have
I wish to make the uploaded file contents only viewable on the browser i.e
I wish to do this using only XAML - How to add an additional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.