mirror of https://github.com/efabless/caravel.git
update caravel.py to disable bin 3 also
This commit is contained in:
parent
2dc29bb207
commit
d90001eac2
|
@ -58,8 +58,6 @@ class Caravel_env:
|
||||||
|
|
||||||
async def disable_bins(self):
|
async def disable_bins(self):
|
||||||
for i in range(38):
|
for i in range(38):
|
||||||
if i == 3:
|
|
||||||
continue
|
|
||||||
common.drive_hdl(self.dut._id(f"bin{i}_en",False),(0,0),0)
|
common.drive_hdl(self.dut._id(f"bin{i}_en",False),(0,0),0)
|
||||||
|
|
||||||
"""setup the vdd and vcc power bins"""
|
"""setup the vdd and vcc power bins"""
|
||||||
|
|
|
@ -8,13 +8,9 @@ from cocotb.result import TestSuccess
|
||||||
from tests.common_functions.test_functions import *
|
from tests.common_functions.test_functions import *
|
||||||
from tests.bitbang.bitbang_functions import *
|
from tests.bitbang.bitbang_functions import *
|
||||||
from caravel import GPIO_MODE
|
from caravel import GPIO_MODE
|
||||||
|
from tests.housekeeping.housekeeping_spi.spi_access_functions import *
|
||||||
|
|
||||||
|
|
||||||
async def write_reg_spi(caravelEnv,address,data):
|
|
||||||
await caravelEnv.enable_csb()
|
|
||||||
await caravelEnv.hk_write_byte(0x80) # Write stream command
|
|
||||||
await caravelEnv.hk_write_byte(address) # Address (register 19 = GPIO bit-bang control)
|
|
||||||
await caravelEnv.hk_write_byte(data) # Data = 0x01 (enable bit-bang mode)
|
|
||||||
await caravelEnv.disable_csb()
|
|
||||||
|
|
||||||
reg = Regs()
|
reg = Regs()
|
||||||
"""Testbench of GPIO configuration through bit-bang method using the StriVe housekeeping SPI."""
|
"""Testbench of GPIO configuration through bit-bang method using the StriVe housekeeping SPI."""
|
||||||
|
@ -62,7 +58,7 @@ async def IRQ_external(dut):
|
||||||
cocotb.log.info(f"[TEST] Pass interrupt isn't detected when mprj 7 deasserted")
|
cocotb.log.info(f"[TEST] Pass interrupt isn't detected when mprj 7 deasserted")
|
||||||
elif reg1 in fail_list: # pass phase
|
elif reg1 in fail_list: # pass phase
|
||||||
if reg1 == 0x1E:
|
if reg1 == 0x1E:
|
||||||
cocotb.log.info(f"[TEST] Failed interrupt isn't detected when mprj 7 asserted")
|
cocotb.log.error(f"[TEST] Failed interrupt isn't detected when mprj 7 asserted")
|
||||||
elif reg1 == 0x2E:
|
elif reg1 == 0x2E:
|
||||||
cocotb.log.error(f"[TEST] Failed interrupt is detected when mprj 7 deasserted")
|
cocotb.log.error(f"[TEST] Failed interrupt is detected when mprj 7 deasserted")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue