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 8256129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:45:29+00:00 2026-06-08T01:45:29+00:00

I have a problem in giving initial value zero to a signal type of

  • 0

I have a problem in giving initial value zero to a signal type of matrix2D in VHDL. I defined it as follows:

type matrix2D is array (integer range <> , integer range <> ) of signed(2 downto 0);

and in my VHDL code for initial value I wrote:

process(matrix1, matrix2, s_out_adder)
  variable v_flipflop_adder: matrix2D(0 to 4, 0 to 4) :=((0 to 4),(others =>(others=>'0')));
begin   
....

But unfortunately it doesn’t work.

Does anyone know how I can define initial value zero for the matrix2D?

  • 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-08T01:45:32+00:00Added an answer on June 8, 2026 at 1:45 am

    Page 86 of my copy of Ashenden states

    We can also use aggregates to write multi-dimensional array values. In this case, we treat the array as though it were an array of arrays, writing an array aggregate for each of the leftmost index values first.

    This is what you need for your example:

    variable v_flipflop_adder_simple_init: matrix2D(0 to 4, 0 to 4) :=
           (others => (others => (others => '0')));
    

    Here’s a more complex one:

    variable v_flipflop_adder: matrix2D(0 to 4, 0 to 5) :=
           (      4 => (1 => "001", others => "101"),
             others => (5 => "110", others => "010"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with giving new char valure to array. I don't know why
I seem to stumble on problem after problem giving my entities behaviour. I have
The problem I have is that it is giving me a warning in mysqli
I have an anoying problem that is giving me a hard time these days...
I have a problem with OPT algorithm as valgrind is giving me error (Conditional
This problem is giving me a real headache. I have two tables in my
I have the very common problem of creating an index for an in-disk array
I have a problem with giving a template class a template friend in Sun
I have this problem with a tableview in iOS5 that is giving me errors,
I have problem on UNIX based systems sprintf does not round up properly value.

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.