Skip to content

Commit

Permalink
hdl/csc: add latency parameter and some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Aug 11, 2015
1 parent afa42db commit 8c238f5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions hdl/csc/rgb2ycbcr.py
Expand Up @@ -8,9 +8,6 @@

# TODO:
# - see if we can regroup some stages without impacting timings (would reduce latency and registers).
# - test implementation
# - do more tests.


def rgb2ycbcr_coefs(dw, cw=None):
return {
Expand Down Expand Up @@ -137,6 +134,7 @@ def __init__(self, rgb_w=8, ycbcr_w=8, coef_w=8):
self.sink = sink = Sink(EndpointDescription(rgb_layout(rgb_w), packetized=True))
self.source = source = Source(EndpointDescription(ycbcr_layout(ycbcr_w), packetized=True))
PipelinedActor.__init__(self, datapath_latency)
self.latency = datapath_latency

# # #

Expand Down
5 changes: 1 addition & 4 deletions hdl/csc/ycbcr2rgb.py
Expand Up @@ -6,10 +6,6 @@

from hdl.csc.common import *

# TODO:
# - test implementation
# - do more test

def ycbcr2rgb_coefs(dw, cw=None):
ca = 0.1819
cb = 0.0618
Expand Down Expand Up @@ -113,6 +109,7 @@ def __init__(self, ycbcr_w=8, rgb_w=8, coef_w=8):
self.sink = sink = Sink(EndpointDescription(ycbcr_layout(ycbcr_w), packetized=True))
self.source = source = Source(EndpointDescription(rgb_layout(rgb_w), packetized=True))
PipelinedActor.__init__(self, datapath_latency)
self.latency = datapath_latency

# # #

Expand Down
2 changes: 1 addition & 1 deletion hdl/dvisampler/analysis.py
Expand Up @@ -139,7 +139,7 @@ def __init__(self, word_width, fifo_depth):
]
de = self.de
vsync = self.vsync
for i in range(8): # rgb2ycbcr latency
for i in range(rgb2ycbcr.latency):
next_de = Signal()
next_vsync = Signal()
self.sync.pix += [
Expand Down
2 changes: 1 addition & 1 deletion hdl/framebuffer/phy.py
Expand Up @@ -214,7 +214,7 @@ def __init__(self, pack_factor, pads_vga, pads_dvi):
de = fifo.pix_de
hsync = fifo.pix_hsync
vsync = fifo.pix_vsync
for i in range(4): # ycbcr2rgb latency
for i in range(ycbcr2rgb.latency):
next_de = Signal()
next_vsync = Signal()
next_hsync = Signal()
Expand Down

0 comments on commit 8c238f5

Please sign in to comment.