forked from dawsonjon/Chips-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interconnect.py
executable file
·43 lines (36 loc) · 1.37 KB
/
interconnect.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
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python
from chips.api.api import *
import sys
my_chip = Chip("interconnect")
wire = Wire(my_chip)
Component("test_suite/producer.c")(my_chip, inputs={}, outputs={"z":wire})
Component("test_suite/consumer.c")(my_chip, inputs={"a":wire}, outputs={})
my_chip.generate_verilog()
my_chip.generate_testbench(100000)
my_chip.compile_iverilog(True)
my_chip = Chip("interconnect")
wire = Wire(my_chip)
Component("test_suite/slow_producer.c")(my_chip, inputs={}, outputs={"z":wire})
Component("test_suite/consumer.c")(my_chip, inputs={"a":wire}, outputs={})
my_chip.generate_verilog()
my_chip.generate_testbench(100000)
my_chip.compile_iverilog(True)
my_chip = Chip("interconnect")
wire = Wire(my_chip)
Component("test_suite/producer.c")(my_chip, inputs={}, outputs={"z":wire})
Component("test_suite/slow_consumer.c")(my_chip, inputs={"a":wire}, outputs={})
my_chip.generate_verilog()
my_chip.generate_testbench(100000)
my_chip.compile_iverilog(True)
my_chip = Chip("interconnect")
wire = Wire(my_chip)
Component("test_suite/slow_producer.c")(my_chip, inputs={}, outputs={"z":wire})
Component("test_suite/slow_consumer.c")(my_chip, inputs={"a":wire}, outputs={})
my_chip.generate_verilog()
my_chip.generate_testbench(100000)
my_chip.compile_iverilog(True)
os.remove("producer.v")
os.remove("consumer.v")
os.remove("interconnect_tb")
os.remove("interconnect.v")
os.remove("interconnect_tb.v")