outputcmprs_en_extend,// @mclk keep compressor enabled for graceful shutdown
inputcmprs_run,// @mclk enable propagation of vsync_late to frame_start_dst in bonded(sync to src) mode
inputcmprs_standalone,// @mclk single-cycle: generate a single frame_start_dst in unbonded (not synchronized) mode.
// cmprs_run should be off
inputsigle_frame_buf,// memory controller uses a single frame buffer (frame_number_* == 0), use other sync
inputvsync_late,// @xclk delayed start of frame, @xclk. In 353 it was 16 lines after VACT active
// source channel should already start, some delay give time for sequencer commands
// that should arrive before it
inputframe_started,// @xclk started first macroblock (checking for broken frames)
outputframe_start_dst,// @mclk - trigger receive (tiled) memory channel (it will take care of single/repetitive
// this output either follows vsync_late (reclocks it) or generated in non-bonded mode
// (compress from memory)
input[FRAME_HEIGHT_BITS-1:0]line_unfinished_src,// number of the current (unfinished ) line, in the source (sensor) channel (RELATIVE TO FRAME, NOT WINDOW?)
input[LAST_FRAME_BITS-1:0]frame_number_src,// current frame number (for multi-frame ranges) in the source (sensor) channel
inputframe_done_src,// single-cycle pulse when the full frame (window) was transferred to/from DDR3 memory
// frame_done_src is later than line_unfinished_src/ frame_number_src changes
// Used withe a single-frame buffers
input[FRAME_HEIGHT_BITS-1:0]line_unfinished,// number of the current (unfinished ) line in this (compressor) channel
input[LAST_FRAME_BITS-1:0]frame_number,// current frame number (for multi-frame ranges) in this (compressor channel
inputframe_done,// input - single-cycle pulse when the full frame (window) was transferred to/from DDR3 memory
outputregsuspend,// suspend reading data for this channel - waiting for the source data
outputregbroken_frame// next frame start came before previous frame was read to compressor
);
wirevsync_late_mclk;// single mclk cycle, reclocked from vsync_late
wireframe_started_mclk;
regbonded_mode;
regframe_start_dst_r;
regframes_differ;// src and dest point to different frames (single-frame buffer mode), disregard line_unfinished_*
regframes_numbers_differ;// src and dest point to different frames (multi-frame buffer mode), disregard line_unfinished_*
regline_numbers_sync;// src unfinished line number is > this unfinished line number
regreading_frame;// compressor is reading frame data (make sure input is done before starting next frame, otherwise make it a broken frame
// s ynthesis attribute use_sync_set of stuffer is no;
// s ynthesis attribute use_sync_set of stuffer is no;
// s ynthesis attribute use_sync_reset of stuffer is no;
// s ynthesis attribute use_sync_reset of stuffer is no;
// s ynthesis attribute use_clock_enable of stuffer is no;
// s ynthesis attribute use_clock_enable of stuffer is no;
// TODO:
// 1: Add FIFO buffer - with hclk on the read side
// 2: Get rid of imgptr - read addresses from the AFI module
// 3 Add multi-word status transmitter or just status transmit module for each compressor channel (29 bits are OK to read in multiple of 32-byte blocks
// Or make FIFO outside of the stuffer?
modulestuffer393(
modulestuffer393(
inputclk,// 2x pixel clock
inputclk,// 2x pixel clock
...
@@ -51,9 +55,10 @@ module stuffer393 (
...
@@ -51,9 +55,10 @@ module stuffer393 (
input[31:0]sec,// [31:0] number of seconds
input[31:0]sec,// [31:0] number of seconds
input[19:0]usec,// [19:0] number of microseconds
input[19:0]usec,// [19:0] number of microseconds
outputrdy,// enable huffman encoder to proceed. Used as CE for many huffman encoder registers
outputrdy,// enable huffman encoder to proceed. Used as CE for many huffman encoder registers
// outputs @ negedge clk
outputreg[15:0]q,// [15:0] output data
outputreg[15:0]q,// [15:0] output data
outputregqv,// output data valid
outputregqv,// output data valid
outputdone,// reset by !en, goes high after some delay after flushing
outputdone,// reset by !en, goes high after some delay after flushing
outputreg[23:0]imgptr,// [23:0]image pointer in 32-byte chunks
outputreg[23:0]imgptr,// [23:0]image pointer in 32-byte chunks