Skip to content

Commit 2fc01ff

Browse files
committed
uart vc: check parity value
1 parent 7940e58 commit 2fc01ff

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

vunit/vhdl/verification_components/src/uart_pkg.vhd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ package body uart_pkg is
150150
parity : natural) is
151151
variable msg : msg_t := new_msg(uart_set_parity_msg);
152152
begin
153+
if parity > 2 then
154+
report "Invalid parity value: " & to_string(parity)
155+
severity error;
156+
end if;
157+
153158
push(msg, parity);
154159
send(net, actor, msg);
155160
end;

0 commit comments

Comments
 (0)