Coder Social home page Coder Social logo

nextpnr-gowin crashes about nextpnr HOT 5 CLOSED

Raleksan avatar Raleksan commented on July 17, 2024
nextpnr-gowin crashes

from nextpnr.

Comments (5)

yrabbit avatar yrabbit commented on July 17, 2024

it all crashes on line 90

NPNR_ASSERT(grp.bits.at(index) == -1);

and it collapses because a port with the name SW[-1] arrives to it, this -1 leads to the construction of a vector of size 0 and the size does not increase, because it calmly passes the check on line 88 (-1 is not greater than 0).

Now about SW[-1] - this is ctx->ports, but I never touch ports and I don't care what they have in their names and I don't change their names.

But in the input JSON after yosys it looks like:

    "board_specific_top": {
      "attributes": {
        "dynports": "00000000000000000000000000000001",
        "top": "00000000000000000000000000000001",
        "src": "board_specific_top.sv:3.1-152.10"
      },
      "parameter_default_values": {
        "clk_mhz": "00000000000000000000000000011011",
        "w_digit": "00000000000000000000000000000000",
        "w_gpio": "00000000000000000000000000000011",
        "w_key": "00000000000000000000000000000010",
        "w_led": "00000000000000000000000000000110",
        "w_sw": "00000000000000000000000000000000"
      },
      "ports": {
        "CLK": {
          "direction": "input",
          "bits": [ 2 ]
        },
        "KEY": {
          "direction": "input",
          "bits": [ 3, 4 ]
        },
        "SW": {
          "direction": "input",
          "offset": -1,
          "upto": 1,
          "bits": [ 5, 6 ]
        },
        "UART_RX": {
          "direction": "input",
          "bits": [ 7 ]
        },

If the elders of nextpnr tell me that I should do something with these "offset" and "upto", then of course I will. But I repeat - I don’t care what is written in the port names, for me they are just names.
I could be terribly wrong

from nextpnr.

gatecat avatar gatecat commented on July 17, 2024

Yes, it looks like this is a generic bug with negative indices in the JSON backend rather than anything gowin specific, I will look into it.

from nextpnr.

gatecat avatar gatecat commented on July 17, 2024

This should hopefully be fixed in #1209

from nextpnr.

Raleksan avatar Raleksan commented on July 17, 2024

I build nextpnr-gowin based on your commit and project is working now.
Thanks for your help!

P.S. Should I close this issue? Or it will be closed automatically after merging of pull-request?
P.P.S Do you know approximate time of adding this changes to main repository?

from nextpnr.

yrabbit avatar yrabbit commented on July 17, 2024

P.S. Should I close this issue? Or it will be closed automatically after merging of pull-request?
Close it, please ;)

from nextpnr.

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.