Nov 2, 2013 #1 P popdog22 Newbie level 2 Joined Nov 2, 2013 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 10 The module I have to use is this one: Code Verilog - [expand]1 2 3 4 5 module divider( output reg[7:0] q, output reg[7:0] r, input [7:0] a,b); endmodule where a=b*q+r I'm not allowed to use repetitive subtracting or the / and % operators. Any help? Last edited by a moderator: Nov 2, 2013
The module I have to use is this one: Code Verilog - [expand]1 2 3 4 5 module divider( output reg[7:0] q, output reg[7:0] r, input [7:0] a,b); endmodule where a=b*q+r I'm not allowed to use repetitive subtracting or the / and % operators. Any help?
Nov 2, 2013 #2 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 52,423 Helped 14,752 Reputation 29,786 Reaction score 14,101 Trophy points 1,393 Location Bochum, Germany Activity points 298,112 You can either use bitweise shift and substract (serial divider) or fast parallel division algorithms (rather complex) https://en.wikipedia.org/wiki/Division_algorithm
You can either use bitweise shift and substract (serial divider) or fast parallel division algorithms (rather complex) https://en.wikipedia.org/wiki/Division_algorithm
Nov 2, 2013 #3 P popdog22 Newbie level 2 Joined Nov 2, 2013 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 10 Yes, but I don't know the algorithm for those moethods