YosysHQ / apicula

Project Apicula 🐝: bitstream documentation for Gowin FPGAs
MIT License
462 stars 66 forks source link

Added new oscillator types and improved its handling #165

Closed uis246 closed 1 year ago

uis246 commented 1 year ago

Not tested myself

uis246 commented 1 year ago

Some idiotic mistakes were made. Now waiting again.

uis246 commented 1 year ago

Looks promising. I'm waiting for #164 first.

uis246 commented 1 year ago

I think it's better to merge it as single commit

pepijndevos commented 1 year ago

Awesome. I'll review it next week when I get home. Or maybe yrabbit will have a look. Really exciting to see your contributions!

yrabbit commented 1 year ago

Awesome. I'll review it next week when I get home. Or maybe yrabbit will have a look. Really exciting to see your contributions!

With my eyes it seems fine, but I don't have any GW2 series boards (it's a Tang Primer 20K, right?) so it's hard to check on hw.

yrabbit commented 1 year ago

Take the new master and fix your rep, please.

uis246 commented 1 year ago

Completely forgot

yrabbit commented 1 year ago

tangnano9k and tangnano4k - no questions asked, binky-osc works.

tangnano (GW1N-1) generator does not start, here is the movie (first the usual blinky, then blinky-osc-tangnano.fs is loaded) and the output file after nextpnr and binary image. If you can't figure it out by Saturday, I'll look into it:)

https://user-images.githubusercontent.com/6075465/223281505-7d424f26-add0-466f-ad63-a93b295a7355.mp4

blinky-osc-tangnano.fs.gz blinky-osc-tangnano.json.gz

yrabbit commented 1 year ago

'POWER_SAVE' = 'ENABLE' The set fuse 2204 puts the generator into energy saving mode effectively stopping it.

There are different ways to correct this, and it makes sense to check the other supported chips and at least take this parameter into account :)

powersave

uis246 commented 1 year ago

What if you set 'NORMAL' = 'ENABLE'? Or this is set anyways when OSC is present because default FREQ_DIV is still FREQ_DIV

yrabbit commented 1 year ago

What if you set 'NORMAL' = 'ENABLE'? Or this is set anyways when OSC is present because default FREQ_DIV is still FREQ_DIV

No, the fuses of this attribute are set by default in the "empty" image, which is then filled in gowin_pack.

That's why I'm saying that there are all sorts of options here to fix this: either do something with the "empty" image or provide for cleanup in gowin_pack...

yrabbit commented 1 year ago

In the attached file, some edits, after which OSC will work on Tangnano, Tangnano1k, Tangnano4k, Tangnano9k.

0.txt

yrabbit commented 1 year ago

Included in https://github.com/YosysHQ/apicula/pull/174