Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Reasons behind limitations of unpacked arrays in Systemverilog

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,639
Helped
302
Reputation
606
Reaction score
297
Trophy points
1,363
Activity points
18,215
Hello,

Systemverilog unpacked arrays have quite a few limitations compared to packed arrays.
I especially don't understand why they weren't made to support arithmetic operations.
What's the driving motivation behind the limitations ?
 

dave_59

Advanced Member level 3
Joined
Dec 15, 2011
Messages
812
Helped
361
Reputation
726
Reaction score
354
Trophy points
1,353
Location
Fremont, CA, USA
Activity points
6,238
When compared to Verilog, unpacked arrays in SystemVerilog have much more functionality. Although Verilog allowed multiple unpacked dimensions, you could only access one element at a time; never the array as a whole. I think this was driven by the RTL synthesis that you cannot operate on memories as a whole in hardware.

SystemVerilog added the ability to pass whole arrays (or slices) through ports and as arguments to tasks and functions. This meant it also had to define array assignments, and comparison operations as well. There's no reason preventing further enhancements, but a few things I can think of are
  1. unpacked arrays have stronger types than packed arrays. It's much easier to pad and truncate packed integral values as needed for logical/arithmetic operations
  2. People were worried about generating to much hardware from simple expressions and not thinking the current state of RTL synthesis requires you to pipeline or multi-cycle the operations manually.
  3. Multi-dimensional array arithmetic has many more kinds of operations and we would have to introduce matrix algebra to become really practical.
 

    shaiko

    points: 2
    Helpful Answer Positive Rating
Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top