From d8cd91a14bd84578b7ac14dbe0c9285e48ce45ab Mon Sep 17 00:00:00 2001 From: Pawel Czarnecki Date: Wed, 24 Apr 2024 17:43:35 +0200 Subject: [PATCH] examples/ram: use assert!() instead of assert_eq() in RamModel Internal-tag: [#52186] Signed-off-by: Pawel Czarnecki --- xls/examples/ram.x | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/xls/examples/ram.x b/xls/examples/ram.x index 674f4d7898..73a931b2fc 100644 --- a/xls/examples/ram.x +++ b/xls/examples/ram.x @@ -251,7 +251,7 @@ proc RamModel mem[read_req.addr], SimultaneousReadWriteBehavior::WRITE_BEFORE_READ => value_to_write, - SimultaneousReadWriteBehavior::ASSERT_NO_CONFLICT => { - // Assertion failure, we have a conflicting read and write. - assert_eq(true, false); - mem[read_req.addr] // Need to return something. - }, + SimultaneousReadWriteBehavior::ASSERT_NO_CONFLICT => fail!("conflicting_read_and_write", mem[read_req.addr]), + _ => fail!("impossible_case", uN[DATA_WIDTH]:0), } } else { mem[read_req.addr] }; let read_resp_value = ReadResp {