Skip to content
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

Implement power saving primitive BANDGAP #257

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

yrabbit
Copy link
Collaborator

@yrabbit yrabbit commented Jul 6, 2024

As the board on the GW1N-1 chip becomes a rarity, its replacement is the Tangnano1k board with the GW1NZ-1 chip. This chip has a unique mechanism for turning off power to important things such as OSC, PLL, etc.

Here we introduce a primitive that allows energy saving to be controlled dynamically.

Nextpnr will add this primitive automatically if we do not use it explicitly - this is done to explicitly connect the control input since its default connection is neither VCC nor GND.

BANDGAP only has an input, but does not have a fuse - it is on all the time. Of course, a reasonable question arises - what are these magic numbers in line 2258-2259 of gowin_pack.py?

I really don’t want to consider these BANDGAP fuses precisely because this primitive is not configurable - and these bits are fuses that appear in the db.shortval[49]['unknown_75'] and
db.logicinfo['unknown_74'] tables , which clearly describe something with decent configuration capabilities. This could be some kind of adjustable voltage stabilizer, which has an input MUX for control signals and one of the combinations connects BANDGAP.

But this is not part of BANDGAP and I think I'll leave it as it is.

A test example has also been added - himbaechel/bandgap.v - when you press the BANDGAP button, it is triggered and turns off the power to the OSC generator and the LED stops blinking.

As the board on the GW1N-1 chip becomes a rarity, its replacement is the
Tangnano1k board with the GW1NZ-1 chip. This chip has a unique mechanism
for turning off power to important things such as OSC, PLL, etc.

Here we introduce a primitive that allows energy saving to be controlled
dynamically.

Nextpnr will add this primitive automatically if we do not use it
explicitly - this is done to explicitly connect the control input since
its default connection is neither VCC nor GND.

BANDGAP only has an input, but does not have a fuse - it is on all the
time. Of course, a reasonable question arises - what are these magic
numbers in line 2258-2259 of gowin_pack.py?

I really don’t want to consider these BANDGAP fuses precisely because
this primitive is not configurable - and these bits are fuses that
appear in the db.shortval[49]['unknown_75'] and
db.logicinfo['unknown_74'] tables , which clearly describe something
with decent configuration capabilities. This could be some kind of
adjustable voltage stabilizer, which has an input MUX for control
signals and one of the combinations connects BANDGAP.

But this is not part of BANDGAP and I think I'll leave it as it is.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
@yrabbit yrabbit merged commit fc1121f into YosysHQ:master Jul 18, 2024
12 of 14 checks passed
@yrabbit yrabbit deleted the bandgap-z1 branch July 18, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants