melhorias.
[vutg.git] / src / teste.vut
blobfa8d5d2a546e1af9babd089e6f9536176b5147f3
1 <?xml version="1.0" encoding="UTF-8"?>
2 <vut module_name="fulladder">
3 <time_scale t_div="10" unit="ns"/>
4 <waveform>
5 ============================================
6 a[7:0] i@|00|00|FF|FF|R1|R2|R4|R6|R2|random_alloc([R1,R2],10)|R1|ff|ff|
7 --------------------------------------------
8 b[7:0] i@|00|FF|00|FF|R3|R4|R1|R1|R5|include_memory("teste.mem")|
9 ============================================
10 result[7:0]o@|00|FF|FF|00|ref_function()|
11 --------------------------------------------
12 overflow o@|0 |0 |0 |1 |ref_function()|
13 ============================================
14 </waveform>
15 <gen_with>
16 R1 = (0,255)
17 R2 = (5,10A)
18 R3 = (30,150)
19 R4 = (2,6)
20 <python_code var="result">lambda a,b: a + b</python_code>
21 <python_code var="overflow">include_python_file("overflow.py")</python_code>
22 #<python_code var="tmp">
23 # lambda a,b: (a+b) > 255 and 1 or 0
24 #Eh o mesmo que if (a + b) > 255: return 1; else: return 0
25 #uma estencao seria res = python_code_file{dut.py}
26 #</python_code>
27 </gen_with>
28 </vut>