forked from CIDARLAB/homework1-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
31 lines (26 loc) · 794 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from celloapi2 import CelloQuery, CelloResult
# Set our directory variables.
in_dir = os.path.join(os.getcwd(), 'input')
out_dir = os.path.join(os.getcwd(), 'output')
# Set our input files.
chassis_name = 'Eco1C1G1T1'
in_ucf = f'{chassis_name}.UCF.json'
v_file = 'and.v'
options = 'options.csv'
input_sensor_file = f'{chassis_name}.input.json'
output_device_file = f'{chassis_name}.output.json'
q = CelloQuery(
input_directory=in_dir,
output_directory=out_dir,
verilog_file=v_file,
compiler_options=options,
input_ucf=in_ucf,
input_sensors=input_sensor_file,
output_device=output_device_file,
)
# Submit our query to Cello. This might take a second.
q.get_results()
# Fetch our Results.
res = CelloResult(results_dir=out_dir)
print(res.circuit_score)