Git Product home page Git Product logo

learn-fpga-amaranth's People

Contributors

bl0x avatar josuah avatar suarezvictor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

learn-fpga-amaranth's Issues

Issues with FSM

In part 05, with m.FSM is used, and fsm.state is used within the with block. However, this causes an error which states that FSM doesn't have a property state. If you try to access fsm.state after exiting the with block, it works.

Also, 05, but not 06 and later, lacks domain="slow" in the FSM constructor, which I think is incorrect.

16_store isn't transitioning to LOAD state

I noticed that the LOAD state wasn't being reached even though isLoad was active. Looking at Bruno's code it is using ternary operator to select state which, for Amaranth, I believe you can either use Mux or m.Elif. So, I changed the Execute state from:

                with m.If(~isSystem):
                    m.d.sync += pc.eq(nextPc)
                with m.If(isLoad):
                    m.next = "LOAD"
                with m.If(isStore):
                    m.next = "STORE"
                with m.Else():                      <-- this overrides because isStore isn't active
                    m.next = "FETCH_INSTR"

to:

                with m.If(~isSystem):
                    m.d.sync += pc.eq(nextPc)
                with m.If(isLoad):
                    m.next = "LOAD"
                with m.Elif(isStore):                   <---- change is here
                    m.next = "STORE"
                with m.Else():
                    m.next = "FETCH_INSTR"

which makes it work correctly. However, my mind says that m.If should also work. However, the problem is with the m.Else part. This is being triggered because isStore isn't active which overrides the LOAD state!

.add_sync_process() is deprecated

The simulations use .add_sync_process(), which emits a deprecation warning.

I am very new to Amaranth, so I may be missing something, but .add_process() appears to work just fine.

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.