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

  • SEARCH
  • Home
  • 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 8938959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:44:25+00:00 2026-06-15T10:44:25+00:00

I am writing a VHDL program on quartus II for a CYCLONE III EP3C25

  • 0

I am writing a VHDL program on quartus II for a CYCLONE III EP3C25 FPGA and I got an issue.

Here are the important part of my program:

odata : out std_logic_vector(15 downto 0);

signal buf_data : std_logic_vector(255 downto 0);

signal nb_word : integer :=0;

Process(clk,RST)
begin
    if(RST='0') then
        nb_word<=0;
    elsif(clk'event and clk='0') then
        if(Current_state_w=s2) then
            if(nb_word<=X"F0") then
                nb_word<=nb_word+16;
            else
                nb_word<=0;
            end if;
        end if;
    end if;
end process;

Process(clk,RST)

begin
    if(RST='0') then
        odata<=(OTHERS=>'0');
    elsif(clk'event and clk='0') then
            odata<=buf_data(nb_word+15 downto nb_word);
    end if;
end process;

This code is compiling fine but does not do what I want then I just wanted to change :

odata<=buf_data(nb_word+15 downto nb_word);

in

odata<=buf_data(nb_word downto nb_word-15);

And I changed the initialisation and reset value of nb_word at 15 instead of 0.

The problem is, when I do that and I try compiling I got this error:

Error (10779): VHDL error at VL_control.vhd(99): expression is not constant

The line corresponds to the changement of the odata line.

I really can’t understand why I got this error. Why is it possible to do an addition and not a substraction?
I also tried to define another signal and to do the substraction in the signal before addressing the buffer like that:

nb_word1 := (nb_word-15);
odata<=buf_data(nb_word downto nb_word1);

But I still get the same error. Where does that come from?????

  • 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-15T10:44:26+00:00Added an answer on June 15, 2026 at 10:44 am

    You should limit nb_word to an integer range, that way the sythesis tool knows for sure that the value of nb_word - 15 can not be negative.

    Also, why do you compare an integer to a bit string literal? Why not just say if nb_word < 15?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Writing a python program, and I came up with this error while using the
Writing a program in which I need to split strings from a struct linked
Writing a simple program that will find exact duplicate files on my computer, but
I have made this VHDL code for writing to a USB-chip. It all runs
Writing a file utility to strip out all non-ASCII characters from files. I have
writing a basic math program to help me understand python math calculation. if I
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
Writing some XML documentation for a predicate helper class. But I can't figure out
Writing a program for a project. I need to use a ListSelectionListener in order
I am writing a VHDL process that needs to compare an input value to

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.