From: Jean THOMAS Date: Wed, 29 Jul 2020 14:46:25 +0000 (+0200) Subject: Ensure sync2x and sync are in sync (fixes #20) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2c5f4e859a48412482c30649a1983af4a91ef07;p=gram.git Ensure sync2x and sync are in sync (fixes #20) --- diff --git a/gram/simulation/simcrgtb.sv b/gram/simulation/simcrgtb.sv index 289c9ec..4039581 100644 --- a/gram/simulation/simcrgtb.sv +++ b/gram/simulation/simcrgtb.sv @@ -66,4 +66,12 @@ module simcrgtb; last_sync2x_tick = $time; end + + always @(posedge top.crg_dramsync_clk) + begin + if (top.crg_dramsync_clk && $time > 700000) + begin + assert(top.crg_sync2x_clk == 1) else $error("dramsync and sync2x are out of sync"); + end + end endmodule