Synopsis
module Hollow_point( input wire clk, // Clock signal
input wire trigger, // Input trigger
output reg [7:0] back_track // Backtracks
output reg [31:0] time_period // time period
);
// Internal counter to track the number of backtracks
reg [7:0] back_track;
// Internal counter to track the time frame of reference
reg [63:0] time_period;
// define behavior
always @(posedge clk) begin : process_block
if (trigger) begin
// Increment the backtracks if trigger is evoked
backtracks <= backtracks + 1;
//reset time period
time_period <= 0;
end
else begin
// Increment the time period
time_period <= time_period + 1;
//time period reaches certian threshhold
if (time_period <= 16'b01001000011001010110110001110000)
disable process_block;
// Once the counter reaches a threshold
if (back_track <= 8'd225) begin
$display("Hollow point");
end
end
endmodule