ws2812 vhdl problem

OP #5848954
Rate this post
• ▲ useful
▼ not useful
Hi there,

I tried to run vhdl code from 
https://github.com/trobanga/ws2812/blob/master/ws2812.vhdl

The strange thing is that timings are not met. As described in code, i 
connect 50mhz clock to the ip block.
Can someone give me a hand with this and test vhdl code? Results 
attached.

Many thanks,
FlatByte
Attached files:
Moderator (Company: Titel) #5848997
Rate this post
• ▲ useful
▼ not useful
Flat B. wrote:
> i connect 50mhz
milli Hertz?

> The strange thing is that timings are not met.
As far as I see the timing is exactly as to be expected.
350ns are not possible with 20ns granularity, therefore the term g_T0H * 
CLOCK_FREQ / 1000 results in a time of 340ns. And the additional 40ns 
are due to the state transitions wh and wl in the FSM, so you must get 
340ns+20ns+800ns+20ns = 1180ns and 600ns+20ns+700ns+20ns = 1340ns with 
this code.

> The strange thing is that timings are not met.
What timing does a behavioural simulation show?
OP #5849149
Rate this post
• ▲ useful
▼ not useful
Wow, many thanks for the great discussion. At last I've found right 
place and right people for VHDL/FPGA discussion.

Lothar M. wrote:

> Flat B. wrote:
>
> > i connect 50mhz
> > milli Hertz?
Right. MHz.

Lothar M. wrote:

> The strange thing is that timings are not met.
> As far as I see the timing is exactly as to be expected.
> 350ns are not possible with 20ns granularity, therefore the term g_T0H *
> CLOCK_FREQ / 1000 results in a time of 340ns. And the additional 40ns
> are due to the state transitions wh and wl in the FSM, so you must get
> 340ns+20ns+800ns+20ns = 1180ns and 600ns+20ns+700ns+20ns = 1340ns with
> this code.
Wow. Thanks!

Lothar M. wrote:
> So that turns out the question: whats the actual problem?
As a "new" in VHDL/FPGA I was almost sure I did something wrong 
implementing ws2812.vhdl file. I expected 800khz for driving WS2812B 
leds.

Once again - many thanks! Your responses confirms that ws2812.vhdl 
doesn't generate 800 KHz pulse.


PS. ws2812.vhdl file is not mine - I've just found it on the internet.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.