DHBKM1800I-82 Data driven to head at correct frequency (20mhz)

This commit is contained in:
Christos Spirotis 2020-04-15 14:24:43 +01:00
commit 043c24e572
15 changed files with 994 additions and 78 deletions

View file

@ -60,6 +60,8 @@ end entity gl_remap;
architecture rtl of gl_remap is
signal out_cnt : unsigned(3 downto 0);
begin
P_DATA_OUT : process(rst_n, clk) is
@ -68,8 +70,19 @@ begin
out_data_head <= (others => '0');
out_data_valid <= '0';
in_ready <= '0';
out_cnt <= (others => '0');
elsif clk'event and clk = '1' then
in_ready <= in_valid and not(in_ready);
if unsigned(out_cnt) /= 9 then
out_cnt <= unsigned(out_cnt) + 1;
else
out_cnt <= (others => '0');
end if;
if (unsigned(out_cnt) = 0 or unsigned(out_cnt) = 4) then
in_ready <= in_valid;
else
in_ready <= '0';
end if;
-- When active, process the input data
if in_valid = '1' and in_ready = '1' then

View file

@ -0,0 +1,431 @@
-------------------------------------------------------------------------------
--! @file
--! @brief SOM FPGA pixel buffer
--!
--! @details This block is the the data core pixel buffer for the Presto projects.
--! it stores pixel strip data, with a write port from the print streamer, and
--! a read port from the data core slicer. The memory is organised into 18
--! (one for each data bit maximum) buffers of 32 bits x 64 deep, giving a
--! maximum capacity of over 10 stripes in 3bpp mode. The write control logic
--! will stripe received words into the buffers, from 0 to output width (6 or
--! 18) minus 1, moving on to next buffer after 64 pixels worth of data. Read
--! data is read from all buffers in parallel. Start requests without a 'first'
--! status resets the read pointer to beginning of stripe, to allow multi-wave
--! grey level operation. A start request with a 'first' status allows the
--! read pointer to advance to next stripe. See
--! https://confluence.gisapps.co.uk/pages/viewpage.action?spaceKey=GMAHMB&title=HMB-FD-GMA+Design+Documentation
--!
--! @b Clock/resets:
--! @li clk : nominally 100MHz
--! @li rst_n : active low reset for clk (asynchronous assert)
--!
--! @b Interfaces:
--! @li pixel_buf_rdy : Ready status output towards print streamer
--! @li data : pixel data from print streamer
--! @li last_word : Flag input indicating data is the last word of an image's stripes
--! @li wrreq : buffer write request from print streamer
--! @li q : pixel read data to GL remapper
--! @li rdreq : pixel read request from GL remapper
--! @li empty : buffer empty status.
--! @li full : buffer full (with look-ahead) status
--! @li overrun : Pixel buffer overrun error status
--! @li underrun : Pixel buffer underrun error status
--! @li fp_drop : Fire pulse drop seen
--! @li dbl_drop : Double fire pulse 'droppy' error status
--! @li print_data_width : print output data width (6 or 18 for GMA)
--! @li clear_buffer : Pixel buffer clear pulse input
--! @li start_req : start request pulse from print data sequencer, via delay queue
--! @li start_req_first : start request first wave/next stripe status from print data sequencer, via delay queue
--! @li start_req_last : start request last wave status from print data sequencer, via delay queue
--! @li is_last_wave : Status output flagging processing last wave
--! @li fire_req : Fire pulse request input
--! @li sequencers_busy : Status output indicating sequences busy with respect to accepting a new fire pulse
--! @li fp_holdoff_update : Strobe input to indicate valid holdoff data (wave sequence length)
--! @li wave_seq_len : Wave sequence length input, in clock cycles for fire request holdoff
--! @li ip_id_ip_number : Module's ID number
--! @li ip_id_mfr_number : Module's manufacture number
--! @li ip_ver_minor_number : Module's Minor version number
--! @li ip_ver_major_number : Module's Major version number
--!
--! @b Clock-crossing considerations:
--! @li Module is a single clock domain synchronous block
--!
--! @b Language build standard requirements:
--! @li VHDL 2008
--!
--! @author Simon Southwell
--! @copyright (c) 2018 Global Inkjet Systems
--! @date 2018-4-12
-------------------------------------------------------------------------------
-- altera vhdl_input_version vhdl_2008
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.common_pkg.all;
entity pixel_buffer_0 IS
generic (
MAX_OP_WIDTH : natural range 1 to 48 := 48;
SHIFT_DEPTH : integer range 1 to 1024 := 128;
PX_DEPTH : integer range 2 to 1024 := 64;
FULL_MARGIN : integer range 2 to 1024 := 8;
EN_PEEK : boolean := false;
VECTORED_RDREQ : boolean := false
);
port
(
clk : in std_logic;
rst_n : in std_logic;
pixel_buf_rdy : out std_logic;
last_word : in std_logic;
data : in std_logic_vector(31 downto 0);
wrreq : in std_logic;
rdreq : in std_logic;
rdreq_vec : in std_logic_vector(MAX_OP_WIDTH-1 downto 0) := (others => '0');
q : out std_logic_vector(MAX_OP_WIDTH*33-1 downto 0);
empty : out std_logic;
full : out std_logic;
overrun : out std_logic;
underrun : out std_logic;
dbl_drop : out std_logic;
fp_drop : out std_logic;
print_data_width : in std_logic_vector( 5 downto 0);
clear_buffer : in std_logic;
start_req : in std_logic;
start_req_first : in std_logic;
start_req_last : in std_logic;
is_last_wave : out std_logic;
fire_req : in std_logic;
sequencers_busy : out std_logic;
fp_holdoff_update : in std_logic;
wave_seq_len : in std_logic_vector(15 downto 0);
-- Diagnostic port to peek into pixel buffers, available when EN_PEEK is true.
-- Must only be used when buffer idle (i.e. no fire_req pulses) else output data
-- could be corrupted, although internal state and buffer values remain correct.
diag_peek_sel : in std_logic := '0';
diag_peek_addr : in std_logic_vector(31 downto 0) := (others => '0');
diag_peek_data : out std_logic_vector(31 downto 0);
diag_peek_rdptr : out std_logic_vector( 7 downto 0);
ip_id_ip_number : out std_logic_vector( 7 downto 0) := 8x"1c";
ip_id_mfr_number : out std_logic_vector( 7 downto 0) := 8x"00";
ip_ver_minor_number : out std_logic_vector( 7 downto 0) := 8x"02";
ip_ver_major_number : out std_logic_vector( 7 downto 0) := 8x"00";
diag_word_count : out std_logic_vector(6 downto 0)
);
end pixel_buffer_0;
architecture rtl of pixel_buffer_0 is
constant PX_DEPTH_LOG2 : integer := log2(PX_DEPTH);
constant PX_WIDTH : integer := 33;
constant FULL_THRESHOLD : integer := PX_DEPTH-FULL_MARGIN;
subtype OP_WIDTH_RANGE is natural range 1 to MAX_OP_WIDTH;
type diag_array_t is array (natural range <> ) of std_logic_vector;
type rd_ptr_t is array (0 to MAX_OP_WIDTH-1) of std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal wr_ptr : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal rd_ptr : rd_ptr_t;
signal rd_ptr_int : rd_ptr_t;
signal rd_ptr_start : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal wr_ptr_start : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal wr_ptr_plus1 : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal buf_word_count : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal pixel_buf_wr_shft : std_logic_vector(MAX_OP_WIDTH-1 downto 0);
signal wren : std_logic_vector(MAX_OP_WIDTH-1 downto 0);
signal word_count : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal word_wrap : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal word_wrap_plus1 : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal error : std_logic;
signal pend_drop_detect : std_logic;
signal drop_adjust : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal next_drop_adjust : std_logic_vector(PX_DEPTH_LOG2 downto 0);
signal holdoff_count : std_logic_vector(15 downto 0);
signal next_sequencers_busy : std_logic;
signal fire_drop_detect : std_logic;
signal wr_req_int : std_logic;
signal data_int : std_logic_vector(32 downto 0);
signal writing_first_stripe : std_logic;
signal diag_peek_data_int : diag_array_t(0 to MAX_OP_WIDTH-1)(PX_WIDTH-1 downto 0);
signal is_en_peek : std_logic;
signal rdreq_vec_int : std_logic_vector(MAX_OP_WIDTH-1 downto 0);
begin
-- pragma translate_off
assert FULL_MARGIN < PX_DEPTH report "FULL_MARGIN must be < PX_DEPTH" severity failure;
-- pragma translate_on
GEN_RDREQ_VEC : if VECTORED_RDREQ generate
rdreq_vec_int <= rdreq_vec;
end generate;
GEN_NORDREQ_VEC : if not VECTORED_RDREQ generate
rdreq_vec_int <= (others => rdreq);
end generate;
GEN_PIXEL_BUFFERS : for i in 0 to MAX_OP_WIDTH-1 generate
wren(i) <= pixel_buf_wr_shft(i) when wr_req_int = '1' else '0';
pixel_ram_inst : entity work.pixel_ram_0
generic map (
DEPTH => PX_DEPTH,
WIDTH => PX_WIDTH
)
port map
(
clock => clk,
data => data_int,
rdaddress => rd_ptr_int(i)(PX_DEPTH_LOG2-1 downto 0),
wraddress => wr_ptr(PX_DEPTH_LOG2-1 downto 0),
wren => wren(i),
q => q((i+1)*PX_WIDTH-1 downto i*PX_WIDTH)
);
end generate GEN_PIXEL_BUFFERS;
word_wrap_plus1 <= std_logic_vector(unsigned(word_wrap)+1);
empty <= '1' when unsigned(word_count) = 0 else '0';
full <= '1' when unsigned(word_count) >= FULL_THRESHOLD else '0';
writing_first_stripe <= '1' when ((unsigned(word_count) = unsigned(word_wrap_plus1)) and pixel_buf_wr_shft(0) = '0') or
((unsigned(word_count) < unsigned(word_wrap_plus1)) and wren(0) = '1') or
empty = '1'
else '0';
error <= underrun or overrun or dbl_drop;
pixel_buf_rdy <= not full and not error;
-- Single source of write pointer + 1, used in multiple places
wr_ptr_plus1 <= std_logic_vector(unsigned(wr_ptr) + 1);
-- Word count wrap BPP3 (packed to 4) => 15 for depth of 128)
word_wrap <= std_logic_vector(to_unsigned((4*SHIFT_DEPTH/32)-1,PX_DEPTH_LOG2+1));
-- The pixel buffer droppy deletion count is a function of the number of words
-- in the shift: e.g. 64 bits = 8, 96 bits = 12, 128 bits = 16 etc.
next_drop_adjust <= std_logic_vector(to_unsigned((4*SHIFT_DEPTH/32),PX_DEPTH_LOG2+1));
next_sequencers_busy <= '1' when unsigned(holdoff_count) /= 0 else '0';
fire_drop_detect <= '1' when fire_req = '1' and sequencers_busy = '1' else '0';
diag_word_count <= word_count(diag_word_count'left downto 0);
-- If pixel buffer peeking enabled, then mux the read pointer
-- to the buffers with diag address
GENPK : if EN_PEEK generate
is_en_peek <= '1';
GEN_RDPTR_INT : for i in 0 to MAX_OP_WIDTH-1 generate
rd_ptr_int(i) <= rd_ptr(i) when diag_peek_sel = '0' else "0" & diag_peek_addr(PX_DEPTH_LOG2-1 downto 0);
end generate;
end generate;
-- When no buffer peeking, use only the calculatrated read address
GENNOPL : if not EN_PEEK generate
is_en_peek <= '0';
GEN_RDPTR_INT : for i in 0 to MAX_OP_WIDTH-1 generate
rd_ptr_int(i) <= rd_ptr(i);
end generate;
end generate;
PX_BUF_CTRL : process(rst_n, clk) is
variable op_width : OP_WIDTH_RANGE;
begin
if rst_n = '0' then
for i in 0 to MAX_OP_WIDTH-1 loop
rd_ptr(i) <= (others => '0');
end loop;
rd_ptr_start <= (others => '0');
wr_ptr_start <= (others => '0');
wr_ptr <= (others => '0');
buf_word_count <= (others => '0');
pixel_buf_wr_shft(pixel_buf_wr_shft'length-1 downto 1) <= (others => '0');
pixel_buf_wr_shft(0) <= '1';
word_count <= (others => '0');
is_last_wave <= '0';
overrun <= '0';
underrun <= '0';
pend_drop_detect <= '0';
dbl_drop <= '0';
fp_drop <= '0';
holdoff_count <= (others => '0');
sequencers_busy <= '0';
wr_req_int <= '0';
elsif clk'event and clk = '1' then
wr_req_int <= wrreq;
data_int <= last_word & data;
if clear_buffer = '1' then
for i in 0 to MAX_OP_WIDTH-1 loop
rd_ptr(i) <= (others => '0');
end loop;
rd_ptr_start <= (others => '0');
wr_ptr_start <= (others => '0');
wr_ptr <= (others => '0');
buf_word_count <= (others => '0');
pixel_buf_wr_shft(pixel_buf_wr_shft'length-1 downto 1) <= (others => '0');
pixel_buf_wr_shft(0) <= '1';
word_count <= (others => '0');
is_last_wave <= '0';
overrun <= '0';
underrun <= '0';
pend_drop_detect <= '0';
dbl_drop <= '0';
fp_drop <= '0';
end if;
if fp_holdoff_update = '1' then
holdoff_count <= wave_seq_len;
elsif unsigned(holdoff_count) /= 0 then
holdoff_count <= std_logic_vector(unsigned(holdoff_count) - 1);
end if;
sequencers_busy <= next_sequencers_busy;
-- Register the droppy adjust count to relieve timing
drop_adjust <= next_drop_adjust;
-- On the start request from the print data sequencer, when first
-- (i.e. first in multi-wave grey level, or just a single binary)
-- store the start of the next stripe data. If not first, reset the
-- read pointer to the beginning of the stripe for the subsequent
-- grey level mapping and waveform.
if start_req = '1' and error = '0' then
if start_req_first = '1' then
rd_ptr_start <= rd_ptr(0);
else
for i in 0 TO MAX_OP_WIDTH-1 loop
rd_ptr(i) <= rd_ptr_start;
end loop;
end if;
-- When the start of the last wave (which could also be the first), latch
-- state to indicate this for the whole transfer.
if start_req_last = '1' then
is_last_wave <= '1';
else
is_last_wave <= '0';
end if;
end if;
-- If pixel buffer peeking diags enabled, export the read pointer
if is_en_peek then
diag_peek_rdptr <= rd_ptr(0)(7 downto 0);
else
diag_peek_rdptr <= (others => '0');
end if;
-- Increment the read pointer for each read request
for i in 0 TO MAX_OP_WIDTH-1 loop
if rdreq_vec_int(i) = '1' and error = '0' then
rd_ptr(i) <= std_logic_vector(unsigned(rd_ptr(i)) + 1);
end if;
end loop;
for i in 0 to MAX_OP_WIDTH-1 loop
if is_en_peek = '1' and i = unsigned(diag_peek_addr(log2(MAX_OP_WIDTH)-1+PX_DEPTH_LOG2 downto PX_DEPTH_LOG2)) then
diag_peek_data <= q((i+1)*PX_WIDTH-2 downto i*PX_WIDTH);
end if;
end loop;
-- Update buffer input state when ever we get a strobe
if wr_req_int = '1' and error = '0' then
-- If the buffer 32 bit word count reached 3*bpp - 1, then rollover to 0
if buf_word_count = word_wrap then
buf_word_count <= (others => '0');
-- At rollover, move writes on to the next buffer. The shift register
-- feedback is from the top bit for the configured output width
op_width := to_integer(unsigned(print_data_width));
pixel_buf_wr_shft <= pixel_buf_wr_shft(pixel_buf_wr_shft'length-2 downto 0) & pixel_buf_wr_shft(op_width - 1);
-- if moving on to the next buffer, reset the write pointer to the last start address
if pixel_buf_wr_shft(op_width - 1) /= '1' then
wr_ptr <= wr_ptr_start;
else
-- If about to wrap to the next stripe, update the saved wr_ptr to
-- the next word, and allow the wr_ptr to advance
wr_ptr_start <= wr_ptr_plus1;
wr_ptr <= wr_ptr_plus1;
end if;
--
else
-- Whilst writing data to the active buffer, increment the word count and write pointer
buf_word_count <= std_logic_vector(unsigned(buf_word_count) + 1);
wr_ptr <= wr_ptr_plus1;
end if;
end if;
-- Keep a count, for buffer 0, of the number of words in the buffer.
-- Increment count when written, and decrement when read during the
-- the last wave pulse, but leave static if reading (last pulse) and
-- writing, or neither reading during last pulse nor writing.
if error = '0' then
if wren(0) = '1' and (rdreq_vec_int(0) = '0' or is_last_wave = '0') then
word_count <= std_logic_vector(unsigned(word_count) + 1);
elsif wren(0) = '0' and rdreq_vec_int(0) = '1' and is_last_wave = '1' then
word_count <= std_logic_vector(unsigned(word_count) - 1);
end if;
end if;
--
if unsigned(word_count) = PX_DEPTH and wr_req_int = '1' then
overrun <= '1';
end if;
if writing_first_stripe = '1' and rdreq_vec_int(0) = '1' then
underrun <= '1';
end if;
-- If a drop of a fire pulse is detected, remember that here
if fire_drop_detect = '1' then
fp_drop <= '1';
if pend_drop_detect = '1' then
dbl_drop <= '1';
end if;
pend_drop_detect <= '1';
end if;
-- If a 'droppy' situation is outstanding, wait for the data path to go idle
-- and clear the contents of the next stripe
if pend_drop_detect = '1' and sequencers_busy = '0' and unsigned(wren) = 0 and word_count >= drop_adjust and unsigned(rdreq_vec_int) = 0 then
pend_drop_detect <= '0';
for i in 0 to MAX_OP_WIDTH-1 loop
rd_ptr(i) <= std_logic_vector(unsigned(rd_ptr(i)) + unsigned(drop_adjust));
end loop;
word_count <= std_logic_vector(unsigned(word_count) - unsigned(drop_adjust));
end if;
end if;
end process;
end architecture;

View file

@ -78,7 +78,7 @@ begin
pixel_buf_rd <= '0';
if op_bit_count_u(2 downto 0) = 2 then
if op_bit_count_u(2 downto 0) = 1 then
pixel_buf_rd <= gl_remap_ready;
end if;

View file

@ -259,6 +259,7 @@ set_location_assignment PIN_J15 -to n_h3_therm_trip_in[1]
set_location_assignment PIN_G15 -to n_h3_therm_trip_in[2]
set_location_assignment PIN_K9 -to therm_trip_rst
set_location_assignment PIN_K10 -to shutdown_out
set_global_assignment -name QIP_FILE ip/pll_lvds.qip
set_global_assignment -name QIP_FILE ip/lvds_rx_1ck_2d.qip
set_global_assignment -name VHDL_FILE ../src/hmb_head_monitor.vhd
set_global_assignment -name VERILOG_FILE ../src/simple_i2c_slave.v

View file

@ -45,18 +45,14 @@ ENTITY lvds_rx_1ck_2d IS
rx_data_align : IN STD_LOGIC ;
rx_in : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
rx_inclock : IN STD_LOGIC ;
rx_locked : OUT STD_LOGIC ;
rx_out : OUT STD_LOGIC_VECTOR (19 DOWNTO 0);
rx_outclock : OUT STD_LOGIC
rx_out : OUT STD_LOGIC_VECTOR (19 DOWNTO 0)
);
END lvds_rx_1ck_2d;
ARCHITECTURE SYN OF lvds_rx_1ck_2d IS
SIGNAL sub_wire0 : STD_LOGIC ;
SIGNAL sub_wire1 : STD_LOGIC_VECTOR (19 DOWNTO 0);
SIGNAL sub_wire2 : STD_LOGIC ;
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (19 DOWNTO 0);
@ -114,16 +110,12 @@ ARCHITECTURE SYN OF lvds_rx_1ck_2d IS
rx_data_align : IN STD_LOGIC ;
rx_in : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
rx_inclock : IN STD_LOGIC ;
rx_locked : OUT STD_LOGIC ;
rx_out : OUT STD_LOGIC_VECTOR (19 DOWNTO 0);
rx_outclock : OUT STD_LOGIC
rx_out : OUT STD_LOGIC_VECTOR (19 DOWNTO 0)
);
END COMPONENT;
BEGIN
rx_locked <= sub_wire0;
rx_out <= sub_wire1(19 DOWNTO 0);
rx_outclock <= sub_wire2;
rx_out <= sub_wire0(19 DOWNTO 0);
ALTLVDS_RX_component : ALTLVDS_RX
GENERIC MAP (
@ -162,7 +154,7 @@ BEGIN
port_rx_data_align => "PORT_USED",
refclk_frequency => "UNUSED",
registered_data_align_input => "UNUSED",
registered_output => "ON",
registered_output => "OFF",
reset_fifo_at_first_lock => "UNUSED",
rx_align_data_reg => "UNUSED",
sim_dpa_is_negative_ppm_drift => "OFF",
@ -170,7 +162,7 @@ BEGIN
sim_dpa_output_clock_phase_shift => 0,
use_coreclock_input => "OFF",
use_dpll_rawperror => "OFF",
use_external_pll => "OFF",
use_external_pll => "ON",
use_no_phase_shift => "ON",
x_on_bitslip => "ON",
clk_src_is_pll => "off"
@ -179,9 +171,7 @@ BEGIN
rx_data_align => rx_data_align,
rx_in => rx_in,
rx_inclock => rx_inclock,
rx_locked => sub_wire0,
rx_out => sub_wire1,
rx_outclock => sub_wire2
rx_out => sub_wire0
);
@ -201,7 +191,7 @@ END SYN;
-- Retrieval info: PRIVATE: Dpll_Lock_Window NUMERIC "0"
-- Retrieval info: PRIVATE: Enable_DPA_Mode STRING "OFF"
-- Retrieval info: PRIVATE: Enable_FIFO_DPA_Channels NUMERIC "0"
-- Retrieval info: PRIVATE: Ext_PLL STRING "OFF"
-- Retrieval info: PRIVATE: Ext_PLL STRING "ON"
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
-- Retrieval info: PRIVATE: Le_Serdes STRING "ON"
-- Retrieval info: PRIVATE: Num_Channel NUMERIC "2"
@ -212,12 +202,12 @@ END SYN;
-- Retrieval info: PRIVATE: PLL_Freq STRING "50.00"
-- Retrieval info: PRIVATE: PLL_Period STRING "20.000"
-- Retrieval info: PRIVATE: pOUTCLOCK_PHASE_SHIFT NUMERIC "0"
-- Retrieval info: PRIVATE: Reg_InOut NUMERIC "1"
-- Retrieval info: PRIVATE: Reg_InOut NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Cda_Reset NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Clock_Resc STRING "AUTO"
-- Retrieval info: PRIVATE: Use_Common_Rx_Tx_Plls NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Data_Align NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Lock NUMERIC "1"
-- Retrieval info: PRIVATE: Use_Lock NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Pll_Areset NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Rawperror NUMERIC "0"
-- Retrieval info: PRIVATE: Use_Tx_Out_Phase NUMERIC "0"
@ -257,7 +247,7 @@ END SYN;
-- Retrieval info: CONSTANT: PORT_RX_DATA_ALIGN STRING "PORT_USED"
-- Retrieval info: CONSTANT: REFCLK_FREQUENCY STRING "UNUSED"
-- Retrieval info: CONSTANT: REGISTERED_DATA_ALIGN_INPUT STRING "UNUSED"
-- Retrieval info: CONSTANT: REGISTERED_OUTPUT STRING "ON"
-- Retrieval info: CONSTANT: REGISTERED_OUTPUT STRING "OFF"
-- Retrieval info: CONSTANT: RESET_FIFO_AT_FIRST_LOCK STRING "UNUSED"
-- Retrieval info: CONSTANT: RX_ALIGN_DATA_REG STRING "UNUSED"
-- Retrieval info: CONSTANT: SIM_DPA_IS_NEGATIVE_PPM_DRIFT STRING "OFF"
@ -265,7 +255,7 @@ END SYN;
-- Retrieval info: CONSTANT: SIM_DPA_OUTPUT_CLOCK_PHASE_SHIFT NUMERIC "0"
-- Retrieval info: CONSTANT: USE_CORECLOCK_INPUT STRING "OFF"
-- Retrieval info: CONSTANT: USE_DPLL_RAWPERROR STRING "OFF"
-- Retrieval info: CONSTANT: USE_EXTERNAL_PLL STRING "OFF"
-- Retrieval info: CONSTANT: USE_EXTERNAL_PLL STRING "ON"
-- Retrieval info: CONSTANT: USE_NO_PHASE_SHIFT STRING "ON"
-- Retrieval info: CONSTANT: X_ON_BITSLIP STRING "ON"
-- Retrieval info: USED_PORT: rx_data_align 0 0 0 0 INPUT NODEFVAL "rx_data_align"
@ -274,12 +264,8 @@ END SYN;
-- Retrieval info: CONNECT: @rx_in 0 0 2 0 rx_in 0 0 2 0
-- Retrieval info: USED_PORT: rx_inclock 0 0 0 0 INPUT NODEFVAL "rx_inclock"
-- Retrieval info: CONNECT: @rx_inclock 0 0 0 0 rx_inclock 0 0 0 0
-- Retrieval info: USED_PORT: rx_locked 0 0 0 0 OUTPUT NODEFVAL "rx_locked"
-- Retrieval info: CONNECT: rx_locked 0 0 0 0 @rx_locked 0 0 0 0
-- Retrieval info: USED_PORT: rx_out 0 0 20 0 OUTPUT NODEFVAL "rx_out[19..0]"
-- Retrieval info: CONNECT: rx_out 0 0 20 0 @rx_out 0 0 20 0
-- Retrieval info: USED_PORT: rx_outclock 0 0 0 0 OUTPUT NODEFVAL "rx_outclock"
-- Retrieval info: CONNECT: rx_outclock 0 0 0 0 @rx_outclock 0 0 0 0
-- Retrieval info: GEN_FILE: TYPE_NORMAL lvds_rx_1ck_2d.vhd TRUE FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL lvds_rx_1ck_2d.qip TRUE FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL lvds_rx_1ck_2d.bsf FALSE TRUE

View file

@ -0,0 +1,7 @@
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
set_global_assignment -name IP_TOOL_VERSION "18.1"
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone 10 LP}"
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "pll_lvds.vhd"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_lvds_inst.vhd"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_lvds.cmp"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_lvds.ppf"]

View file

@ -0,0 +1,424 @@
-- megafunction wizard: %ALTPLL%
-- GENERATION: STANDARD
-- VERSION: WM1.0
-- MODULE: altpll
-- ============================================================
-- File Name: pll_lvds.vhd
-- Megafunction Name(s):
-- altpll
--
-- Simulation Library Files(s):
-- altera_mf
-- ============================================================
-- ************************************************************
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
--
-- 18.1.0 Build 625 09/12/2018 SJ Standard Edition
-- ************************************************************
--Copyright (C) 2018 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.
LIBRARY ieee;
USE ieee.std_logic_1164.all;
LIBRARY altera_mf;
USE altera_mf.all;
ENTITY pll_lvds IS
PORT
(
inclk0 : IN STD_LOGIC := '0';
c0 : OUT STD_LOGIC ;
c1 : OUT STD_LOGIC ;
c2 : OUT STD_LOGIC ;
locked : OUT STD_LOGIC
);
END pll_lvds;
ARCHITECTURE SYN OF pll_lvds IS
SIGNAL sub_wire0 : STD_LOGIC ;
SIGNAL sub_wire1 : STD_LOGIC_VECTOR (1 DOWNTO 0);
SIGNAL sub_wire2_bv : BIT_VECTOR (0 DOWNTO 0);
SIGNAL sub_wire2 : STD_LOGIC_VECTOR (0 DOWNTO 0);
SIGNAL sub_wire3 : STD_LOGIC_VECTOR (4 DOWNTO 0);
SIGNAL sub_wire4 : STD_LOGIC ;
SIGNAL sub_wire5 : STD_LOGIC ;
SIGNAL sub_wire6 : STD_LOGIC ;
SIGNAL sub_wire7 : STD_LOGIC ;
COMPONENT altpll
GENERIC (
bandwidth_type : STRING;
clk0_divide_by : NATURAL;
clk0_duty_cycle : NATURAL;
clk0_multiply_by : NATURAL;
clk0_phase_shift : STRING;
clk1_divide_by : NATURAL;
clk1_duty_cycle : NATURAL;
clk1_multiply_by : NATURAL;
clk1_phase_shift : STRING;
clk2_divide_by : NATURAL;
clk2_duty_cycle : NATURAL;
clk2_multiply_by : NATURAL;
clk2_phase_shift : STRING;
compensate_clock : STRING;
inclk0_input_frequency : NATURAL;
intended_device_family : STRING;
lpm_hint : STRING;
lpm_type : STRING;
operation_mode : STRING;
pll_type : STRING;
port_activeclock : STRING;
port_areset : STRING;
port_clkbad0 : STRING;
port_clkbad1 : STRING;
port_clkloss : STRING;
port_clkswitch : STRING;
port_configupdate : STRING;
port_fbin : STRING;
port_inclk0 : STRING;
port_inclk1 : STRING;
port_locked : STRING;
port_pfdena : STRING;
port_phasecounterselect : STRING;
port_phasedone : STRING;
port_phasestep : STRING;
port_phaseupdown : STRING;
port_pllena : STRING;
port_scanaclr : STRING;
port_scanclk : STRING;
port_scanclkena : STRING;
port_scandata : STRING;
port_scandataout : STRING;
port_scandone : STRING;
port_scanread : STRING;
port_scanwrite : STRING;
port_clk0 : STRING;
port_clk1 : STRING;
port_clk2 : STRING;
port_clk3 : STRING;
port_clk4 : STRING;
port_clk5 : STRING;
port_clkena0 : STRING;
port_clkena1 : STRING;
port_clkena2 : STRING;
port_clkena3 : STRING;
port_clkena4 : STRING;
port_clkena5 : STRING;
port_extclk0 : STRING;
port_extclk1 : STRING;
port_extclk2 : STRING;
port_extclk3 : STRING;
self_reset_on_loss_lock : STRING;
width_clock : NATURAL
);
PORT (
inclk : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
clk : OUT STD_LOGIC_VECTOR (4 DOWNTO 0);
locked : OUT STD_LOGIC
);
END COMPONENT;
BEGIN
sub_wire2_bv(0 DOWNTO 0) <= "0";
sub_wire2 <= To_stdlogicvector(sub_wire2_bv);
sub_wire0 <= inclk0;
sub_wire1 <= sub_wire2(0 DOWNTO 0) & sub_wire0;
sub_wire6 <= sub_wire3(2);
sub_wire5 <= sub_wire3(1);
sub_wire4 <= sub_wire3(0);
c0 <= sub_wire4;
c1 <= sub_wire5;
c2 <= sub_wire6;
locked <= sub_wire7;
altpll_component : altpll
GENERIC MAP (
bandwidth_type => "AUTO",
clk0_divide_by => 1,
clk0_duty_cycle => 50,
clk0_multiply_by => 5,
clk0_phase_shift => "0",
clk1_divide_by => 1,
clk1_duty_cycle => 50,
clk1_multiply_by => 2,
clk1_phase_shift => "0",
clk2_divide_by => 1,
clk2_duty_cycle => 50,
clk2_multiply_by => 1,
clk2_phase_shift => "0",
compensate_clock => "CLK0",
inclk0_input_frequency => 20000,
intended_device_family => "Cyclone 10 LP",
lpm_hint => "CBX_MODULE_PREFIX=pll_lvds",
lpm_type => "altpll",
operation_mode => "NORMAL",
pll_type => "AUTO",
port_activeclock => "PORT_UNUSED",
port_areset => "PORT_UNUSED",
port_clkbad0 => "PORT_UNUSED",
port_clkbad1 => "PORT_UNUSED",
port_clkloss => "PORT_UNUSED",
port_clkswitch => "PORT_UNUSED",
port_configupdate => "PORT_UNUSED",
port_fbin => "PORT_UNUSED",
port_inclk0 => "PORT_USED",
port_inclk1 => "PORT_UNUSED",
port_locked => "PORT_USED",
port_pfdena => "PORT_UNUSED",
port_phasecounterselect => "PORT_UNUSED",
port_phasedone => "PORT_UNUSED",
port_phasestep => "PORT_UNUSED",
port_phaseupdown => "PORT_UNUSED",
port_pllena => "PORT_UNUSED",
port_scanaclr => "PORT_UNUSED",
port_scanclk => "PORT_UNUSED",
port_scanclkena => "PORT_UNUSED",
port_scandata => "PORT_UNUSED",
port_scandataout => "PORT_UNUSED",
port_scandone => "PORT_UNUSED",
port_scanread => "PORT_UNUSED",
port_scanwrite => "PORT_UNUSED",
port_clk0 => "PORT_USED",
port_clk1 => "PORT_USED",
port_clk2 => "PORT_USED",
port_clk3 => "PORT_UNUSED",
port_clk4 => "PORT_UNUSED",
port_clk5 => "PORT_UNUSED",
port_clkena0 => "PORT_UNUSED",
port_clkena1 => "PORT_UNUSED",
port_clkena2 => "PORT_UNUSED",
port_clkena3 => "PORT_UNUSED",
port_clkena4 => "PORT_UNUSED",
port_clkena5 => "PORT_UNUSED",
port_extclk0 => "PORT_UNUSED",
port_extclk1 => "PORT_UNUSED",
port_extclk2 => "PORT_UNUSED",
port_extclk3 => "PORT_UNUSED",
self_reset_on_loss_lock => "ON",
width_clock => 5
)
PORT MAP (
inclk => sub_wire1,
clk => sub_wire3,
locked => sub_wire7
);
END SYN;
-- ============================================================
-- CNX file retrieval info
-- ============================================================
-- Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-- Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-- Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-- Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-- Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-- Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-- Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-- Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-- Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-- Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-- Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-- Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-- Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-- Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "c0"
-- Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "Any"
-- Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
-- Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "1"
-- Retrieval info: PRIVATE: DIV_FACTOR2 NUMERIC "1"
-- Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-- Retrieval info: PRIVATE: DUTY_CYCLE1 STRING "50.00000000"
-- Retrieval info: PRIVATE: DUTY_CYCLE2 STRING "50.00000000"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "250.000000"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE1 STRING "100.000000"
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE2 STRING "50.000000"
-- Retrieval info: PRIVATE: EXPLICIT_SWITCHOVER_COUNTER STRING "0"
-- Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-- Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-- Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-- Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-- Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-- Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "50.000"
-- Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-- Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-- Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
-- Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-- Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "1"
-- Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "Not Available"
-- Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT1 STRING "ps"
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT2 STRING "ps"
-- Retrieval info: PRIVATE: MIG_DEVICE_SPEED_GRADE STRING "Any"
-- Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-- Retrieval info: PRIVATE: MIRROR_CLK1 STRING "0"
-- Retrieval info: PRIVATE: MIRROR_CLK2 STRING "0"
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "4"
-- Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "2"
-- Retrieval info: PRIVATE: MULT_FACTOR2 NUMERIC "1"
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "250.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "100.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ2 STRING "100.00000000"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "1"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "0"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE2 STRING "0"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT1 STRING "MHz"
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT2 STRING "MHz"
-- Retrieval info: PRIVATE: PHASE_RECONFIG_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: PHASE_RECONFIG_INPUTS_CHECK STRING "0"
-- Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT1 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT2 STRING "0.00000000"
-- Retrieval info: PRIVATE: PHASE_SHIFT_STEP_ENABLED_CHECK STRING "0"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT1 STRING "deg"
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT2 STRING "deg"
-- Retrieval info: PRIVATE: PLL_ADVANCED_PARAM_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-- Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_FBMIMIC_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-- Retrieval info: PRIVATE: PLL_TARGET_HARCOPY_CHECK NUMERIC "0"
-- Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-- Retrieval info: PRIVATE: RECONFIG_FILE STRING "pll_lvds.mif"
-- Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-- Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: SELF_RESET_LOCK_LOSS STRING "1"
-- Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-- Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-- Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-- Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-- Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-- Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-- Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-- Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-- Retrieval info: PRIVATE: STICKY_CLK1 STRING "1"
-- Retrieval info: PRIVATE: STICKY_CLK2 STRING "1"
-- Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-- Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "1"
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
-- Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-- Retrieval info: PRIVATE: USE_CLK1 STRING "1"
-- Retrieval info: PRIVATE: USE_CLK2 STRING "1"
-- Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-- Retrieval info: PRIVATE: USE_CLKENA1 STRING "0"
-- Retrieval info: PRIVATE: USE_CLKENA2 STRING "0"
-- Retrieval info: PRIVATE: USE_MIL_SPEED_GRADE NUMERIC "0"
-- Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-- Retrieval info: CONSTANT: BANDWIDTH_TYPE STRING "AUTO"
-- Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "1"
-- Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "5"
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "1"
-- Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "2"
-- Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: CLK2_DIVIDE_BY NUMERIC "1"
-- Retrieval info: CONSTANT: CLK2_DUTY_CYCLE NUMERIC "50"
-- Retrieval info: CONSTANT: CLK2_MULTIPLY_BY NUMERIC "1"
-- Retrieval info: CONSTANT: CLK2_PHASE_SHIFT STRING "0"
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "20000"
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-- Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-- Retrieval info: CONSTANT: PORT_ACTIVECLOCK STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_ARESET STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKBAD0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKBAD1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKLOSS STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CLKSWITCH STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_CONFIGUPDATE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_FBIN STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_INCLK0 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_INCLK1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_LOCKED STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_PFDENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASECOUNTERSELECT STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASEDONE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASESTEP STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PHASEUPDOWN STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_PLLENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANACLR STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANCLK STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANCLKENA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDATA STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDATAOUT STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANDONE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANREAD STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_SCANWRITE STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk0 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk1 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_USED"
-- Retrieval info: CONSTANT: PORT_clk3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk4 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clk5 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena4 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_clkena5 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk0 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk1 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk2 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: PORT_extclk3 STRING "PORT_UNUSED"
-- Retrieval info: CONSTANT: SELF_RESET_ON_LOSS_LOCK STRING "ON"
-- Retrieval info: CONSTANT: WIDTH_CLOCK NUMERIC "5"
-- Retrieval info: USED_PORT: @clk 0 0 5 0 OUTPUT_CLK_EXT VCC "@clk[4..0]"
-- Retrieval info: USED_PORT: @inclk 0 0 2 0 INPUT_CLK_EXT VCC "@inclk[1..0]"
-- Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT_CLK_EXT VCC "c0"
-- Retrieval info: USED_PORT: c1 0 0 0 0 OUTPUT_CLK_EXT VCC "c1"
-- Retrieval info: USED_PORT: c2 0 0 0 0 OUTPUT_CLK_EXT VCC "c2"
-- Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT_CLK_EXT GND "inclk0"
-- Retrieval info: USED_PORT: locked 0 0 0 0 OUTPUT GND "locked"
-- Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-- Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-- Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-- Retrieval info: CONNECT: c1 0 0 0 0 @clk 0 0 1 1
-- Retrieval info: CONNECT: c2 0 0 0 0 @clk 0 0 1 2
-- Retrieval info: CONNECT: locked 0 0 0 0 @locked 0 0 0 0
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_lvds.vhd TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_lvds.ppf TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_lvds.inc FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_lvds.cmp TRUE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_lvds.bsf FALSE
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_lvds_inst.vhd TRUE
-- Retrieval info: LIB_FILE: altera_mf
-- Retrieval info: CBX_MODULE_PREFIX: ON

View file

@ -112,8 +112,10 @@ architecture struct of hmb_fpga_top is
-- System clocks
signal clk100 : std_logic;
signal clk_lvds : std_logic;
signal clk_lvds_fast : std_logic;
signal clk_lvds_100 : std_logic;
signal clk_lvds_50 : std_logic;
-- I2C signals
signal scl_in : std_logic;
signal scl_out : std_logic;
@ -131,9 +133,10 @@ architecture struct of hmb_fpga_top is
signal clk_en_10hz : std_logic := '0';
signal led_dir_left : std_logic := '0';
-- LVDS data signals+
-- LVDS data signals
signal data : std_logic_vector(19 downto 0);
signal data_lvds : std_logic_vector(19 downto 0);
-- Shutdown signals
signal hd_mon_csel : std_logic_vector(3 downto 0) := (others => '0');
signal shutdown_int : std_logic_vector(3 downto 0) := (others => '0');
@ -170,7 +173,10 @@ architecture struct of hmb_fpga_top is
signal lvds_align : std_logic_vector(1 downto 0) := "00";
signal lvds_align_cnt : unsigned(4 downto 0) := (others => '1');
signal lvds_aligned : std_logic := '0';
signal dclka_inj : std_logic_vector(3 downto 0) := "0000";
signal dclkb_inj : std_logic_vector(3 downto 0) := "0000";
begin
------------------------------------------------------------------------------
@ -249,7 +255,7 @@ begin
process (clk100)
variable cnt_10hz : integer := 0;
begin
if (rising_edge(clk100)) then
if (rising_edge(clk100)) then
-- Generate 10 Hz clock enable
if (cnt_10hz = 9999999) then
@ -291,7 +297,7 @@ begin
end if;
end if;
end if;
end process;
@ -454,57 +460,105 @@ begin
end process;
------------------------------------------------------------------------------
-- Instantiate deserialiser, 16 channel, 7:1, max 100MHz clock
-- Instantiate deserialiser, 2 channel, 10:1
------------------------------------------------------------------------------
GEN_LVDS_RX : if TEST_MODE = false or TEST_LVDS = true generate
lvds_pll_inst : entity work.pll_lvds
port map (
inclk0 => lvds_clk_in,
c0 => clk_lvds_fast,
c1 => clk_lvds_100,
c2 => clk_lvds_50,
locked => open
);
lvds_deserialiser_l_inst : entity work.lvds_rx_1ck_2d
port map (
rx_data_align => lvds_align(1),
rx_inclock => lvds_clk_in,
rx_inclock => clk_lvds_fast,
rx_in => lvds_d_in,
rx_outclock => clk_lvds,
rx_out => data,
rx_locked => open
rx_out => data
);
lvds_data_reg_pr : process (clk_lvds_50)
begin
if rising_edge(clk_lvds_50) then
data_lvds <= data;
end if;
end process;
end generate;
-- In test mode tie off the LVDS rx signals, as the PLL in the
-- deserialiser needs ps resolution, and slows the simulation down.
GEN_LVDS_RX_TEST : if TEST_MODE = true and TEST_LVDS = false generate
clk_lvds <= '0';
data <= (others => '0');
clk_lvds_fast<= '0';
clk_lvds_100 <= '0';
clk_lvds_50 <= '0';
data_lvds <= (others => '0');
end generate;
------------------------------------------------------------------------------
-- Clock output data a couple of times before sending to pins. Used to occupy a few registers in the device.
------------+------------------------------------------------------------------
process (clk_lvds)
begin
if (rising_edge(clk_lvds)) then
if lvds_aligned = '1' then
d_out <= data;
end if;
if lvds_aligned = '0' then
if lvds_align_cnt = 0 then
lvds_align <= "11";
lvds_align_cnt <= (others => '1');
else
lvds_align <= lvds_align(0) & '0';
lvds_align_cnt <= lvds_align_cnt - 1;
if lvds_align_cnt = "00001" and data(9 downto 6) = "0101" and data(19 downto 16) = "0101" then
lvds_aligned <= '1';
end if;
end if;
process (clk_lvds_50)
begin
if rising_edge(clk_lvds_50) then
if lvds_aligned = '1' then
if data_lvds(9) = '1' then
d_out( 8 downto 6) <= data_lvds( 8 downto 6);
end if;
if data_lvds(19) = '1' then
d_out(18 downto 16) <= data_lvds(18 downto 16);
end if;
d_out( 5 downto 0) <= data_lvds( 5 downto 0);
d_out(15 downto 10) <= data_lvds(15 downto 10);
else
d_out(18 downto 10) <= (others => '0');
d_out( 8 downto 0) <= (others => '0');
end if;
if lvds_aligned = '0' then
if lvds_align_cnt = 0 then
lvds_align <= "11";
lvds_align_cnt <= (others => '1');
else
lvds_align <= lvds_align(0) & '0';
lvds_align_cnt <= lvds_align_cnt - 1;
if lvds_align_cnt = "00001" and data_lvds(9 downto 6) = "0101" and data_lvds(19 downto 16) = "0101" then
lvds_aligned <= '1';
end if;
end if;
end process;
end if;
end if;
end process;
process (clk_lvds_100)
begin
if rising_edge(clk_lvds_100) then
d_out(9) <= dclka_inj(3);
d_out(19) <= dclkb_inj(3);
if lvds_aligned = '1' then
if data_lvds(9) = '1' and dclka_inj = "0000" then
dclka_inj <= "0011";
else
dclka_inj <= dclka_inj(2 downto 0) & '0';
end if;
if data_lvds(19) = '1' and dclkb_inj = "0000" then
dclkb_inj <= "0011";
else
dclkb_inj <= dclkb_inj(2 downto 0) & '0';
end if;
end if;
end if;
end process;
end architecture struct;
-- end of file

View file

@ -111,7 +111,7 @@ entity print_unit is
wave_req_ext : in std_logic_vector(SUB_HEADS-1 downto 0);
wave_addr_ext : in std_logic_vector(7 downto 0);
wave_delay_ext : in std_logic_vector(9 downto 0);
wave_delay_ext : in std_logic_vector(11 downto 0);
wave_seq_busy : out std_logic_vector(SUB_HEADS-1 downto 0);
print_seq_busy : out std_logic;
@ -156,9 +156,9 @@ architecture rtl of print_unit is
-- Mapping of the vector output bits from print data sequencer to the delay queue
-- to the waveform sequencer, with request bit, sequence start address, and the delay.
subtype WAVE_REQ_BITS is natural range 19 downto 18;
subtype WAVE_ADDR_BITS is natural range 17 downto 10;
subtype WAVE_DELAY_BITS is natural range 9 downto 0;
subtype WAVE_REQ_BITS is natural range 21 downto 20;
subtype WAVE_ADDR_BITS is natural range 19 downto 12;
subtype WAVE_DELAY_BITS is natural range 11 downto 0;
-- Mapping of the burst bus bits from the print data sequencer to the data core,
-- setting the start bit with delay (sent via delay queue in data core).
@ -210,15 +210,15 @@ architecture rtl of print_unit is
type wav_trigger_in_t is array (0 to SUB_HEADS-1) of std_logic_vector(TRIGGER_WIDTH-1 downto 0);
signal wav_trigger_in : wav_trigger_in_t;
signal vector_print : std_logic_vector (19 downto 0);
signal vector_print : std_logic_vector (21 downto 0);
signal wave_req : std_logic_vector(SUB_HEADS-1 downto 0);
signal wave_addr : std_logic_vector(7 downto 0);
signal wave_delay : std_logic_vector(9 downto 0);
signal wave_delay : std_logic_vector(11 downto 0);
signal wave_req_int : std_logic_vector(SUB_HEADS-1 downto 0);
signal wave_addr_int : std_logic_vector(7 downto 0);
signal wave_delay_int : std_logic_vector(9 downto 0);
signal wave_delay_int : std_logic_vector(11 downto 0);
signal seq_data_config : std_logic_vector(SEQ_BUS_WIDTH-1 downto 0);
signal seq_data_valid : std_logic;
@ -460,7 +460,7 @@ begin
seq_print_core_inst : entity work.generic_sequencer_15
generic map(
BUS_WIDTH => SEQ_BUS_WIDTH,
VECTOR_WIDTH => 20,
VECTOR_WIDTH => 22,
TRIGGER_WIDTH => 1,
POS_WIDTH => 1,
VECT_RAMP_EN => false,
@ -516,7 +516,7 @@ begin
generic map(
PKT_MODE => '0',
DATA_WIDTH => 8,
DELAY_WIDTH => 10,
DELAY_WIDTH => 12,
LENGTH_WIDTH => 8,
DATA_DEPTH => 3,
DELAY_DEPTH => 3,

View file

@ -14,6 +14,7 @@ tb_pkg.vhd
../../../hmb_fpga_top/build/ip/lvds_rx_1ck_2d.vhd
../../../hmb_fpga_top/build/ip/io_buf_i2c.vhd
../../../hmb_fpga_top/build/ip/pll_25in_100out.vhd
../../../hmb_fpga_top/build/ip/pll_lvds.vhd
../../../hmb_fpga_top/src/hmb_head_monitor.vhd
../../../hmb_fpga_top/src/hmb_fpga_top.vhd

View file

@ -11,7 +11,7 @@ do compile.do
set vsimargs [lrange $argv 3 end]
# Run the tests
vsim -quiet -pli VProc.so -gGUI_RUN=true +nowarnTFMPC -L altera_mf_ver -L altera_mf -t 100ps -gui tb \
vsim -quiet -pli VProc.so -gGUI_RUN=true +nowarnTFMPC -L altera_mf_ver -L altera_mf -t 1ps -gui tb \
[lindex $vsimargs 0] [lindex $vsimargs 1] [lindex $vsimargs 2] \
[lindex $vsimargs 3] [lindex $vsimargs 4] [lindex $vsimargs 5] \
[lindex $vsimargs 6] [lindex $vsimargs 7] [lindex $vsimargs 8]

View file

@ -22,13 +22,13 @@ const uint32_t runTest::PSEQ_PATTERN0 [] = {
0x60000002, // BUS_BURST : entries 2
0x00001C02, // start print data core req0 (fetch pixels) with delay = 3 (minimum)
0x0001041F, // Length of wave sequence
0x310403FF, // VEC_SET : start wave sequence 0 at addr 0 and delay 1024
0x00010A20, // Length of wave sequence
0x31100A10, // VEC_SET : start wave sequence 0 at addr 0 and delay 2576
0x10000001, // TRIG_MASK : set mask for trigger 0(FP1)
0x20000001, // WAIT_TRIG : wait for FP1
0x60000001, // BUS_BURST : entries 1
0x00002C02, // start print data core req1 (fetch pixels) with delay = 3 (minimum)
0x310803FF, // VEC_SET : start wave sequence 1 at addr 0 and delay 1024
0x31200A10, // VEC_SET : start wave sequence 1 at addr 0 and delay 2576
0xF0000000, // END
0x00000000, // NOP
0x00000000, // NOP

View file

@ -38,7 +38,7 @@ generic (
TRIM_PS : boolean := true; -- UUT has trimmed data streamer (changes print streamer tests)
VPROC_WR_LENGTH : integer range 1 to 16 := 1; -- Fixed VProc wait states for writes
VPROC_RD_LENGTH : integer range 1 to 16 := 4; -- Fixed VProc wait states for reads
EN_SERDES : boolean := false -- When true, TX SERDES in core enabled along with RX receiver in TB. NB timescale must be 1ps to work.
EN_SERDES : boolean := true -- When true, TX SERDES in core enabled along with RX receiver in TB. NB timescale must be 1ps to work.
-- When false, TX and RX serdes disabled, and head data o/p from core invalid.
);
end entity;
@ -794,12 +794,11 @@ begin
-- The ARLEN is the burst count - 1
avm_rx_burstcount <= "0000" & std_logic_vector(unsigned(axm_arlen(7 downto 0)) + 1);
clk_quarter_pr : process(clk_half, rst_n)
begin
if rst_n then
clk_quarter <= '0';
elsif rising_edge(clk_quarter) then
elsif rising_edge(clk_half) then
clk_quarter <= not(clk_quarter);
end if;
end process;
@ -814,7 +813,7 @@ begin
lvds_clk_in => lvds_tx_ser(8),
lvds_d_in => lvds_tx_ser(i*2+1 downto i*2),
d_out => rx_out(i*20+19 downto i*20),
clk25_in => clk_quarter,
clk25_in => clk,
amp_trip_temp => (others => '0'),
led_out => open,