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.

Absolute value and two dimensional memory

Status
Not open for further replies.

umerkakli

Newbie level 2
Joined
May 12, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
Hi everyone,

I have two questions

1. How to calculate Absolute Value in Verilog (e.g. b=|a|)?
2. How to access single memory location in 2-Dimensional memory? I have 16x16 memory defined as [0:16]mem[0:16] and I want to get value of 3rd column and 4th row?

Looking forward to hear from you soon, thanks in advance.

Regards,
Umar
 

1. assign x_abs = x[LEN-1] ? -x : x;
2. i'm going to assume a geometry, mem[4][3]. This would get the 3rd bit of the 4th word.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top