-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tang Primer 20k support #127
Comments
Awesome! So in the basis you could head over to the closed pull requests and find some that added other devices, start along that path and see what breaks. And then do the same on the nextpnr side. Hopefully they are kinda just bigger versions of Littlebee, but no doubt there will be some issues along the way. One problem that should be dealt with eventually is that the nextpnr target constructs the chipdb at runtime rather than memory-mapping a big struct as some other targets do. This means that the bigger the device, the longer the loading time. For 9k this is already a few second, and I imagine for 20k and 55k it will be kinda extremely slow. But rewriting the nextpnr target is a much bigger project than just adding a new devices. |
Also, I'd recommend joining the Matrix room to hang out and ask questions. |
Ok, thank you for the insights. I'll start looking at it this weekend and direct questions to the matrix chat :) |
Any progress on this? I'm thinking about buying the board, and I would really like to use it with nextpnr, so I might help if there's still work to be done! |
Yea there has not been much progress on this front to my knowledge. Buying the FPGA myself is on my todolist, but if you want to jump in and help, the same applies: look at other PRs that added a device, join Matrix/IRC |
I started working on this, and already understand what needs to be done / implemented a few changes, but I'm taking my time to learn more about how the toolchain / fuzzers / official gowin software works, as these implementation details are kinda new for me. I'll publish my first changes soon, but any help here from experienced people is more than welcome. |
Amazing news. If you have any questions, don't hesitate to stop by on Matrix/IRC |
With the upcoming Tang Nano 20k, and the Primer 20k it will be really great to have open source toolchain support. Happy to test this out if that helps. |
Hello; AT Delcimar Martins |
I compile the test pieces with the vendor IDE and look at the output binary images in the Python interpreter. |
This is great to hear! I would suggest that you join the matrix/irc channel linked in the readme. A good place to start is to look at previous PRs that added support for a new FPGA model. There are some places where values need to be added from documentation or experiments, and then probably a ton of bugfixes. |
It's very likely that we will get the support of tangprimer20k today ! |
Does this support also applies to TangNano20k ? Can support also be added to gowin_pll.py ? |
Bad news: TangPrimer20k support does not mean TangNano20k support, because although the series of chips (GW2A-18 and GW2AR-18C) are similar, they are a) not identical and b) engineering decisions made when designing the TangNano20k board itself will require special software perversions. The good news is that both TangPrimer20k and Tangnano20k are supported in the WIP version of apicula/nextpnr, which is undergoing a final haircut before being published as alpha. To add Tang * 20k to gowin_pll, I think it will be enough to find a datasheet somewhere and write the allowable PLL frequencies into this script. What we need is someone with the knowledge of how to program an external PLL since that is the TangNano20k's stock clock. For me, this instruction is a complete fog so far :) https://wiki.sipeed.com/hardware/en/tang/tang-nano-20k/example/unbox.html#pll_clk |
huh fun, the MS5351 PLL seems to be an I2C device, so I guess it's just configured by their BL616 fake FTDI USB serial emulation. But yea that's a whole fresh can of worms. |
The MS5351 is fairly complex. I have been trying to write a python PLL settings generator for this chip for a different application (a software defined radio). I would be happy to try and help, but it's a mess (something like 188 registers need to be written via i2c to set up a new frequency) why would the external PLL need to be programmed by apycula at all? |
because it is soldered to normal clock wires as opposed to a simple standard external oscillator soldered to the input of a dead PLL :) And this leads to the fact that without using the MS5351, you will have to go through a chain of ordinary (not dedicated clock) wires to the nearest working internal PLL in order to then get the signal from its outputs to the dedicated global clock network. |
OK thanks for the explanation. I have some progress on automatically calculating PLL settings for the MS5351 using python here... There is some C code in the same project... |
they have a group on telegram https://t.me/sipeed where you can ask |
Thanks @yrabbit. I've done a little digging, and this what I found... It appears that the BL616 listens to the external USB UART. This exposes a command-line interface on the BL616. One of the command line tools,
So I would guess that this step would be performed by the designer before starting on HDL (effectively setting the an external reference frequency, rather like choosing a crystal oscillator frequency). Running this |
After your explanation, no way :( |
I don't have a TangNano20k to test this. I don't even know if it is set on startup at all, in fact I'd guess that all three MS5351 clocks are likely to be disabled by default at startup. |
Better and better. |
Tangnano20k and TangaPrimer20k are supported after commit. |
@yrabbit that's great news and I'm so happy :) I have a Tangnano20k for testing, if you need volunteers. |
Certainly!
https://github.com/YosysHQ/apicula/suites/16525435709/artifacts/944262835 |
Hey @yrabbit, is GW2AR-18 supported on nextpnr? I don't see any commits related to it. edit: nevermind, the fuzzer is in apicula. I don't see GW2AR-18 on the fuzzer :c only GW2AR-18C |
Which board uses pure GW2AR-18? |
Got it. I believe Tang Nano 20k itself has the R in it. |
yeah, tangnano20k is supported by Apicula. |
Hello,
there are any plans to support the new Tang Primer 20k board (GW2A-LV18PG256C8/I7)?
As far as I can see, we don't have any GW2A support yet. Could we discuss the steps required to get this included? I have the hardware and would be willing to help.
Thanks.
The text was updated successfully, but these errors were encountered: