aboutsummaryrefslogtreecommitdiffstats
path: root/tests/verilog
diff options
context:
space:
mode:
authorZachary Snow <zach@zachjs.com>2022-02-11 22:57:31 +0100
committerZachary Snow <zachary.j.snow@gmail.com>2022-02-14 15:58:31 +0100
commit15a4e900b2e8f61464c7d24751b1d0182a894a1b (patch)
tree8bfcdb75dd18e39843491429fc1e5849b70ed5b1 /tests/verilog
parent68c67c40ec75b192f4f1be9711afe0df8973e797 (diff)
downloadyosys-15a4e900b2e8f61464c7d24751b1d0182a894a1b.tar.gz
yosys-15a4e900b2e8f61464c7d24751b1d0182a894a1b.tar.bz2
yosys-15a4e900b2e8f61464c7d24751b1d0182a894a1b.zip
verilog: support for time scale delay values
Diffstat (limited to 'tests/verilog')
-rw-r--r--tests/verilog/delay_time_scale.ys25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/verilog/delay_time_scale.ys b/tests/verilog/delay_time_scale.ys
new file mode 100644
index 000000000..f45ba7b26
--- /dev/null
+++ b/tests/verilog/delay_time_scale.ys
@@ -0,0 +1,25 @@
+logger -expect-no-warnings
+read_verilog -sv <<EOT
+module top;
+wand x;
+`define TEST(time_scale) if (1) assign #time_scale x = 1;
+
+`TEST(1s)
+`TEST(1ms)
+`TEST(1us)
+`TEST(1ns)
+`TEST(1ps)
+`TEST(1fs)
+
+`TEST((1s))
+`TEST(( 1s))
+`TEST((1s ))
+`TEST(( 1s ))
+
+`TEST(1.0s)
+`TEST(1.1s)
+`TEST(1.0e-1s)
+`TEST(1e-1s)
+
+endmodule
+EOT