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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:31:48+00:00 2026-05-24T08:31:48+00:00

Following up on this question about the difference between packed and unpacked vectors in

  • 0

Following up on this question about the difference between packed and unpacked vectors in SV, why would I ever want to use unpacked vectors?
Packed vectors have these advantages that unpacked vectors don’t have:

  • You can perform bit-wise operations on them
  • You can perform arithmetic operations on them
  • You can take slices of them
  • You can copy them as a whole vector
  • You can do anything you can with unpacked vectors (to the best of my knowledge)

What advantage do unpacked vectors have over packed vectors?

  • 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-24T08:31:48+00:00Added an answer on May 24, 2026 at 8:31 am

    There is another reason why I like to use unpacked. With unpacked, there is no temptation (and accidental possibility) of treating the whole array name as a variable, and make an erroneous assignment. There is also no possibility of bit-bleeding from one element to another, when you may be thinking you are accessing B bits of element N, but in reality you may be accessing K bits of element N and B-K bits of element N+-1..

    My philosophy is to keep only the things that belong together as a “unit of information” in the packed dimension. Everything else in the unpacked dimension. The default thinking should be unpacked, and pack only what you need to.

    For example, if I have 9 ports, each with 21 bits of information, I would like to declare it as :

    input logic [20:0] p1 [9];
    

    The 20:0 part constitutes a unit of information, assigned and sampled together (nominally). Splitting those bits apart will destroy the protocol or the character of the port. On the other hand, changing the number of ports from 9 to, say, 16, is not going to affect the nature of the information in each port, so the 9 ports really belong in the unpacked dimension in my mind.

    Hope that might give you a paradigm to think along… In this paradigm, you would be surprised how many things start to appear unpacked that you always thought were packed !!

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

Sidebar

Related Questions

I have a basic question about parsing expression trees. Is there a difference between
Following on from this question what would be the best way to write a
Following on from this question , I now want to know how to stop
Following on from this question I now have code that can attach to a
Following on from this question, what would be the best way to represent a
Following the directions at this question , I have some code running to extract
I am new to C programming, and have a question about the following couple
Following this question: Good crash reporting library in c# Is there any library like
Following up on this question, I'm working on a large Delphi 7 codebase which
Following up from this question: How can I unlock a file that is locked

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.