From 7f8b136220597150dd79553bbf3f8c8593e54364 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 23 Aug 2019 09:57:35 +0100 Subject: [PATCH] use new sim.add_clock "if_exists" parameter. needed for combinatorial blocks --- src/ieee754/part_mul_add/test/test_multiply.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ieee754/part_mul_add/test/test_multiply.py b/src/ieee754/part_mul_add/test/test_multiply.py index 9bb97102..61043ab5 100644 --- a/src/ieee754/part_mul_add/test/test_multiply.py +++ b/src/ieee754/part_mul_add/test/test_multiply.py @@ -9,7 +9,6 @@ from ieee754.part_mul_add.multiply import \ from nmigen import Signal, Module from nmigen.back.pysim import Simulator, Delay, Tick, Passive from nmigen.hdl.ast import Assign, Value -from nmigen.hdl.ir import Fragment from typing import Any, Generator, List, Union, Optional, Tuple, Iterable import unittest from hashlib import sha256 @@ -236,9 +235,7 @@ class TestAddReduce(unittest.TestCase): yield Tick() yield from generic_process(GenOrCheck.Check) - f = Fragment.get(module, platform=None) - if "sync" in f.drivers: - sim.add_clock(2e-6) + sim.add_clock(2e-6, if_exists=True) sim.add_process(generate_process) sim.add_process(check_process) sim.run() @@ -635,9 +632,7 @@ class TestMul8_16_32_64(unittest.TestCase): yield Tick() yield from process(GenOrCheck.Check) - f = Fragment.get(module, platform=None) - if "sync" in f.drivers: - sim.add_clock(2e-6) + sim.add_clock(2e-6, if_exists=True) sim.add_process(generate_process) sim.add_process(check_process) sim.run() -- 2.30.2