radix: reading first page table entry
[soc.git] / src / soc / TestUtil / test_helper.py
1 def assert_op(pre, o, e, op):
2 """ Verifies the given values given the particular operand
3 Arguments:
4 p (Prefix): Appended to the front of the assert statement
5 e (Expected): The expected value
6 o (Output): The output result
7 op (Operation): (0 => ==), (1 => !=)
8 """
9 if op == 0:
10 assert_eq(pre, o, e)
11 else:
12 assert_ne(pre, o, e)
13
14 def assert_eq(p, o, e):
15 """ Verifies the given values are equal
16 Arguments:
17 p (Prefix): Appended to the front of the assert statement
18 e (Expected): The expected value
19 o (Output): The output result
20 """
21 assert o == e, p + " Output " + str(o) + " Expected " + str(e)
22
23 def assert_ne(p, o, e):
24 """ Verifies the given values are not equal
25 Arguments:
26 p (Prefix): Appended to the front of the assert statement
27 e (Expected): The expected value
28 o (Output): The output result
29 """
30 assert o != e, p + " Output " + str(o) + " Not Expecting " + str(e)