forked from changyun233/dispatch_simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (26 loc) · 719 Bytes
/
main.py
File metadata and controls
32 lines (26 loc) · 719 Bytes
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
32
from config.config_file import *
from src.core import core
import sys
def main(argv):
core_U = core(argv)
i = 0
issue_done_cnt = 0
while True:
i += 1
core_U.wakeup(i)
if core_U.fetch_empty() or core_U.issue_full():
print(f'execution start @ cycle{i}')
core_U.start_execution()
break
while True:
i += 1
core_U.wakeup(i)
if core_U.issue_done():
issue_done_cnt += 1
if issue_done_cnt == 20:
print(f'issue done @ cycle{i-20}')
break
core_U.scroop_U.insert()
core_U.recorder_U.insert()
if __name__=="__main__":
main(sys.argv[1:])