diff options
author | tgingold <tgingold@users.noreply.github.com> | 2019-08-30 20:41:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 20:41:32 +0200 |
commit | 88942b924c92f2f90418706718b1bec3d38af007 (patch) | |
tree | bf8403a8f1c5639a97f999da31873316d2aad4e0 /testsuite/synth | |
parent | 3c81c6f8fb41058e505c61db0f7d566ffebe2357 (diff) | |
parent | 5e1ef953f38c0347c760417cf7bddf554dc199a5 (diff) | |
download | ghdl-88942b924c92f2f90418706718b1bec3d38af007.tar.gz ghdl-88942b924c92f2f90418706718b1bec3d38af007.tar.bz2 ghdl-88942b924c92f2f90418706718b1bec3d38af007.zip |
synth: add physical division (#904)
* synth: added division of physical type
* testsuite/synth: added test for the physical division
Diffstat (limited to 'testsuite/synth')
-rw-r--r-- | testsuite/synth/physical01/physical_division.vhdl | 14 | ||||
-rwxr-xr-x | testsuite/synth/physical01/testsuite.sh | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/synth/physical01/physical_division.vhdl b/testsuite/synth/physical01/physical_division.vhdl new file mode 100644 index 000000000..c632cd7de --- /dev/null +++ b/testsuite/synth/physical01/physical_division.vhdl @@ -0,0 +1,14 @@ +library ieee; + use ieee.std_logic_1164.all; + +entity physical_division is + port ( + clk_cycles : out integer + ); +end physical_division; + +architecture rtl of physical_division is + constant CLK_PERIOD : time := 83.333 ns; +begin + clk_cycles <= 100 ms / CLK_PERIOD; +end rtl; diff --git a/testsuite/synth/physical01/testsuite.sh b/testsuite/synth/physical01/testsuite.sh new file mode 100755 index 000000000..594edb174 --- /dev/null +++ b/testsuite/synth/physical01/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +for t in physical_division; do + synth $t.vhdl -e $t > syn_$t.vhdl + analyze syn_$t.vhdl + clean +done + +echo "Test successful" |