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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:49:21+00:00 2026-05-25T16:49:21+00:00

I have a 2 D matrix where each element should be 64 bit std_logic_vector.

  • 0

I have a 2 D matrix where each element should be 64 bit std_logic_vector.

Now I want to store certain values into the matrix as shown in the below manner. How do I do that?
For example:

type a is array (0 to 10,0 to 10) of std_logic_vector(63 downto 0);
signal a1: a;
a1(0,0) <= std_logic_vector( to_float64(12.23) );

Basically I dont know how to convert float64 to std_logic_vector.

I am using float_pkg library from ieee_proposed.

  • 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-05-25T16:49:21+00:00Added an answer on May 25, 2026 at 4:49 pm

    Why not do:

    type aftype is array (0 to 10,0 to 10) of float64;
    signal af: aftype;
    

    Then there’s no conversion.

    In terms of conversions, the to_float function requires a type to know how to format the real input:

    signal f : float64;
    f <= to_float(12.34, f);
    -- or
    af(0,0) <= to_float(12.34,f);
    

    If you must have a std_logic_vector, you can use to_std_logic_vector from the package (aliased to to_slv):

    a1(0,0) <= to_slv(to_float(12.34,f));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a float array in java and want to convert each element to
I have several blocks of the following code that each use there own matrix.
Have a matrix report now that has Position, Hours and Wages for a location
Possible Duplicate: How do I iterate through each element in an n-dimensional matrix in
I have a vector with int values like: v=[10,8,6] and what I want is
Very often I want to convert a list wherein each index has identical element
I need a matrix that holds only 1 or 0 for each element. What
I have 2 matrices A (nxm) and B (nxd) and want to multiply element-wise
I am trying to plot a matrix where each element is in one out
in this function i have a matrix of colors(each pixel can has a 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.