prod2u_p4_axis_cdc_structure_formal.v 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. `timescale 1ns/1ps
  2. `default_nettype none
  3. module prod2u_p4_axis_cdc_structure_formal;
  4. (* gclk *) reg clk;
  5. reg rst_n = 1'b0;
  6. (* anyseq *) reg command_start;
  7. (* anyseq *) reg command_dir;
  8. (* anyseq *) reg [15:0] command_steps;
  9. (* anyseq *) reg legacy_limit;
  10. wire step_a, dir_a, started_a;
  11. wire step_b, dir_b, started_b;
  12. prod2u_p4_axis_executor #(.DIR_SETUP_CYCLES(2), .STEP_HALF_CYCLES(2)) a (
  13. .clk(clk), .rst_n(rst_n), .command_start(command_start),
  14. .command_dir(command_dir), .command_steps(command_steps),
  15. .step_out(step_a), .dir_out(dir_a), .started_pulse(started_a)
  16. );
  17. prod2u_p4_axis_executor #(.DIR_SETUP_CYCLES(2), .STEP_HALF_CYCLES(2)) b (
  18. .clk(clk), .rst_n(rst_n), .command_start(command_start),
  19. .command_dir(command_dir), .command_steps(command_steps),
  20. .step_out(step_b), .dir_out(dir_b), .started_pulse(started_b)
  21. );
  22. always @(posedge clk) begin
  23. rst_n <= 1'b1;
  24. if (rst_n) begin
  25. assert(step_a == step_b);
  26. assert(dir_a == dir_b);
  27. assert(started_a == started_b);
  28. end
  29. cover(rst_n && legacy_limit && started_a);
  30. end
  31. endmodule
  32. `default_nettype wire