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.

circuit for remainder for divide by 64

Status
Not open for further replies.

sun_ray

Advanced Member level 3
Advanced Member level 3
Joined
Oct 3, 2011
Messages
772
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Visit site
Activity points
6,828
Please provide a circuit that can provide the remainder when any 16 bit input to the circuit is divided by 64.
 

It's a bit strange when an experienced Edaboard member makes his questions sound like a first year's student homework problem...

Isn't the answer a simple part select (Verilog) respectively slice (VHDL)? You can also desribe it with a modulo operator.
 

Please provide a circuit that can provide the remainder when any 16 bit input to the circuit is divided by 64.
please correct me if iam wrong
copy the dividend into MSB of 32 bit register , right shift 4 times you will get quotient [31:16] and fractional remainder [15:0]
 

FvM
Will that be synthesizable if modulo operator is used?

- - - Updated - - -

dipin

Can you please explain how is it bringing remainder?

Regards
 

Will that be synthesizable if modulo operator is used?
modulo 2^n simpy synthesises as a shift operation, other numbers infer a divider core, if supported by the respective tool.
 

dipin

Can you please explain how is it bringing remainder?

take number 22 ,it sbinary equals 0000 0000 0001 0110
copy it to MSB of 32 bit register 0000 0000 0001 0110 0000 0000 0000 0000

then 2^4 =16 ,so shift 4 times 0000 0000 0000 0001 0110 0000 0000 0000

22/16= 1.375
quotient(msb)=0000 0000 0000 0001 =1
(lsb) remainder(in fraction)=0110 0000 0000 0000 = 2^-2+2^-3
=.25+.125
=.375

the output fractional accurcy is depends upon the number of fractional bits we are using
regards
 
Hi,

Just use bit 0 ...5 of the 16 bit input.

Or use "AND 0x003F".

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top