aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/psl01/restrict1.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-13 22:43:47 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-13 22:43:47 +0200
commitde92555dc278dbb5799aaa386e1bd9b980ce0cbc (patch)
tree32e26fc1c7d63f46987a00c22a6dd58b1157627b /testsuite/synth/psl01/restrict1.vhdl
parent485b8f6b0260f5c0a72b8d6c42ad76c52fd889a1 (diff)
downloadghdl-de92555dc278dbb5799aaa386e1bd9b980ce0cbc.tar.gz
ghdl-de92555dc278dbb5799aaa386e1bd9b980ce0cbc.tar.bz2
ghdl-de92555dc278dbb5799aaa386e1bd9b980ce0cbc.zip
synth: extract edge for PSL clocks.
Diffstat (limited to 'testsuite/synth/psl01/restrict1.vhdl')
-rw-r--r--testsuite/synth/psl01/restrict1.vhdl27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/psl01/restrict1.vhdl b/testsuite/synth/psl01/restrict1.vhdl
new file mode 100644
index 000000000..b932acc9a
--- /dev/null
+++ b/testsuite/synth/psl01/restrict1.vhdl
@@ -0,0 +1,27 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity restrict1 is
+ port (clk, rst: std_logic;
+ cnt : out unsigned(3 downto 0));
+end restrict1;
+
+architecture behav of restrict1 is
+ signal val : unsigned (3 downto 0);
+begin
+ process(clk)
+ begin
+ if rising_edge(clk) then
+ if rst = '1' then
+ val <= (others => '0');
+ else
+ val <= val + 1;
+ end if;
+ end if;
+ end process;
+ cnt <= val;
+
+ --psl default clock is rising_edge (clk);
+ --psl restrict {rst; (not rst)[*]};
+end behav;