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

Ramping up the clock rate #39

Open
bmentink opened this issue Sep 29, 2016 · 7 comments
Open

Ramping up the clock rate #39

bmentink opened this issue Sep 29, 2016 · 7 comments

Comments

@bmentink
Copy link

bmentink commented Sep 29, 2016

Not an issue as such, but due to the lack of a forum will post here.

I would like to run the clock much higher to see what the limit is to run swapforth at.
I tried to het a handle on this by implementing a bare minimal PWM verilog module and ramped up the PLL until the PWM stopped working.
This went ok till about 560Mhz, (2.2MHz PWM at 8 bits) which I thought was pretty awesome ..

As a 1st attempt with swapforth, I doubled the PLL to 96Mhz (7 as the .DIVF instead of 3) and in the uart.v module doubled the CLKFREQ constant to keep the baudrate at 460800 baud. However it does not work. I am not sure if the problem is the uart or just running that fast ... any idea's

@RGD2
Copy link
Contributor

RGD2 commented Sep 29, 2016

If you disable the random number generator in icestorm/j1a.v, then icetime
makes better sense of it. The loop in that part causes icetime to give
silly results.

On Thursday, 29 September 2016, bmentink notifications@github.com wrote:

Not an issue as such, but due to the lack of a forum will post here.

I would like to run the clock much higher to see what the limit is to run
swapforth at.
I tried to het a handle on this by implementing a bare minimal PWM verilog
module and ramped up the PLL until the PWM stopped working.
This went ok till about 550Mhz, (2.2MHz PWM at 8 bits) which I thought was
pretty awesome ..

As a 1st attempt with swapforth, I doubled the PLL to 96Mhz (7 as the
.DIVF instead of 3) and in the uart.v module doubled the CLKFREQ constant
to keep the baudrate at 460800 baud. However it does not work. I am not
sure if the problem is the uart or just running that fast ... any idea's


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#39, or mute the thread
https://github.com/notifications/unsubscribe-auth/AO8-GD7fGsbBiElN_P-bV1obuTfOaJJ0ks5quwRagaJpZM4KJdEA
.

-- Remy

@bmentink
Copy link
Author

Are you meaning the section marked as "Ring Oscillator"? That's the only reference to random I can see .. and what is icetime?

By the way, where are all the modules starting SB_* defined? I would especially like some documentation on those .. I am guessing they are the technology modules for the FPGA ?..

@RGD2
Copy link
Contributor

RGD2 commented Sep 30, 2016

Yes, that's it.

Look up icetime on Clifford's site.
Scroll down to the "Where is the Documentation?" heading, there's a link there to the Lattice iCE Technology library, which documents all those SB_* things. I'm not actually sure where they're implemented in verilog - it would have to be somewhere in the yosys/icestorm/arachne-pnr toolchain.

@bmentink
Copy link
Author

Tried disabling the Ring Oscillator, but still can't run the PLL at 96Mhz ..
.. no response from shell.py .. or minicom

@jamesbowman
Copy link
Owner

Maybe try leaving the uart unchanged and connecting at 921600?

On Sep 30, 2016 4:34 PM, "bmentink" notifications@github.com wrote:

Tried disabling the Ring Oscillator, but still can't run the PLL at 96Mhz
..
.. no response from shell.py .. or minicom


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#39 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA2nKxJ1haZdUig3QumX9hvenqvQ_N4Pks5qvZyIgaJpZM4KJdEA
.

@bmentink
Copy link
Author

bmentink commented Oct 1, 2016

Tried that, same result. Maybe there is something wrong with the timing at that speed, I don't know enough to do a timing anaylsis ..

EDIT: I ran icetime after removing the random generator code and got Timing estimate: 24.22 ns (41.29 MHz) Is this why it does not run at 96Mhz? .. and probably marginal at current 48Mhz.
However., my pwm code that I managed to clock fine at over 500Mhz reported an icetime value of only 132Mhz .... go figure ...

@bmentink
Copy link
Author

Been a couple of weeks now ... any comment @jamesbowman
By the way James, excellent Forth, works very well ......

RGD2 added a commit to RGD2/swapforth that referenced this issue May 2, 2017
…amesbowman#39

This contains an alternate buart() module for asynchronous RS232.
- will resynchronise itself at every start bit transition
- rejects bad characters - does not clobber last valid data
- keeps the most recently received character, 'valid' flag always clears on read.
- works reliably up to 921600 baud on both ice40hx8k breakout and iceStick
- works with other 'logic level' rs232 devices offboard, or via max232 chips to true rs232 ports.
- easy to instantiate multiple ports with different baud rates

This also adds a "make pcon" option to remember the settings for connecting with picocom,
which is useful for testing character-by-character operation, as well as manual control over the reset line.
It sometimes works if the uart connection is marginal, and shell.py gets stuck on connect.
RGD2 added a commit to RGD2/swapforth that referenced this issue May 2, 2017
…amesbowman#39

This contains an alternate buart() module for asynchronous RS232.
- will resynchronise itself at every start bit transition
- rejects bad characters - does not clobber last valid data
- keeps the most recently received character, 'valid' flag always clears on read.
- works reliably up to 921600 baud on both ice40hx8k breakout and iceStick
- works with other 'logic level' rs232 devices offboard, or via max232 chips to true rs232 ports.
- easy to instantiate multiple ports with different baud rates

This also adds a "make pcon" option to remember the settings for connecting with picocom,
which is useful for testing character-by-character operation, as well as manual control over the reset line.
It sometimes works if the uart connection is marginal, and shell.py gets stuck on connect.
@RGD2 RGD2 mentioned this issue May 2, 2017
RGD2 added a commit to RGD2/swapforth that referenced this issue Sep 15, 2022
…amesbowman#39

This contains an alternate buart() module for asynchronous RS232.
- will resynchronise itself at every start bit transition
- rejects bad characters - does not clobber last valid data
- keeps the most recently received character, 'valid' flag always clears on read.
- works reliably up to 921600 baud on both ice40hx8k breakout and iceStick
- works with other 'logic level' rs232 devices offboard, or via max232 chips to true rs232 ports.
- easy to instantiate multiple ports with different baud rates
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

No branches or pull requests

3 participants