blob: df2ab8cc8f2c4c222f256ee3ec49de83202b09ab [file] [log] [blame]
module
cmp
import
NetsPkg::*;
#(
parameter
real
hyst = 0.65)
(
input
realNet [0:1] inA,
input logic
rst,
output
logic
out);
timeunit 1ns / 1ps;
real
updatePeriod = 100.0;
initial
out = 1'b0;
always
#updatePeriod
begin
if
(rst) out <= 1'b0;
else
if
(inA[0] > inA[1]) out <= 1'b1;
else
if
(inA[0] < inA[1] - hyst) out <= 1'b0;
end
endmodule
: cmp