[Cryptech-Commits] [core/platform/alpha] 03/07: Testbench for the new clock manager.

git at cryptech.is git at cryptech.is
Thu Jan 23 09:01:34 UTC 2020


This is an automated email from the git hooks/post-receive script.

meisterpaul1 at yandex.ru pushed a commit to branch fmc_clk_core
in repository core/platform/alpha.

commit 7bf84ba5628678abc9d9ffa58c639eca7f3e095b
Author: Pavel V. Shatov (Meister) <meisterpaul1 at yandex.ru>
AuthorDate: Tue Jan 21 15:43:40 2020 +0300

    Testbench for the new clock manager.
---
 rtl/bench/tb_clkmgr.v | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/rtl/bench/tb_clkmgr.v b/rtl/bench/tb_clkmgr.v
new file mode 100644
index 0000000..a987e1c
--- /dev/null
+++ b/rtl/bench/tb_clkmgr.v
@@ -0,0 +1,38 @@
+`timescale 1ns / 1ps
+
+module tb_clkmgr;
+
+    // Input
+	reg fmc_clk = 1'b0;
+
+    // Clock
+    always #11.111 fmc_clk = ~fmc_clk;
+
+    // Outputs
+    wire io_clk;
+	wire sys_clk;
+	wire sys_rst_n;
+    wire core_clk;
+
+    // Internals
+    reg fmc_clk_inhibit = 1'b0;
+
+	// UUT
+	alpha_clkmgr uut
+    (
+        .fmc_clk(fmc_clk & ~fmc_clk_inhibit),
+        .io_clk(io_clk),
+		.sys_clk(sys_clk), 
+		.sys_rst_n(sys_rst_n),
+        .core_clk(core_clk)
+	);
+    
+    // Script
+    initial begin
+        #399000;
+        fmc_clk_inhibit = 1'b1;
+        #1000;
+        fmc_clk_inhibit = 1'b0;
+    end
+      
+endmodule



More information about the Commits mailing list