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.

modulus function in Verilog

Status
Not open for further replies.

malikkhaled

Junior Member level 1
Joined
Jan 14, 2010
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
sweden
Activity points
1,447
I want to make a verilog module that calculates (A +/- B)mod p, where p is any prime. the result should remains between 0 to p-1. i am using xilinx ISE 14.1,, is there any operator that supports mod p and any suggestion??
 

If you want to write one, think about the steps you go through when you grab a pencil and paper and do long division, and then code that algorithm in Verilog.

If you want one already designed, look at the library of cores that Your FPGA vendor has provided.

r.b.
 

If you want to write one, think about the steps you go through when you grab a pencil and paper and do long division, and then code that algorithm in Verilog.

If you want one already designed, look at the library of cores that Your FPGA vendor has provided.

r.b.

Thanks for reply,,

i have one more question, m going to implement 16-bit complex number adder/subtractor in verilog, any hint to do addition and subtraction of complex numbers in hardware,,an example would be useful.
 

Adding complex numbers is easy, add real and imaginary part separately. Are you aware of complex calculation rules at all?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top