Skip to content

Commit

Permalink
Update test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
calonso88 authored Apr 14, 2024
1 parent 22d4697 commit f5cb90b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
from cocotb.clock import Clock
from cocotb.triggers import ClockCycles

def mmm (a, b, m, nbits):
r = 0
count = 0
while counter < nbits:
r0 = r % 2
b0 = b % 2
a_bit = 1 # tbd update later
q0 = r0 + b0 * a_bit
q0 = q0 % 2
r = ( r + a_bit * b + q0 * m ) // 2
counter = counter + 1
return r;

def is_prime(num):
if (num < 2) :
return 0;
Expand Down Expand Up @@ -394,4 +407,4 @@ async def test_spi(dut):

await ClockCycles(dut.clk, 10)

await ClockCycles(dut.clk, 10)
await ClockCycles(dut.clk, 10)

0 comments on commit f5cb90b

Please sign in to comment.