From e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 11 Oct 2014 15:02:23 -0500 Subject: ext: add the source code for DSENT This patch adds a tool called DSENT to the ext/ directory. DSENT is a tool that models power and area for on-chip networks. The next patch adds a script for using the tool. --- ext/dsent/libutil/Assert.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ext/dsent/libutil/Assert.h (limited to 'ext/dsent/libutil/Assert.h') diff --git a/ext/dsent/libutil/Assert.h b/ext/dsent/libutil/Assert.h new file mode 100644 index 000000000..0fdd364b2 --- /dev/null +++ b/ext/dsent/libutil/Assert.h @@ -0,0 +1,22 @@ +#ifndef __ASSERT_H__ +#define __ASSERT_H__ + +#include "String.h" +#include "Exception.h" + +#ifdef NDEBUG +#define ASSERT(test_value_,exception_msg_) +#else +#define ASSERT(test_value_,msg_) \ + do \ + { \ + if(!(test_value_)) \ + { \ + const LibUtil::String& exception_msg = LibUtil::String::format("\nAt %s:%d\n", __FILE__, __LINE__) + (String)(msg_); \ + throw LibUtil::Exception(exception_msg); \ + } \ + } while(0); +#endif + +#endif // __ASSERT_H__ + -- cgit v1.2.3