modulo addition implementation in vhdl

Status
Not open for further replies.

chaitanya.531

Member level 1
Joined
Feb 27, 2012
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,665
excuse me folks

i have q about addition modulo n implementation in vhdl
how do i implement that in vhdl
 

with some VHDL
I suggest you get started, and then come back with specific problems.
 

i want to do addition modulo n on integers a and b
 

for simulation, (x + y) mod z will work for 32b signed integers. for larger values, or for synthesis, you would need to do the add + division/modulo. This tends to be a multi-cycle operation unless "z" is a constant. in which case the division can be approximated by a multiplication by constant.

There are IP cores and other simple methods for div/mod.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…