Git Product home page Git Product logo

Comments (6)

nmigen-issue-migration avatar nmigen-issue-migration commented on September 13, 2024

Comment by RobertBaruch
Sunday Oct 13, 2019 at 18:09 GMT


Apparently when the two clocks need to change at the same time (here, at 7.5us), at timestamp 7.5, the scheduled events are at 7.5 and 10, with a delta of 1e-10. Since 7.5-min(7.5, 10)=0 <= 1e-10, a DeadlineError is raised.

You probably already know this :)

$ python3 simclk.py
step
  curr_dirty any
    wait_deadline {}, ts 0.0, delta 0.0
step
  processes > suspended
step
  processes > suspended
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 2.5, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 3.0}, ts 1.5, delta 1e-10
     wait_deadline.values dict_values([2.5, 3.0])
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 3.0, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 5.0}, ts 2.5, delta 1e-10
     wait_deadline.values dict_values([3.0, 5.0])
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 5.0, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 4.5}, ts 3.0, delta 0.0
     wait_deadline.values dict_values([5.0, 4.5])
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 5.0, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 6.0}, ts 4.5, delta 1e-10
     wait_deadline.values dict_values([5.0, 6.0])
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 6.0, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 7.5}, ts 5.0, delta 0.0
     wait_deadline.values dict_values([6.0, 7.5])
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 7.5, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 7.5}, ts 6.0, delta 0.0
     wait_deadline.values dict_values([7.5, 7.5])
step
  run passive
step
  curr_dirty any
    wait_deadline {<generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd29620>: 7.5, <generator object Simulator.add_clock.<locals>.clk_process at 0x7f447bd295c8>: 10.0}, ts 7.5, delta 1e-10
     wait_deadline.values dict_values([7.5, 10.0])
Traceback (most recent call last):
  File "simclk.py", line 11, in <module>
    sim.run_until(100, run_passive=True)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/back/pysim.py", line 854, in run_until
    if not self.step(run_passive):
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/back/pysim.py", line 810, in step
    raise DeadlineError("Delta cycles exceeded process deadline; combinatorial loop?")
nmigen.back.pysim.DeadlineError: Delta cycles exceeded process deadline; combinatorial loop?

from amaranth.

nmigen-issue-migration avatar nmigen-issue-migration commented on September 13, 2024

Comment by whitequark
Sunday Oct 13, 2019 at 18:10 GMT


You probably already know this :)

I actually did not have a chance to look into this. Do you happen to have a patch?

from amaranth.

nmigen-issue-migration avatar nmigen-issue-migration commented on September 13, 2024

Comment by RobertBaruch
Sunday Oct 13, 2019 at 18:11 GMT


No, I just noted the immediate cause of the error, not the root cause, since I have no idea how the simulator works. Still looking into that.

from amaranth.

nmigen-issue-migration avatar nmigen-issue-migration commented on September 13, 2024

Comment by RobertBaruch
Sunday Oct 13, 2019 at 18:48 GMT


I just removed the check. I know nothing about how the simulator works, but the comment mentions logic loops. These clocks seem to be implemented as two processes with no inputs, so maybe the check should be done minus any processes which are clocks?

from amaranth.

nmigen-issue-migration avatar nmigen-issue-migration commented on September 13, 2024

Comment by whitequark
Sunday Oct 13, 2019 at 18:57 GMT


Mm, not sure, sorry. I don't remember much about the simulator, and I've focused most of my mental effort on a future complete redesign.

from amaranth.

nmigen-issue-migration avatar nmigen-issue-migration commented on September 13, 2024

Comment by RobertBaruch
Sunday Oct 13, 2019 at 19:03 GMT


In any case, even with that change, it doesn't seem like anything associated with the negative edge of the clock changes in the simulator (see #236), so now there are two problems :)

from amaranth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.