# Path: basil/utils/sim/utils.py
# def cocotb_compile_and_run(*args, **kw):
#     # run simulator in background
#     with open('Makefile', 'w') as f:
#         f.write(cocotb_makefile(*args, **kw))
#     subprocess.Popen(['make'])
# 
# def cocotb_compile_clean():
#     subprocess.call('make clean', shell=True)
#     subprocess.call('rm -f Makefile', shell=True)
# 
# def get_basil_dir():
#     return str(os.path.dirname(basil.__file__))


import sys
import unittest
import os
import yaml
import numpy as np
import pixel # noqa E402
from bitarray import bitarray
from basil.utils.sim.utils import cocotb_compile_and_run, cocotb_compile_clean, get_basil_dir
# ------------------------------------------------------------
# Copyright (c) All rights reserved
# SiLab, Institute of Physics, University of Bonn
# ------------------------------------------------------------
#



sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


class TestPixel(unittest.TestCase):
    def setUp(self):

        fw_path = os.path.join(get_basil_dir(), 'firmware/modules')

# Path: basil/utils/sim/utils.py
# def cocotb_compile_and_run(*args, **kw):
#     # run simulator in background
#     with open('Makefile', 'w') as f:
#         f.write(cocotb_makefile(*args, **kw))
#     subprocess.Popen(['make'])
# 
# def cocotb_compile_clean():
#     subprocess.call('make clean', shell=True)
#     subprocess.call('rm -f Makefile', shell=True)
# 
# def get_basil_dir():
#     return str(os.path.dirname(basil.__file__))


# Path: examples/mio_pixel/tests/test_Sim_mio_pixel.py
import sys
import unittest
import os
import yaml
import numpy as np
import pixel # noqa E402
from bitarray import bitarray
from basil.utils.sim.utils import cocotb_compile_and_run, cocotb_compile_clean, get_basil_dir

# ------------------------------------------------------------
# Copyright (c) All rights reserved
# SiLab, Institute of Physics, University of Bonn
# ------------------------------------------------------------
#



sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


class TestPixel(unittest.TestCase):
    def setUp(self):

        fw_path = os.path.join(get_basil_dir(), 'firmware/modules')

        cocotb_compile_and_run([