atniner
atniner

Reputation: 13

Multiple outcome for a bidirectional constraint using implication operator

Is there a way we can write multiple outcome for a bidirectional constraint?

constraint c_test{
     (packet_size == LARGE) -> (Packet_length == 16); (Gap_betwn_packets == 2);
}

The Above code shall have Packet_length as 16 and Gap between packets as 2 whenever the packet_size is LARGE .Is the above code okay?

Upvotes: 0

Views: 117

Answers (1)

dave_59
dave_59

Reputation: 42748

This needs to be written as a group of constraints using {}

constraint c_test{
     (packet_size == LARGE) -> { Packet_length == 16; Gap_betwn_packets == 2; }
}

Upvotes: 1

Related Questions