timing optimizations

This commit is contained in:
marqs 2019-10-10 01:00:48 +03:00
parent b8c80c7425
commit 8e7236dc00
4 changed files with 6381 additions and 6362 deletions

View File

@ -50,7 +50,7 @@ reg [31:0] osd_config;
reg [10:0] xpos_osd_area_scaled, xpos_text_scaled; reg [10:0] xpos_osd_area_scaled, xpos_text_scaled;
reg [10:0] ypos_osd_area_scaled, ypos_text_scaled; reg [10:0] ypos_osd_area_scaled, ypos_text_scaled;
reg [7:0] x_ptr[2:5], y_ptr[2:5] /* synthesis ramstyle = "logic" */; reg [7:0] x_ptr[2:5], y_ptr[2:5] /* synthesis ramstyle = "logic" */;
reg osd_act_pp[2:5],osd_text_act_pp[2:5]; reg osd_text_act_pp[2:5], osd_act_pp[3:5];
reg [14:0] to_ctr, to_ctr_ms; reg [14:0] to_ctr, to_ctr_ms;
wire render_enable = osd_config[0]; wire render_enable = osd_config[0];
@ -97,19 +97,21 @@ char_rom char_rom_inst (
); );
// Pipeline structure // Pipeline structure
// | 1 | 2 | 3 | 4 | 5 | 6 | // | 0 | 1 | 2 | 3 | 4 | 5 |
// |-------------|------------|----------|---------|---------|------------| // |----------|----------|---------|---------|---------|--------|
// | xpos_scaled | x_ptr | x_ptr | x_ptr | x_ptr | | // > POS_TEXT | POS_AREA | | | | |
// | ypos_scaled | y_ptr | y_ptr | y_ptr | y_ptr | | // > | PTR | PTR | PTR | PTR | |
// | | osd_act | osd_act | osd_act | osd_act | osd_enable | // > | ENABLE | ENABLE | ENABLE | ENABLE | ENABLE |
// | | char_idx | char_idx | CBUF | CBUF | osd_color | // > | INDEX | INDEX | | | |
// > | | | CHARROM | CHARROM | COLOR |
integer idx, pp_idx; integer idx, pp_idx;
always @(posedge vclk) begin always @(posedge vclk) begin
xpos_osd_area_scaled <= xpos_scaled_w + 3'h4;
ypos_osd_area_scaled <= ypos_scaled_w + 3'h4;
xpos_text_scaled <= xpos_scaled_w; xpos_text_scaled <= xpos_scaled_w;
ypos_text_scaled <= ypos_scaled_w; ypos_text_scaled <= ypos_scaled_w;
xpos_osd_area_scaled <= xpos_text_scaled + 3'h4;
ypos_osd_area_scaled <= ypos_text_scaled + 3'h4;
x_ptr[2] <= xpos_text_scaled[7:0]; x_ptr[2] <= xpos_text_scaled[7:0];
y_ptr[2] <= ypos_text_scaled[7:0]; y_ptr[2] <= ypos_text_scaled[7:0];
for(pp_idx = 3; pp_idx <= 5; pp_idx = pp_idx+1) begin for(pp_idx = 3; pp_idx <= 5; pp_idx = pp_idx+1) begin
@ -117,13 +119,16 @@ always @(posedge vclk) begin
y_ptr[pp_idx] <= y_ptr[pp_idx-1]; y_ptr[pp_idx] <= y_ptr[pp_idx-1];
end end
osd_act_pp[2] <= render_enable & (menu_active || (to_ctr_ms > 0)) & ((xpos_osd_area_scaled < 8*(CHAR_COLS+1)) && (ypos_osd_area_scaled < 8*(CHAR_ROWS+1)));
osd_text_act_pp[2] <= render_enable & (menu_active || (to_ctr_ms > 0)) & ((xpos_text_scaled < 8*CHAR_COLS) && (ypos_text_scaled < 8*CHAR_ROWS)); osd_text_act_pp[2] <= render_enable & (menu_active || (to_ctr_ms > 0)) & ((xpos_text_scaled < 8*CHAR_COLS) && (ypos_text_scaled < 8*CHAR_ROWS));
for(pp_idx = 3; pp_idx <= 5; pp_idx = pp_idx+1) begin for(pp_idx = 3; pp_idx <= 5; pp_idx = pp_idx+1) begin
osd_act_pp[pp_idx] <= osd_act_pp[pp_idx-1];
osd_text_act_pp[pp_idx] <= osd_text_act_pp[pp_idx-1]; osd_text_act_pp[pp_idx] <= osd_text_act_pp[pp_idx-1];
end end
osd_act_pp[3] <= render_enable & (menu_active || (to_ctr_ms > 0)) & ((xpos_osd_area_scaled < 8*(CHAR_COLS+1)) && (ypos_osd_area_scaled < 8*(CHAR_ROWS+1)));
for(pp_idx = 4; pp_idx <= 5; pp_idx = pp_idx+1) begin
osd_act_pp[pp_idx] <= osd_act_pp[pp_idx-1];
end
osd_enable <= osd_act_pp[5]; osd_enable <= osd_act_pp[5];
osd_color = osd_text_act_pp[5] ? char_data[y_ptr[5]][x_ptr[5]] : 1'b0; osd_color = osd_text_act_pp[5] ? char_data[y_ptr[5]][x_ptr[5]] : 1'b0;
end end

View File

@ -218,7 +218,7 @@ set_global_assignment -name ENABLE_SIGNALTAP OFF
set_global_assignment -name USE_SIGNALTAP_FILE output_files/ossc_la.stp set_global_assignment -name USE_SIGNALTAP_FILE output_files/ossc_la.stp
set_global_assignment -name FITTER_EFFORT "AUTO FIT" set_global_assignment -name FITTER_EFFORT "AUTO FIT"
set_global_assignment -name SEED 4 set_global_assignment -name SEED 1

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<EnsembleReport name="sys" kind="sys" version="1.0" fabric="QSYS"> <EnsembleReport name="sys" kind="sys" version="1.0" fabric="QSYS">
<!-- Format version 17.1 590 (Future versions may contain additional information.) --> <!-- Format version 17.1 590 (Future versions may contain additional information.) -->
<!-- 2019.10.07.23:17:08 --> <!-- 2019.10.10.00:51:29 -->
<!-- A collection of modules and connections --> <!-- A collection of modules and connections -->
<parameter name="AUTO_GENERATION_ID"> <parameter name="AUTO_GENERATION_ID">
<type>java.lang.Integer</type> <type>java.lang.Integer</type>
<value>1570479428</value> <value>1570657889</value>
<derived>false</derived> <derived>false</derived>
<enabled>true</enabled> <enabled>true</enabled>
<visible>false</visible> <visible>false</visible>