mirror of
https://github.com/marqs85/ossc
synced 2026-11-20 21:34:29 +03:00
Merge branch 'release' of https://github.com/marqs85/ossc into upstream
This commit is contained in:
commit
0828addc83
9 files changed
+205
-63
No files matched your search
@@ -0,0 +1,6 @@
|
||||
set_global_assignment -name IP_TOOL_NAME "LPM_MUX"
|
||||
set_global_assignment -name IP_TOOL_VERSION "17.1"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone IV E}"
|
||||
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) "mux5.v"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "mux5_inst.v"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "mux5_bb.v"]
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
// megafunction wizard: %LPM_MUX%
|
||||
// GENERATION: STANDARD
|
||||
// VERSION: WM1.0
|
||||
// MODULE: LPM_MUX
|
||||
|
||||
// ============================================================
|
||||
// File Name: mux5.v
|
||||
// Megafunction Name(s):
|
||||
// LPM_MUX
|
||||
//
|
||||
// Simulation Library Files(s):
|
||||
// lpm
|
||||
// ============================================================
|
||||
// ************************************************************
|
||||
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
//
|
||||
// 17.1.0 Build 590 10/25/2017 SJ Lite Edition
|
||||
// ************************************************************
|
||||
|
||||
|
||||
//Copyright (C) 2017 Intel Corporation. All rights reserved.
|
||||
//Your use of Intel Corporation's design tools, logic functions
|
||||
//and other software and tools, and its AMPP partner logic
|
||||
//functions, and any output files from any of the foregoing
|
||||
//(including device programming or simulation files), and any
|
||||
//associated documentation or information are expressly subject
|
||||
//to the terms and conditions of the Intel Program License
|
||||
//Subscription Agreement, the Intel Quartus Prime License Agreement,
|
||||
//the Intel FPGA IP License Agreement, or other applicable license
|
||||
//agreement, including, without limitation, that your use is for
|
||||
//the sole purpose of programming logic devices manufactured by
|
||||
//Intel and sold by Intel or its authorized distributors. Please
|
||||
//refer to the applicable agreement for further details.
|
||||
|
||||
|
||||
// synopsys translate_off
|
||||
`timescale 1 ps / 1 ps
|
||||
// synopsys translate_on
|
||||
module mux5 (
|
||||
data0,
|
||||
data1,
|
||||
data2,
|
||||
data3,
|
||||
data4,
|
||||
sel,
|
||||
result);
|
||||
|
||||
input data0;
|
||||
input data1;
|
||||
input data2;
|
||||
input data3;
|
||||
input data4;
|
||||
input [2:0] sel;
|
||||
output result;
|
||||
|
||||
wire [0:0] sub_wire0;
|
||||
wire sub_wire7 = data4;
|
||||
wire sub_wire6 = data3;
|
||||
wire sub_wire5 = data2;
|
||||
wire sub_wire4 = data1;
|
||||
wire [0:0] sub_wire1 = sub_wire0[0:0];
|
||||
wire result = sub_wire1;
|
||||
wire sub_wire2 = data0;
|
||||
wire [4:0] sub_wire3 = {sub_wire7, sub_wire6, sub_wire5, sub_wire4, sub_wire2};
|
||||
|
||||
lpm_mux LPM_MUX_component (
|
||||
.data (sub_wire3),
|
||||
.sel (sel),
|
||||
.result (sub_wire0)
|
||||
// synopsys translate_off
|
||||
,
|
||||
.aclr (),
|
||||
.clken (),
|
||||
.clock ()
|
||||
// synopsys translate_on
|
||||
);
|
||||
defparam
|
||||
LPM_MUX_component.lpm_size = 5,
|
||||
LPM_MUX_component.lpm_type = "LPM_MUX",
|
||||
LPM_MUX_component.lpm_width = 1,
|
||||
LPM_MUX_component.lpm_widths = 3;
|
||||
|
||||
|
||||
endmodule
|
||||
|
||||
// ============================================================
|
||||
// CNX file retrieval info
|
||||
// ============================================================
|
||||
// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone IV E"
|
||||
// Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
// Retrieval info: PRIVATE: new_diagram STRING "1"
|
||||
// Retrieval info: LIBRARY: lpm lpm.lpm_components.all
|
||||
// Retrieval info: CONSTANT: LPM_SIZE NUMERIC "5"
|
||||
// Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_MUX"
|
||||
// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "1"
|
||||
// Retrieval info: CONSTANT: LPM_WIDTHS NUMERIC "3"
|
||||
// Retrieval info: USED_PORT: data0 0 0 0 0 INPUT NODEFVAL "data0"
|
||||
// Retrieval info: USED_PORT: data1 0 0 0 0 INPUT NODEFVAL "data1"
|
||||
// Retrieval info: USED_PORT: data2 0 0 0 0 INPUT NODEFVAL "data2"
|
||||
// Retrieval info: USED_PORT: data3 0 0 0 0 INPUT NODEFVAL "data3"
|
||||
// Retrieval info: USED_PORT: data4 0 0 0 0 INPUT NODEFVAL "data4"
|
||||
// Retrieval info: USED_PORT: result 0 0 0 0 OUTPUT NODEFVAL "result"
|
||||
// Retrieval info: USED_PORT: sel 0 0 3 0 INPUT NODEFVAL "sel[2..0]"
|
||||
// Retrieval info: CONNECT: @data 0 0 1 0 data0 0 0 0 0
|
||||
// Retrieval info: CONNECT: @data 0 0 1 1 data1 0 0 0 0
|
||||
// Retrieval info: CONNECT: @data 0 0 1 2 data2 0 0 0 0
|
||||
// Retrieval info: CONNECT: @data 0 0 1 3 data3 0 0 0 0
|
||||
// Retrieval info: CONNECT: @data 0 0 1 4 data4 0 0 0 0
|
||||
// Retrieval info: CONNECT: @sel 0 0 3 0 sel 0 0 3 0
|
||||
// Retrieval info: CONNECT: result 0 0 0 0 @result 0 0 1 0
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL mux5.v TRUE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL mux5.inc FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL mux5.cmp FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL mux5.bsf FALSE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL mux5_inst.v TRUE
|
||||
// Retrieval info: GEN_FILE: TYPE_NORMAL mux5_bb.v TRUE
|
||||
// Retrieval info: LIB_FILE: lpm
|
||||
+26
-17
@@ -33,6 +33,12 @@
|
||||
`define V_MULTMODE_4X 3'd3
|
||||
`define V_MULTMODE_5X 3'd4
|
||||
|
||||
`define PCLK_MUX_1X 3'd0
|
||||
`define PCLK_MUX_2X 3'd1
|
||||
`define PCLK_MUX_3X 3'd2
|
||||
`define PCLK_MUX_4X 3'd3
|
||||
`define PCLK_MUX_5X 3'd4
|
||||
|
||||
`define H_MULTMODE_FULLWIDTH 2'h0
|
||||
`define H_MULTMODE_ASPECTFIX 2'h1
|
||||
`define H_MULTMODE_OPTIMIZED 2'h2
|
||||
@@ -105,7 +111,7 @@ module scanconverter (
|
||||
wire pclk_act;
|
||||
wire pclk_1x, pclk_2x, pclk_3x, pclk_4x, pclk_5x;
|
||||
wire pclk_2x_lock, pclk_3x_lock;
|
||||
wire linebuf_rdclock;
|
||||
wire [2:0] pclk_mux_sel;
|
||||
|
||||
//RGB signals®isters: 8 bits per component -> 16.7M colors
|
||||
wire [7:0] R_act, G_act, B_act;
|
||||
@@ -338,8 +344,7 @@ case (V_MULTMODE)
|
||||
line_id_act = {2'b00, vcnt_1x[0]};
|
||||
hcnt_act = hcnt_1x;
|
||||
vcnt_act = vcnt_1x;
|
||||
pclk_act = pclk_1x;
|
||||
linebuf_rdclock = 0;
|
||||
pclk_mux_sel = `PCLK_MUX_1X;
|
||||
linebuf_hoffset = 0;
|
||||
col_id_act = {2'b00, hcnt_1x[0]};
|
||||
rlpf_trigger_act = 1'b1;
|
||||
@@ -354,16 +359,15 @@ case (V_MULTMODE)
|
||||
line_id_act = {1'b0, line_out_idx_2x[1], line_out_idx_2x[0]^FID_1x};
|
||||
hcnt_act = hcnt_2x;
|
||||
vcnt_act = vcnt_2x;
|
||||
linebuf_rdclock = pclk_2x;
|
||||
case (H_MULTMODE)
|
||||
default: begin //`H_MULTMODE_FULLWIDTH
|
||||
pclk_act = pclk_2x;
|
||||
pclk_mux_sel = `PCLK_MUX_2X;
|
||||
linebuf_hoffset = hcnt_2x;
|
||||
col_id_act = {2'b00, hcnt_2x[0]};
|
||||
rlpf_trigger_act = 1'b1;
|
||||
end
|
||||
`H_MULTMODE_OPTIMIZED: begin
|
||||
pclk_act = pclk_1x; //special case: pclk bypass to enable 2x native sampling
|
||||
pclk_mux_sel = `PCLK_MUX_1X; //special case: pclk bypass to enable 2x native sampling
|
||||
linebuf_hoffset = hcnt_2x_opt;
|
||||
col_id_act = {2'b00, hcnt_2x[1]};
|
||||
rlpf_trigger_act = (hcnt_2x_opt_ctr == H_OPT_SCALE-1'b1);
|
||||
@@ -381,24 +385,21 @@ case (V_MULTMODE)
|
||||
vcnt_act = vcnt_3x;
|
||||
case (H_MULTMODE)
|
||||
default: begin //`H_MULTMODE_FULLWIDTH
|
||||
pclk_act = pclk_3x;
|
||||
linebuf_rdclock = pclk_3x;
|
||||
pclk_mux_sel = `PCLK_MUX_3X;
|
||||
linebuf_hoffset = hcnt_3x;
|
||||
hcnt_act = hcnt_3x;
|
||||
col_id_act = {2'b00, hcnt_3x[0]};
|
||||
rlpf_trigger_act = 1'b1;
|
||||
end
|
||||
`H_MULTMODE_ASPECTFIX: begin
|
||||
pclk_act = pclk_4x;
|
||||
linebuf_rdclock = pclk_4x;
|
||||
pclk_mux_sel = `PCLK_MUX_4X;
|
||||
linebuf_hoffset = hcnt_4x_aspfix;
|
||||
hcnt_act = hcnt_4x_aspfix;
|
||||
col_id_act = {2'b00, hcnt_4x[0]};
|
||||
rlpf_trigger_act = 1'b1;
|
||||
end
|
||||
`H_MULTMODE_OPTIMIZED: begin
|
||||
pclk_act = pclk_3x;
|
||||
linebuf_rdclock = pclk_3x;
|
||||
pclk_mux_sel = `PCLK_MUX_3X;
|
||||
linebuf_hoffset = hcnt_3x_opt;
|
||||
hcnt_act = hcnt_3x;
|
||||
col_id_act = hcnt_3x_opt_ctr;
|
||||
@@ -416,8 +417,7 @@ case (V_MULTMODE)
|
||||
line_id_act = {1'b0, line_out_idx_4x};
|
||||
hcnt_act = hcnt_4x;
|
||||
vcnt_act = vcnt_4x;
|
||||
pclk_act = pclk_4x;
|
||||
linebuf_rdclock = pclk_4x;
|
||||
pclk_mux_sel = `PCLK_MUX_4X;
|
||||
case (H_MULTMODE)
|
||||
default: begin //`H_MULTMODE_FULLWIDTH
|
||||
linebuf_hoffset = hcnt_4x;
|
||||
@@ -441,8 +441,7 @@ case (V_MULTMODE)
|
||||
line_id_act = line_out_idx_5x;
|
||||
hcnt_act = hcnt_5x;
|
||||
vcnt_act = vcnt_5x;
|
||||
pclk_act = pclk_5x;
|
||||
linebuf_rdclock = pclk_5x;
|
||||
pclk_mux_sel = `PCLK_MUX_5X;
|
||||
case (H_MULTMODE)
|
||||
default: begin //`H_MULTMODE_FULLWIDTH
|
||||
linebuf_hoffset = hcnt_5x_hscomp;
|
||||
@@ -482,13 +481,23 @@ wire [11:0] linebuf_wraddr = hcnt_1x-H_AVIDSTART;
|
||||
linebuf linebuf_rgb (
|
||||
.data({R_in_L, G_in_L, B_in_L}),
|
||||
.rdaddress ( {~line_idx, linebuf_rdaddr[10:0]} ),
|
||||
.rdclock ( linebuf_rdclock ),
|
||||
.rdclock ( pclk_act ),
|
||||
.wraddress( {line_idx, linebuf_wraddr[10:0]} ),
|
||||
.wrclock ( pclk_1x ),
|
||||
.wren ( !linebuf_wraddr[11] ),
|
||||
.q ( {R_lbuf, G_lbuf, B_lbuf} )
|
||||
);
|
||||
|
||||
mux5 mux5_inst (
|
||||
.data0 ( pclk_1x ),
|
||||
.data1 ( pclk_2x ),
|
||||
.data2 ( pclk_3x ),
|
||||
.data3 ( pclk_4x ),
|
||||
.data4 ( pclk_5x ),
|
||||
.sel ( pclk_mux_sel ),
|
||||
.result ( pclk_act )
|
||||
);
|
||||
|
||||
//Postprocess pipeline
|
||||
//
|
||||
// Latency with respect to h_cnt/v_cnt before 1st stage:
|
||||
|
||||
Reference in new issue
Block a user