Skip to content

Commit

Permalink
feat: parameters to check added
Browse files Browse the repository at this point in the history
  • Loading branch information
Elizabeth-0 committed Nov 6, 2024
1 parent 5ae4576 commit bcb5dce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/tt_um_waves.v
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ module tt_um_waves (
.ena(ena)
);

// Assign I2S output pins to uo_out[2:0] and zero remaining bits
assign uo_out[2:0] = {sck, ws, sd};
assign uo_out[7:3] = 5'b0; // Ensure remaining bits are zero
// Assign I2S output pins to uo_out[2:0] and zero out remaining bits
assign uo_out = {5'b00000, sck, ws, sd};

// Unused output assignments
assign uio_out = 8'b0;
Expand Down
4 changes: 2 additions & 2 deletions test/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cocotb
from cocotb.clock import Clock
from cocotb.regression import TestFactory
from cocotb.triggers import RisingEdge, ClockCycles

async def send_uart_byte(dut, byte_value):
Expand Down Expand Up @@ -27,7 +28,7 @@ def is_resolvable(signal_value):
@cocotb.test()
async def test_tt_um_waves(dut):
"""Test and debug I2S output and `uo_out[6]` issue."""
clock = Clock(dut.clk, 40, units="ns") # 25 MHz clock
clock = Clock(dut.clk, 40, units="ns") # 25 MHz clock (40 ns period)
cocotb.start_soon(clock.start())

# Apply reset and allow extra stabilization time
Expand All @@ -46,7 +47,6 @@ async def test_tt_um_waves(dut):
# Confirm that `uo_out` has stabilized before proceeding
assert is_resolvable(dut.uo_out.value), "uo_out still contains unresolvable states after retries"


# Test UART Reception by sending 'T' for Triangle wave
await send_uart_byte(dut, 0x54) # 'T' character in ASCII
await ClockCycles(dut.clk, 500)
Expand Down

0 comments on commit bcb5dce

Please sign in to comment.