Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[SOLVED] Reduction operator on a multi dimension vector

Status
Not open for further replies.

rahdirs

Advanced Member level 1
Joined
May 22, 2013
Messages
424
Helped
93
Reputation
192
Reaction score
91
Trophy points
1,308
Location
Mordor
Activity points
4,492
Hi,

I had a basic question, as in what would be the dimension of the o/p after performing a reduction operator on a multidimension vector ?

Sippose I have a vector,


Code Verilog - [expand]
1
logic [1:0] test [5:0];



Would |test give a 2 bit o/p ? or would it also do a bit wise OR of all bits to give a single bit ?
 

The Verilog bit reduction operator is only allowed with integral (packed) bits; |test is illegal.
The SystemVerilog or reduction method would perform a bitwise or with each element.

test.or() is equivalent to test[0] | test[1] |... | test[4] and the result is a 2-bits.

|test.or() results in a single bit.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top