1) This version has the top level modifies with the printhead signals
2) Tb.pkg has been modified 3) head_data_proc.vhd has been modified but not simulated to test signature and latch count 4) pei_fpga_top.vhd must be cleaned. It has code from d3000 that is not required 5) head_datain has been added to account for the ddr printhead data.
This commit is contained in:
parent
81a4182c87
commit
88f08392d2
12 changed files with 17444 additions and 36685 deletions
72
firmware/pei_fpga_top/build/head_datain.bsf
Normal file
72
firmware/pei_fpga_top/build/head_datain.bsf
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
WARNING: Do NOT edit the input and output ports in this file in a text
|
||||
editor if you plan to continue editing the block that represents it in
|
||||
the Block Editor! File corruption is VERY likely to occur.
|
||||
*/
|
||||
/*
|
||||
Copyright (C) 2020 Intel Corporation. All rights reserved.
|
||||
Your use of Intel Corporation's design tools, logic functions
|
||||
and other software and tools, and any 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, at
|
||||
https://fpgasoftware.intel.com/eula.
|
||||
*/
|
||||
(header "symbol" (version "1.2"))
|
||||
(symbol
|
||||
(rect 0 0 208 112)
|
||||
(text "head_datain" (rect 69 0 151 16)(font "Arial" (font_size 10)))
|
||||
(text "inst" (rect 8 96 25 108)(font "Arial" ))
|
||||
(port
|
||||
(pt 0 48)
|
||||
(input)
|
||||
(text "datain[7..0]" (rect 0 0 62 14)(font "Arial" (font_size 8)))
|
||||
(text "datain[7..0]" (rect 4 34 55 47)(font "Arial" (font_size 8)))
|
||||
(line (pt 0 48)(pt 64 48)(line_width 3))
|
||||
)
|
||||
(port
|
||||
(pt 0 64)
|
||||
(input)
|
||||
(text "inclock" (rect 0 0 38 14)(font "Arial" (font_size 8)))
|
||||
(text "inclock" (rect 4 50 35 63)(font "Arial" (font_size 8)))
|
||||
(line (pt 0 64)(pt 64 64))
|
||||
)
|
||||
(port
|
||||
(pt 0 80)
|
||||
(input)
|
||||
(text "aclr" (rect 0 0 21 14)(font "Arial" (font_size 8)))
|
||||
(text "aclr" (rect 4 66 20 79)(font "Arial" (font_size 8)))
|
||||
(line (pt 0 80)(pt 64 80))
|
||||
)
|
||||
(port
|
||||
(pt 208 48)
|
||||
(output)
|
||||
(text "dataout_l[7..0]" (rect 0 0 80 14)(font "Arial" (font_size 8)))
|
||||
(text "dataout_l[7..0]" (rect 137 34 203 47)(font "Arial" (font_size 8)))
|
||||
(line (pt 208 48)(pt 128 48)(line_width 3))
|
||||
)
|
||||
(port
|
||||
(pt 208 64)
|
||||
(output)
|
||||
(text "dataout_h[7..0]" (rect 0 0 84 14)(font "Arial" (font_size 8)))
|
||||
(text "dataout_h[7..0]" (rect 133 50 203 63)(font "Arial" (font_size 8)))
|
||||
(line (pt 208 64)(pt 128 64)(line_width 3))
|
||||
)
|
||||
(drawing
|
||||
(line (pt 64 32)(pt 128 32))
|
||||
(line (pt 128 32)(pt 128 96))
|
||||
(line (pt 64 96)(pt 128 96))
|
||||
(line (pt 64 32)(pt 64 96))
|
||||
(line (pt 0 0)(pt 208 0))
|
||||
(line (pt 208 0)(pt 208 112))
|
||||
(line (pt 0 112)(pt 208 112))
|
||||
(line (pt 0 0)(pt 0 112))
|
||||
)
|
||||
)
|
||||
26
firmware/pei_fpga_top/build/head_datain.cmp
Normal file
26
firmware/pei_fpga_top/build/head_datain.cmp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
--Copyright (C) 2020 Intel Corporation. All rights reserved.
|
||||
--Your use of Intel Corporation's design tools, logic functions
|
||||
--and other software and tools, and any 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, at
|
||||
--https://fpgasoftware.intel.com/eula.
|
||||
|
||||
|
||||
component head_datain
|
||||
PORT
|
||||
(
|
||||
aclr : IN STD_LOGIC ;
|
||||
datain : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
inclock : IN STD_LOGIC ;
|
||||
dataout_h : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
dataout_l : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
27
firmware/pei_fpga_top/build/head_datain.inc
Normal file
27
firmware/pei_fpga_top/build/head_datain.inc
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
--Copyright (C) 2020 Intel Corporation. All rights reserved.
|
||||
--Your use of Intel Corporation's design tools, logic functions
|
||||
--and other software and tools, and any 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, at
|
||||
--https://fpgasoftware.intel.com/eula.
|
||||
|
||||
|
||||
FUNCTION head_datain
|
||||
(
|
||||
aclr,
|
||||
datain[7..0],
|
||||
inclock
|
||||
)
|
||||
|
||||
RETURNS (
|
||||
dataout_h[7..0],
|
||||
dataout_l[7..0]
|
||||
);
|
||||
12
firmware/pei_fpga_top/build/head_datain.ppf
Normal file
12
firmware/pei_fpga_top/build/head_datain.ppf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE pinplan>
|
||||
<pinplan intended_family="Cyclone 10 LP" variation_name="head_datain" megafunction_name="ALTDDIO_IN" specifies="all_ports">
|
||||
<global>
|
||||
<pin name="aclr" direction="input" scope="external" />
|
||||
<pin name="datain[7..0]" direction="input" scope="external" />
|
||||
<pin name="inclock" direction="input" scope="external" source="clock" />
|
||||
<pin name="dataout_h[7..0]" direction="output" scope="external" />
|
||||
<pin name="dataout_l[7..0]" direction="output" scope="external" />
|
||||
|
||||
</global>
|
||||
</pinplan>
|
||||
9
firmware/pei_fpga_top/build/head_datain.qip
Normal file
9
firmware/pei_fpga_top/build/head_datain.qip
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTDDIO_IN"
|
||||
set_global_assignment -name IP_TOOL_VERSION "20.1"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone 10 LP}"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "head_datain.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "head_datain.bsf"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "head_datain_inst.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "head_datain.inc"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "head_datain.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "head_datain.ppf"]
|
||||
113
firmware/pei_fpga_top/build/head_datain.vhd
Normal file
113
firmware/pei_fpga_top/build/head_datain.vhd
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
-- megafunction wizard: %ALTDDIO_IN%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: ALTDDIO_IN
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: head_datain.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- ALTDDIO_IN
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 20.1.1 Build 720 11/11/2020 SJ Lite Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 2020 Intel Corporation. All rights reserved.
|
||||
--Your use of Intel Corporation's design tools, logic functions
|
||||
--and other software and tools, and any 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, at
|
||||
--https://fpgasoftware.intel.com/eula.
|
||||
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
LIBRARY altera_mf;
|
||||
USE altera_mf.altera_mf_components.all;
|
||||
|
||||
ENTITY head_datain IS
|
||||
PORT
|
||||
(
|
||||
aclr : IN STD_LOGIC ;
|
||||
datain : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
inclock : IN STD_LOGIC ;
|
||||
dataout_h : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
dataout_l : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
|
||||
);
|
||||
END head_datain;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF head_datain IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
SIGNAL sub_wire1 : STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
|
||||
BEGIN
|
||||
dataout_h <= sub_wire0(7 DOWNTO 0);
|
||||
dataout_l <= sub_wire1(7 DOWNTO 0);
|
||||
|
||||
ALTDDIO_IN_component : ALTDDIO_IN
|
||||
GENERIC MAP (
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
invert_input_clocks => "OFF",
|
||||
lpm_hint => "UNUSED",
|
||||
lpm_type => "altddio_in",
|
||||
power_up_high => "OFF",
|
||||
width => 8
|
||||
)
|
||||
PORT MAP (
|
||||
aclr => aclr,
|
||||
datain => datain,
|
||||
inclock => inclock,
|
||||
dataout_h => sub_wire0,
|
||||
dataout_l => sub_wire1
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: INVERT_INPUT_CLOCKS STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: LPM_HINT STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altddio_in"
|
||||
-- Retrieval info: CONSTANT: POWER_UP_HIGH STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: WIDTH NUMERIC "8"
|
||||
-- Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL "aclr"
|
||||
-- Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
|
||||
-- Retrieval info: USED_PORT: datain 0 0 8 0 INPUT NODEFVAL "datain[7..0]"
|
||||
-- Retrieval info: CONNECT: @datain 0 0 8 0 datain 0 0 8 0
|
||||
-- Retrieval info: USED_PORT: dataout_h 0 0 8 0 OUTPUT NODEFVAL "dataout_h[7..0]"
|
||||
-- Retrieval info: CONNECT: dataout_h 0 0 8 0 @dataout_h 0 0 8 0
|
||||
-- Retrieval info: USED_PORT: dataout_l 0 0 8 0 OUTPUT NODEFVAL "dataout_l[7..0]"
|
||||
-- Retrieval info: CONNECT: dataout_l 0 0 8 0 @dataout_l 0 0 8 0
|
||||
-- Retrieval info: USED_PORT: inclock 0 0 0 0 INPUT_CLK_EXT NODEFVAL "inclock"
|
||||
-- Retrieval info: CONNECT: @inclock 0 0 0 0 inclock 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain.vhd TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain.qip TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain.bsf TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain_inst.vhd TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain.inc TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain.cmp TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL head_datain.ppf TRUE FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
|
|
@ -84,12 +84,12 @@ set_instance_assignment -name IO_STANDARD LVDS -to lvds_d_in[3]
|
|||
set_location_assignment PIN_P2 -to lvds_d_in[3]
|
||||
set_location_assignment PIN_P1 -to "lvds_d_in[3](n)"
|
||||
|
||||
set_location_assignment PIN_M15 -to c1_clk
|
||||
set_location_assignment PIN_M6 -to c2_clk
|
||||
set_location_assignment PIN_M15 -to c_clk[0]
|
||||
set_location_assignment PIN_M6 -to c_clk[1]
|
||||
set_location_assignment PIN_E15 -to clk25_in
|
||||
set_location_assignment PIN_N2 -to alert_out -disable
|
||||
set_location_assignment PIN_C1 -to cfg_wdata
|
||||
set_location_assignment PIN_D2 -to cfg_ncs
|
||||
set_location_assignment PIN_N2 -to alert_out -disable
|
||||
set_location_assignment PIN_C1 -to cfg_wdata
|
||||
set_location_assignment PIN_D2 -to cfg_ncs
|
||||
|
||||
|
||||
set_location_assignment PIN_N9 -to two_col
|
||||
|
|
@ -173,6 +173,6 @@ set_global_assignment -name SOURCE_FILE db/pei_fpga_top.cmp.rdb
|
|||
set_global_assignment -name SIGNALTAP_FILE stp1.stp
|
||||
set_global_assignment -name SIGNALTAP_FILE output_files/stpI2C.stp
|
||||
set_global_assignment -name CDF_FILE output_files/pei_fpga_top_cdf.cdf
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
set_global_assignment -name QIP_FILE head_data.qip
|
||||
set_global_assignment -name QIP_FILE head_datain.qip
|
||||
set_global_assignment -name QIP_FILE head_datain.qip
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -38,9 +38,9 @@ port (
|
|||
|
||||
rx_data : in std_logic_vector (7 downto 0);
|
||||
rx_clk : in std_logic;
|
||||
clk_sys : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
cmd_reset : in std_logic;
|
||||
clk_sys : in std_logic;
|
||||
|
||||
--decoded outputs
|
||||
signature : out std_logic_vector (31 downto 0);
|
||||
|
|
@ -51,21 +51,38 @@ end entity head_data_proc;
|
|||
|
||||
architecture struct of head_data_proc is
|
||||
|
||||
entity head_datain is
|
||||
component head_datain
|
||||
port
|
||||
(
|
||||
datain : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
inclock : IN STD_LOGIC ;
|
||||
dataout_h : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
dataout_l : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
|
||||
datain : in std_logic_vector (7 DOWNTO 0);
|
||||
inclock : in std_logic ;
|
||||
dataout_h : out std_logic_vector (7 DOWNTO 0);
|
||||
dataout_l : out std_logic_vector (7 DOWNTO 0)
|
||||
);
|
||||
end head_datain;
|
||||
end component;
|
||||
|
||||
type array_t is array (1 downto 0) of std_logic_vector(7 downto 0);
|
||||
signal rx_data_h : std_logic_vector(7 downto 0);
|
||||
signal rx_data_l : std_logic_vector(7 downto 0);
|
||||
signal rx_data_h_int : array_t;
|
||||
signal rx_dats
|
||||
type array_t is array (2 downto 0) of std_logic_vector(7 downto 0);
|
||||
signal data_sign : std_logic_vector (15 downto 0);
|
||||
signal sigLatched : std_logic_vector (31 downto 0);
|
||||
signal sig : std_logic_vector (31 downto 0);
|
||||
signal rx_data_h_in : std_logic_vector (7 downto 0);
|
||||
signal rx_data_l_in : std_logic_vector (7 downto 0);
|
||||
signal pulse_int : std_logic_vector (2 downto 0);
|
||||
signal latch_pulse_int : std_logic_vector (3 downto 0);
|
||||
signal reset_sig : std_logic;
|
||||
signal rx_data_h_int : array_t;
|
||||
signal rx_data_l_int : array_t;
|
||||
signal pulse_sync : std_logic;
|
||||
signal pulse_sync_sys_d1 : std_logic;
|
||||
signal pulse_sync_sys_d2 : std_logic;
|
||||
signal data_pulse : std_logic;
|
||||
signal data_pulse_sync_sys_d1 : std_logic;
|
||||
signal data_pulse_sync_sys_d2 : std_logic;
|
||||
signal latch_pulse_sys_d1 : std_logic;
|
||||
signal latch_pulse_sys_d2 : std_logic;
|
||||
|
||||
|
||||
|
||||
|
||||
begin
|
||||
|
||||
|
|
@ -77,13 +94,11 @@ begin
|
|||
dataout_l => rx_data_l_in
|
||||
);
|
||||
|
||||
|
||||
rx_data
|
||||
|
||||
cdc_data_p : process(crx_clk)
|
||||
variable counter : integer;
|
||||
cdc_data_p : process(clk_sys)
|
||||
variable counter_rx : integer range 0 to 255;
|
||||
begin
|
||||
if rising_edge(rx_clk) then
|
||||
if rising_edge(clk_sys) then
|
||||
|
||||
rx_data_h_int(0) <= rx_data_h_in;
|
||||
rx_data_h_int(1) <= rx_data_h_int(0);
|
||||
|
|
@ -99,11 +114,11 @@ begin
|
|||
latch_pulse_int(1) <= latch_pulse_int(0);
|
||||
latch_pulse_int(2) <= latch_pulse_int(1);
|
||||
|
||||
counter_rx := counter + 1;
|
||||
counter_rx := counter_rx + 1;
|
||||
|
||||
pulse_sync <='0';
|
||||
if (counter_rx=2) then --use lacth
|
||||
counter := 0;
|
||||
counter_rx := 0;
|
||||
pulse_sync <='1';
|
||||
end if;
|
||||
end if;
|
||||
|
|
@ -120,46 +135,38 @@ begin
|
|||
latch_pulse_sys_d2 <= latch_pulse_sys_d1;
|
||||
|
||||
data_pulse <='0';
|
||||
if (pulse_sync_sys_d1 <='1' and pulse_sync_sys_d2='0' ) then
|
||||
data_sign <= (others =>'0', (15 downto 8) => rx_data_h_int(2), (7 downto 0) => rx_data_l_int(2));
|
||||
if (pulse_sync_sys_d1 ='1' and pulse_sync_sys_d2 = '0' ) then
|
||||
data_sign <= rx_data_h_int(2) & rx_data_l_int(2);
|
||||
data_pulse <='1';
|
||||
end if;
|
||||
|
||||
rset_sig <='0';
|
||||
if (latch_pulse_d2 ='0' and latch_pulse_d1 ='1') then
|
||||
reset_sig <='0';
|
||||
if (latch_pulse_sys_d2 ='0' and latch_pulse_sys_d1 ='1') then
|
||||
reset_sig <='1';
|
||||
end if;
|
||||
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
|
||||
|
||||
SIGNATURE_P : process(all)
|
||||
variable fb :std_logic;
|
||||
begin
|
||||
if (rx_clk'event and rx_clk = '1') then
|
||||
if (clk_sys'event and clk_sys = '1') then
|
||||
if (reset_sig = '1') then
|
||||
sigLatched <= sig;
|
||||
sig <= (others => '0');
|
||||
elsif (data_pulse = '1' ) then
|
||||
fb := sig(30) xor sig(15);
|
||||
sig <= (sig(30 downto 0) & fb) xor (others => '0' , (15 downto 0) => data_sign); --32 bit a zero has been padded to the left
|
||||
sig <= (sig(30 downto 0) & fb) xor (x"0000" & data_sign); --32 bit a zero has been padded to the left
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if (rst_n = '0' or rx_locked = '0') then
|
||||
if (rst_n = '0' or cmd_reset ='1') then
|
||||
sigLatched <= (others => '0');
|
||||
sig <= (others => '0');
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
signature <= sigLatched;
|
||||
end architecture struct;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,11 @@ port (
|
|||
dbg_ser_out : out std_logic;
|
||||
dbg_ser_in : in std_logic;
|
||||
|
||||
dac_out : out std_logic_vector(79 downto 0);
|
||||
c_clk : in std_logic_vector(1 downto 0);
|
||||
head_lat : in std_logic_vector(1 downto 0);
|
||||
two_col : in std_logic;
|
||||
|
||||
head_data : in std_logic_vector(7 downto 0);
|
||||
|
||||
nled_g : out std_logic;
|
||||
nled_y : out std_logic;
|
||||
|
|
@ -92,11 +96,6 @@ port (
|
|||
hd_sda_fpga : inout std_logic;
|
||||
--xhot_n : out std_logic;
|
||||
lvdsoe : in std_logic;
|
||||
a0 : in std_logic;
|
||||
a1 : in std_logic;
|
||||
id0 : in std_logic;
|
||||
id1 : in std_logic;
|
||||
|
||||
debug_out : out std_logic_vector(5 downto 1)
|
||||
);
|
||||
end entity pei_fpga_top;
|
||||
|
|
@ -275,7 +274,6 @@ architecture struct of pei_fpga_top is
|
|||
-------------- test signals -----
|
||||
signal latch,nchg,led_n : std_logic;
|
||||
signal eprom_busy : std_logic;
|
||||
signal head_data : std_logic_vector(27 downto 0);
|
||||
signal latch_pulse_rx_clk : std_logic;
|
||||
signal latch_pulse_rx_clk_d1 : std_logic;
|
||||
signal latch_pulse_rx_clk_d2 : std_logic;
|
||||
|
|
@ -342,63 +340,10 @@ begin
|
|||
--v_en(3 downto 0) <= test_hdr(63 downto 60);
|
||||
v_en(3 downto 0) <= (others => 'Z');
|
||||
|
||||
-- dac_out (59 downto 40)
|
||||
-- pei_din <= dac_out(51) & dac_out(50) & dac_out(49) & dac_out(52);
|
||||
dac_out(0) <= head_data(0);
|
||||
dac_out(1) <= head_data(1);
|
||||
dac_out(2) <= head_data(2);
|
||||
dac_out(3) <= head_data(3);
|
||||
dac_out(4) <= lvdsoe;
|
||||
dac_out(5) <= debug_scl;--head_data(5);
|
||||
dac_out(6) <= head_data(6);
|
||||
dac_out(7) <= head_data(7);
|
||||
dac_out(8) <= debug_sda;--head_data(8);
|
||||
dac_out(9) <= head_data(9);
|
||||
dac_out(10) <= head_data(10);
|
||||
dac_out(11) <= head_data(11);
|
||||
dac_out(12) <= head_data(12);
|
||||
dac_out(13) <= head_data(13);
|
||||
dac_out(14) <= head_data(14);
|
||||
dac_out(15) <= head_data(15);
|
||||
dac_out(16) <= head_data(16);
|
||||
dac_out(17) <= head_data(17);
|
||||
dac_out(18) <= head_data(18);
|
||||
dac_out(19) <= head_data(19);
|
||||
dac_out(20) <= head_data(20);
|
||||
dac_out(21) <= head_data(21);
|
||||
dac_out(22) <= head_data(22);
|
||||
dac_out(23) <= head_data(23);
|
||||
dac_out(24) <= head_data(24);
|
||||
dac_out(25) <= head_data(25);
|
||||
dac_out(26) <= head_data(26);
|
||||
dac_out(27) <= head_data(27);
|
||||
dac_out(28) <= a0;--input pins with no use. Implemented to stop warning from Quartus
|
||||
dac_out(29) <= a1;--input pins with no use
|
||||
dac_out(30) <= id0;--input pins with no use
|
||||
dac_out(31) <= id1;--input pins with no use
|
||||
dac_out(32) <= 'Z';
|
||||
dac_out(33) <= 'Z';
|
||||
dac_out(34) <= eprom_busy;
|
||||
-------------------------------------
|
||||
dac_out(79 downto 36) <= (others =>'Z');
|
||||
|
||||
---------------------------------
|
||||
pei_clkout <= pei_clkin;
|
||||
--wf_sel <= "000";
|
||||
|
||||
|
||||
pro_lvds_clock: process(lvds_rx_clk, rst_n)
|
||||
|
||||
begin
|
||||
if (rst_n = '0') then
|
||||
dac_out(35) <= '0';
|
||||
elsif rising_edge(lvds_rx_clk) then
|
||||
dac_out(35) <= not dac_out(35);
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- xhot_n <= '1' when (thigh_tmp275(15 downto 0) = reg_thermistor(15 downto 0)) else '0';
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Combinatorial logic
|
||||
------------------------------------------------------------------------------
|
||||
|
|
@ -458,39 +403,23 @@ begin
|
|||
|
||||
end generate;
|
||||
|
||||
pei_lvds_rx_1 : pei_lvds_rx
|
||||
port map (
|
||||
rx_in => lvds_d_in,
|
||||
rx_inclock => lvds_clk_in,
|
||||
rx_out => head_data,
|
||||
rx_outclock => lvds_rx_clk,
|
||||
rx_locked => lvds_locked,
|
||||
pll_areset => '0'
|
||||
);
|
||||
|
||||
|
||||
head_proc_inst: entity work.head_data_proc
|
||||
port map (
|
||||
|
||||
rx_locked => lvds_locked,
|
||||
|
||||
rx_data => head_data,
|
||||
rx_clk => lvds_rx_clk,
|
||||
rx_clk => c_clk(0),
|
||||
clk_sys => clk100,
|
||||
rst_n => rst_n,
|
||||
|
||||
cmd_reset => cmd_reset,
|
||||
--decoded outputs
|
||||
signature => sig_rx_clk,
|
||||
latch_pulse => latch_pulse_rx_clk,
|
||||
chA => chA,
|
||||
chB => chB,
|
||||
chC => chC,
|
||||
sp_table_comA => sp_table_comA,
|
||||
sp_table_comB => sp_table_comB,
|
||||
sp_table_comC => sp_table_comC,
|
||||
cmd_reset => cmd_reset
|
||||
latch_pulse => latch_pulse_rx_clk
|
||||
|
||||
);
|
||||
--Debugging. Added by DRM 25/08
|
||||
--debug_out(4)<= latch_pulse_rx_clk;
|
||||
debug_out <= (1=>chA, 2=>chB, 3=>chC, 5=>'Z', 4=> latch_pulse_rx_clk);
|
||||
debug_out <= (1=>'1', 2=>'1', 3=>'1', 5=>'1', 4=> '1');
|
||||
|
||||
|
||||
--sync_pulse_sv_inst: entity work.sync_pulse
|
||||
|
|
@ -583,20 +512,16 @@ port map (
|
|||
start_w_mcp4631 <= '0';
|
||||
if (data_frame_i2c_long(16)='0' and wr_i2c_fifo_dv ='1') then
|
||||
start_w_mcp4631 <= '1';
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end if;
|
||||
|
||||
start_r_mcp4631 <= '0';
|
||||
if (data_frame_i2c_long(16)='1' and wr_i2c_fifo_dv ='1') then
|
||||
start_r_mcp4631 <= '1';
|
||||
end if;
|
||||
|
||||
|
||||
data_frame_i2c <= data_frame_i2c_long(15 downto 0);
|
||||
|
||||
end if;
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
|
|
|
|||
|
|
@ -1142,16 +1142,18 @@ port map (
|
|||
clk25_in => clk_x2,
|
||||
|
||||
lvds_clk_in => '0',
|
||||
lvds_d_in =>(others => '0'),
|
||||
lvds_d_in => (others => '0'),
|
||||
|
||||
pei_clkout => open,
|
||||
pei_clkin =>'0',
|
||||
pei_clkin => '0',
|
||||
|
||||
dbg_ser_out => rx_pc, -- uart receiver pc
|
||||
dbg_ser_in => tx_pc, -- uart transmit pc
|
||||
|
||||
dac_out => open,
|
||||
|
||||
head_data => (others => '0'),
|
||||
c_clk => (others => '0'),
|
||||
head_lat => (others => '0'),
|
||||
two_col => '0',
|
||||
|
||||
nled_g => open,
|
||||
nled_y => open,
|
||||
|
|
@ -1173,10 +1175,7 @@ port map (
|
|||
cfg_ncs => open,
|
||||
cfg_wdata => open,
|
||||
|
||||
a0 => '1',
|
||||
a1 => '1',
|
||||
id0 => '1',
|
||||
id1 => '1',
|
||||
|
||||
|
||||
hd_scl_fpga => scl,
|
||||
hd_sda_fpga => sda,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue