::std::ops::

Function comb_div

pub extern fn comb_div<T>(x: T, y: T) -> T
Expand

Evaluates to x / y in Verilog.

In general, this is going to be slow and large, so it should be avoided if you don’t know what you’re doing. For division by a constant power of two, use / instead.

Examples

assert (6u8 `comb_div` 3) == 2;
assert (7u8 `comb_div` 3) == 2;

Requires T to be Number. This requirement is enforced by the compiler but not part of the type signature for now