Skip to content

Commit

Permalink
vhpidirect(arrays/matrices/vunit_axis_vcs): add PSL assertions to FIFO
Browse files Browse the repository at this point in the history
Co-authored-by: tmeissner
  • Loading branch information
umarcor authored and eine committed Apr 21, 2020
1 parent e788438 commit 417ec28
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vhpidirect/arrays/matrices/vunit_axis_vcs/src/fifo.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ architecture arch of fifo is

begin

PslChecks : block is
constant dx : std_logic_vector(d'left downto 0) := (others => 'X');
constant du : std_logic_vector(d'left downto 0) := (others => 'U');
begin
assert always (not rst and wr -> not (d ?= dx or d ?= du))@rising_edge(clkw)
report "wrote X|U to FIFO";
assert always (not rst and f -> not wr)@rising_edge(clkw)
report "Wrote to FIFO while full";
assert always (not rst and e -> not rd)@rising_edge(clkr)
report "Read from FIFO while empty";
end block PslChecks;

process(clkw) begin
if rising_edge(clkw) then
if wr then
Expand Down

0 comments on commit 417ec28

Please sign in to comment.