URL
https://opencores.org/ocsvn/verilog_fixed_point_math_library/verilog_fixed_point_math_library/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 4 |
Rev 7 |
Line 38... |
Line 38... |
reg [2*N+Q-3:0] reg_working_quotient; // Our working copy of the quotient
|
reg [2*N+Q-3:0] reg_working_quotient; // Our working copy of the quotient
|
reg [N-1:0] reg_quotient; // Final quotient
|
reg [N-1:0] reg_quotient; // Final quotient
|
reg [N-2+Q:0] reg_working_dividend; // Working copy of the dividend
|
reg [N-2+Q:0] reg_working_dividend; // Working copy of the dividend
|
reg [2*N+Q-3:0] reg_working_divisor; // Working copy of the divisor
|
reg [2*N+Q-3:0] reg_working_divisor; // Working copy of the divisor
|
|
|
reg [N:0] reg_count; // This is obviously a lot bigger than it needs to be, as we only need
|
reg [N-1:0] reg_count; // This is obviously a lot bigger than it needs to be, as we only need
|
// count to N-1+Q but, computing that number of bits requires a
|
// count to N-1+Q but, computing that number of bits requires a
|
// logarithm (base 2), and I don't know how to do that in a
|
// logarithm (base 2), and I don't know how to do that in a
|
// way that will work for everyone
|
// way that will work for everyone
|
|
|
reg reg_done; // Computation completed flag
|
reg reg_done; // Computation completed flag
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.