Compare commits
3 commits
0.9.8_J961
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
777e3ea5ca | ||
|
|
936344fe3f | ||
|
|
3075ee2843 |
138 changed files with 21042 additions and 74820 deletions
|
|
@ -10,23 +10,23 @@ script {
|
|||
// Main Software
|
||||
if (isUnix()) {
|
||||
env.ALTERA_REPO = "git@hydra:gis/altera_18_1_linux.git"
|
||||
env.ALTERA_BRANCH = "origin/master"
|
||||
env.ALTERA_BRANCH = "origin/master"
|
||||
}
|
||||
else {
|
||||
env.ALTERA_REPO = "git@hydra:gis/altera_18_1.git"
|
||||
env.ALTERA_BRANCH = "origin/master"
|
||||
}
|
||||
}
|
||||
env.QSYS_PKG_VER = "18.1"
|
||||
|
||||
|
||||
// Tools (tag on master)
|
||||
env.FW_DEV_TOOL_BRANCH = "origin/master"
|
||||
// Generic IP
|
||||
env.GENERIC_IP_BRANCH = "origin/master"
|
||||
env.FW_DEV_TOOL_BRANCH = "refs/tags/ELGIP_2021_06_24_A_DHLS"
|
||||
// Generic IP
|
||||
env.GENERIC_IP_BRANCH = "refs/tags/ELGIP_2021_08_25_A_DHLS"
|
||||
// MinGW
|
||||
env.MINGW_REPO = "git@hydra:GIS_Embedded_Logic/mingw.git"
|
||||
env.MINGW_BRANCH = "origin/master"
|
||||
// force extra rules for checking to permit critical warnings
|
||||
env.USE_EXTRA_EXPRESSIONS="false"
|
||||
// Shared Code
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
--! @b Interfaces:
|
||||
--! @li Avalon MM master avm_rx_* : Avalon bus interface to memory system
|
||||
--! @li pixel_buf_wr_* : Pixel buffer write port
|
||||
--! @li en_dual_data_path : Enable inline merge dual path (if configured for dual path)
|
||||
--! @li chan_en : print channel enable input
|
||||
--! @li bpp_mode : bits per pixel mode input from CPU
|
||||
--! @li print_data_width : Print data width (GMA9905300 is 18 bits wide. GMA3305300 is 6 bits wide)
|
||||
|
|
@ -50,115 +49,79 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
use work.common_pkg.all;
|
||||
|
||||
use work.pixel_buffer_2_pkg.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
entity data_core is
|
||||
generic(
|
||||
MAX_BPP : integer := 3;
|
||||
SHIFT_DEPTH : integer range 1 to 1024 := 128;
|
||||
MAX_OP_WIDTH : natural range 1 to 48 := 48;
|
||||
DELAY_WIDTH : integer := 10;
|
||||
EN_PEEK : boolean := false;
|
||||
NO_ZERO_GAP : boolean := false;
|
||||
NUM_CHANS : integer range 1 to 4 := 2 -- number of PD inline-merge channels
|
||||
MAX_BPP : integer := 3;
|
||||
SHIFT_DEPTH : integer range 1 to 1024 := 128;
|
||||
MAX_OP_WIDTH : natural range 1 to 48 := 48;
|
||||
DELAY_WIDTH : integer := 10
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
pixel_buf_wr : in std_logic;
|
||||
pixel_buf_wr_data : in std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy : out std_logic;
|
||||
pixel_buf_last_word : in std_logic;
|
||||
pixel_buf_wr : in std_logic;
|
||||
pixel_buf_wr_data : in std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy : out std_logic;
|
||||
|
||||
pixel_buf_wr_aux : in std_logic;
|
||||
pixel_buf_wr_data_aux : in std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy_aux : out std_logic;
|
||||
pixel_buf_last_word_aux : in std_logic;
|
||||
chan_en : in std_logic;
|
||||
bpp_mode : in std_logic_vector(1 downto 0);
|
||||
print_data_width : in std_logic_vector(5 downto 0);
|
||||
clear_buffer : in 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);
|
||||
|
||||
en_dual_data_path : in std_logic;
|
||||
chan_en : in std_logic;
|
||||
bpp_mode : in std_logic_vector( 1 downto 0);
|
||||
print_data_width : in std_logic_vector( 5 downto 0);
|
||||
clear_buffer : in std_logic;
|
||||
fire_req : in std_logic;
|
||||
fire_req_start_merge : in std_logic;
|
||||
drop_stripe : in std_logic;
|
||||
sequencers_busy : out std_logic;
|
||||
px_buf_ch_nactive : out std_logic_vector(NUM_CHANS-1 downto 0);
|
||||
fp_holdoff_update : in std_logic;
|
||||
seq_data_config : in std_logic_vector(15 downto 0);
|
||||
seq_gl_map : in std_logic_vector(7 downto 0);
|
||||
seq_gl_map_update : in std_logic;
|
||||
cpu_gl_map : in std_logic_vector(7 downto 0);
|
||||
cpu_gl_map_en : in std_logic;
|
||||
|
||||
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;
|
||||
overlap_error : out std_logic;
|
||||
seq_gl_map : in std_logic_vector(7 downto 0);
|
||||
seq_gl_map_update : in std_logic;
|
||||
cpu_gl_map : in std_logic_vector(7 downto 0);
|
||||
cpu_gl_map_en : in std_logic;
|
||||
|
||||
seq_start_req : in std_logic;
|
||||
seq_start_first_pulse : in std_logic;
|
||||
seq_start_last_pulse : in std_logic;
|
||||
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;
|
||||
|
||||
all_on : in std_logic;
|
||||
seq_start_req : in std_logic;
|
||||
seq_start_first_pulse : in std_logic;
|
||||
seq_start_last_pulse : in std_logic;
|
||||
seq_start_delay : in std_logic_vector(DELAY_WIDTH - 1 downto 0);
|
||||
|
||||
print_data : out std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
print_clk : out std_logic_vector(0 downto 0);
|
||||
print_data : out std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
print_clk : out std_logic_vector(0 downto 0);
|
||||
|
||||
diag_peek_sel : in std_logic;
|
||||
diag_peek_addr : in std_logic_vector(31 downto 0);
|
||||
diag_peek_data : out std_logic_vector(31 downto 0);
|
||||
diag_peek_rdptr : out std_logic_vector( 7 downto 0);
|
||||
diag_peek_wrptr : out std_logic_vector( 7 downto 0);
|
||||
diag_peek_wdata : in std_logic_vector(31 downto 0);
|
||||
diag_peek_wr : in std_logic;
|
||||
diag_fire_req_count : out data_array_t(1 downto 0)(31 downto 0);
|
||||
diag_fire_simg_count : out data_array_t(1 downto 0)(31 downto 0);
|
||||
diag_last_stripe_count : out data_array_t(1 downto 0)(31 downto 0);
|
||||
diag_word_count : out std_logic_vector( 6 downto 0)
|
||||
|
||||
);
|
||||
diag_word_count : out std_logic_vector(6 downto 0)
|
||||
);
|
||||
end entity data_core;
|
||||
|
||||
architecture rtl of data_core is
|
||||
|
||||
constant SHIFT_DEPTH_INCL_PAD : integer := ((SHIFT_DEPTH+31)/32)*32; -- Round up so even 1Bpp is an integer number of DWords
|
||||
constant PIXEL_DEPTH : integer := 2**log2(4*4*SHIFT_DEPTH_INCL_PAD/32); -- 4 stripes @ 4Bpp rounded up to a power of 2
|
||||
constant RSVD_DEPTH : integer := 2**log2(1*4*SHIFT_DEPTH_INCL_PAD/32)+1; -- Reserve at least a full stripe's worth of space.
|
||||
-- Add one to stop sims complaining when pointer goes one off the end
|
||||
signal reg_GL_map_int : std_logic_vector(7 downto 0);
|
||||
signal pixel_buf_rd_data : std_logic_vector(MAX_OP_WIDTH * 33 - 1 downto 0);
|
||||
signal pixel_buf_rd : std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
signal gl_remap_in_data : std_logic_vector(MAX_BPP * MAX_OP_WIDTH - 1 downto 0);
|
||||
signal gl_remap_valid : std_logic;
|
||||
signal gl_remap_valid_int : std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
signal gl_remap_ready : std_logic;
|
||||
|
||||
signal pixel_buf_rd_data : std_logic_vector(MAX_OP_WIDTH * 32 - 1 downto 0);
|
||||
signal pixel_buf_rd : std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
signal pixel_buf_rd_valid : std_logic_vector(MAX_OP_WIDTH-1 downto 0);
|
||||
signal seq_gl_map_int : std_logic_vector(7 downto 0);
|
||||
signal seq_start_pulse_vec : std_logic_vector(1 downto 0);
|
||||
|
||||
signal reg_GL_map_int : std_logic_vector(7 downto 0);
|
||||
signal gl_remap_in_data : std_logic_vector(MAX_BPP * MAX_OP_WIDTH - 1 downto 0);
|
||||
signal gl_remap_valid : std_logic;
|
||||
signal gl_remap_valid_int : std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
signal gl_remap_ready : std_logic;
|
||||
signal bpp_mode_int : std_logic_vector(1 downto 0);
|
||||
|
||||
signal seq_gl_map_int : std_logic_vector(7 downto 0);
|
||||
signal seq_start_pulse_vec : std_logic_vector(1 downto 0);
|
||||
signal chan_en_int : std_logic;
|
||||
|
||||
signal bpp_mode_int : std_logic_vector(1 downto 0);
|
||||
signal pixel_buf_wr_int : std_logic;
|
||||
signal pixel_buf_wr_data_int : std_logic_vector(31 downto 0);
|
||||
signal pixel_buf_rdy_int : std_logic;
|
||||
|
||||
signal chan_en_int : std_logic;
|
||||
|
||||
signal pixel_buf_wr_int : std_logic_vector(1 downto 0);
|
||||
signal pixel_buf_wr_data_int : data_array_t(1 downto 0)(31 downto 0);
|
||||
signal pixel_buf_rdy_int : std_logic_vector(1 downto 0);
|
||||
signal pixel_buf_last_word_int : std_logic_vector(1 downto 0);
|
||||
|
||||
signal diag_peek_data_int : std_logic_vector(31 downto 0);
|
||||
begin
|
||||
|
||||
-------------------------------------------------
|
||||
|
|
@ -168,120 +131,85 @@ begin
|
|||
|
||||
process(rst_n, clk) is
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
seq_gl_map_int <= (others => '0');
|
||||
elsif clk'event and clk = '1' then
|
||||
if seq_gl_map_update = '1' and seq_start_req = '1' then
|
||||
seq_gl_map_int <= seq_gl_map;
|
||||
end if;
|
||||
end if;
|
||||
if rst_n = '0' then
|
||||
seq_gl_map_int <= (others => '0');
|
||||
elsif clk'event and clk = '1' then
|
||||
if seq_gl_map_update = '1' and seq_start_req = '1' then
|
||||
seq_gl_map_int <= seq_gl_map;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-------------------------------------------------
|
||||
-- The pixel buffer
|
||||
-------------------------------------------------
|
||||
|
||||
preslicer_inst_dual : entity work.preslicer_dual
|
||||
generic map (
|
||||
NUM_STRIPES_DEPTH => 6,
|
||||
NUM_STRIPES_FULL_MARGIN => 2,
|
||||
SHIFT_DEPTH => SHIFT_DEPTH_INCL_PAD,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH,
|
||||
NO_ZERO_GAP => NO_ZERO_GAP
|
||||
)
|
||||
port map
|
||||
preslicer_inst : entity work.preslicer_0
|
||||
generic map(
|
||||
NUM_STRIPES_DEPTH => 4,
|
||||
NUM_STRIPES_FULL_MARGIN => 2,
|
||||
SHIFT_DEPTH => SHIFT_DEPTH,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
bpp_mode => bpp_mode,
|
||||
clear_buffer => clear_buffer,
|
||||
ps_buf_wr => pixel_buf_wr,
|
||||
ps_buf_wr_data => pixel_buf_wr_data,
|
||||
ps_buf_rdy => pixel_buf_rdy,
|
||||
ps_buf_last_word => '0',
|
||||
-- Output data
|
||||
pixel_buf_wr => pixel_buf_wr_int,
|
||||
pixel_buf_wr_data => pixel_buf_wr_data_int,
|
||||
pixel_buf_rdy => pixel_buf_rdy_int,
|
||||
pixel_buf_last_word => open,
|
||||
ip_id_ip_number => open,
|
||||
ip_id_mfr_number => open,
|
||||
ip_ver_minor_number => open,
|
||||
ip_ver_major_number => open
|
||||
|
||||
bpp_mode => bpp_mode,
|
||||
);
|
||||
|
||||
clear_buffer => clear_buffer,
|
||||
|
||||
ps_buf_wr => pixel_buf_wr,
|
||||
ps_buf_wr_data => pixel_buf_wr_data,
|
||||
ps_buf_rdy => pixel_buf_rdy,
|
||||
ps_buf_last_word => pixel_buf_last_word,
|
||||
|
||||
ps_buf_wr_aux => pixel_buf_wr_aux,
|
||||
ps_buf_wr_data_aux => pixel_buf_wr_data_aux,
|
||||
ps_buf_rdy_aux => pixel_buf_rdy_aux,
|
||||
ps_buf_last_word_aux => pixel_buf_last_word_aux,
|
||||
|
||||
-- Output data
|
||||
pixel_buf_wr => pixel_buf_wr_int(0),
|
||||
pixel_buf_wr_aux => pixel_buf_wr_int(1),
|
||||
pixel_buf_wr_data => pixel_buf_wr_data_int(0),
|
||||
pixel_buf_wr_data_aux => pixel_buf_wr_data_int(1),
|
||||
pixel_buf_rdy => pixel_buf_rdy_int,
|
||||
pixel_buf_last_word => pixel_buf_last_word_int
|
||||
|
||||
);
|
||||
|
||||
pixel_buffer_zg_inst : entity work.pixel_buffer_zero_gap_2
|
||||
generic map (
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH,
|
||||
SHIFT_DEPTH => SHIFT_DEPTH_INCL_PAD,
|
||||
PX_DEPTH => PIXEL_DEPTH,
|
||||
RSVD_DEPTH => RSVD_DEPTH,
|
||||
NUM_CHANS => NUM_CHANS,
|
||||
NO_ZERO_GAP => NO_ZERO_GAP,
|
||||
EN_PEEK => EN_PEEK
|
||||
)
|
||||
port map
|
||||
pixel_buffer_inst : entity work.pixel_buffer_0
|
||||
generic map(
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
en_dual_data_path => en_dual_data_path,
|
||||
print_data_width => print_data_width,
|
||||
clear_buffer => clear_buffer,
|
||||
start_req(0) => seq_start_req,
|
||||
seq_1st_start_req => seq_start_req, -- Only used for SUB_HEADS
|
||||
start_req_first => seq_start_first_pulse,
|
||||
start_req_last => seq_start_last_pulse,
|
||||
|
||||
fire_req => fire_req,
|
||||
fire_req_start_merge => fire_req_start_merge,
|
||||
drop_stripe => drop_stripe,
|
||||
sequencers_busy => sequencers_busy,
|
||||
px_buf_ch_nactive => px_buf_ch_nactive,
|
||||
fp_holdoff_update => fp_holdoff_update,
|
||||
wave_seq_len => seq_data_config,
|
||||
dbl_drop => dbl_drop,
|
||||
fp_drop => fp_drop,
|
||||
overlap_error => overlap_error,
|
||||
|
||||
last_word => pixel_buf_last_word_int,
|
||||
data => pixel_buf_wr_data_int,
|
||||
wrreq => pixel_buf_wr_int,
|
||||
pixel_buf_rdy => pixel_buf_rdy_int,
|
||||
|
||||
rdreq => pixel_buf_rd(0),
|
||||
rdreq_rdy => pixel_buf_rd_valid(0),
|
||||
q => pixel_buf_rd_data,
|
||||
|
||||
empty => empty,
|
||||
full => full,
|
||||
underrun => underrun,
|
||||
overrun => overrun,
|
||||
|
||||
all_on => all_on,
|
||||
|
||||
diag_peek_sel => diag_peek_sel,
|
||||
diag_peek_addr => diag_peek_addr,
|
||||
diag_peek_data => diag_peek_data_int,
|
||||
diag_peek_rdptr => diag_peek_rdptr,
|
||||
diag_peek_wrptr => diag_peek_wrptr,
|
||||
diag_peek_wdata => diag_peek_wdata,
|
||||
diag_peek_wr => diag_peek_wr,
|
||||
|
||||
diag_fire_req_count => diag_fire_req_count,
|
||||
diag_fire_simg_count => diag_fire_simg_count,
|
||||
diag_last_stripe_count => diag_last_stripe_count,
|
||||
|
||||
diag_word_count => diag_word_count
|
||||
);
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
pixel_buf_rdy => pixel_buf_rdy_int,
|
||||
last_word => '0',
|
||||
data => pixel_buf_wr_data_int,
|
||||
wrreq => pixel_buf_wr_int,
|
||||
rdreq => pixel_buf_rd(0),
|
||||
q => pixel_buf_rd_data,
|
||||
empty => empty,
|
||||
full => full,
|
||||
overrun => overrun,
|
||||
underrun => underrun,
|
||||
dbl_drop => dbl_drop,
|
||||
fp_drop => fp_drop,
|
||||
-- bpp_mode => 2x"3",
|
||||
print_data_width => print_data_width,
|
||||
clear_buffer => clear_buffer,
|
||||
start_req => seq_start_req,
|
||||
start_req_first => seq_start_first_pulse,
|
||||
start_req_last => seq_start_last_pulse,
|
||||
is_last_wave => open,
|
||||
fire_req => fire_req,
|
||||
sequencers_busy => sequencers_busy,
|
||||
fp_holdoff_update => fp_holdoff_update,
|
||||
wave_seq_len => wave_seq_len,
|
||||
ip_id_ip_number => open,
|
||||
ip_id_mfr_number => open,
|
||||
ip_ver_minor_number => open,
|
||||
ip_ver_major_number => open,
|
||||
diag_word_count => diag_word_count
|
||||
);
|
||||
|
||||
-------------------------------------------------
|
||||
-- The set of slicers, connected to the read
|
||||
|
|
@ -293,26 +221,26 @@ begin
|
|||
|
||||
GEN_SLICE : for i in 0 to MAX_OP_WIDTH - 1 generate
|
||||
|
||||
slicer_inst : entity work.slicer
|
||||
generic map(
|
||||
MAX_BPP => MAX_BPP,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
slicer_inst : entity work.slicer
|
||||
generic map(
|
||||
MAX_BPP => MAX_BPP,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
pixel_buf_rd => pixel_buf_rd(i),
|
||||
pixel_buf_rd_data => pixel_buf_rd_data((i + 1) * 32 - 1 downto i * 32),
|
||||
pixel_buf_rd => pixel_buf_rd(i),
|
||||
pixel_buf_rd_data => pixel_buf_rd_data((i + 1) * 33 - 2 downto i * 33),
|
||||
|
||||
bpp_mode => 2x"3",
|
||||
chan_en => chan_en_int,
|
||||
start_req => seq_start_req,
|
||||
bpp_mode => 2x"3",
|
||||
chan_en => chan_en_int,
|
||||
start_req => seq_start_req,
|
||||
|
||||
gl_remap_in_data => gl_remap_in_data(i * 3 + 2 downto i * 3),
|
||||
gl_remap_valid => gl_remap_valid_int(i),
|
||||
gl_remap_ready => gl_remap_ready
|
||||
);
|
||||
gl_remap_in_data => gl_remap_in_data(i * 3 + 2 downto i * 3),
|
||||
gl_remap_valid => gl_remap_valid_int(i),
|
||||
gl_remap_ready => gl_remap_ready
|
||||
);
|
||||
|
||||
end generate GEN_SLICE;
|
||||
|
||||
|
|
@ -327,22 +255,22 @@ begin
|
|||
reg_GL_map_int <= cpu_gl_map when cpu_gl_map_en = '1' else seq_gl_map_int;
|
||||
|
||||
gl_remap_inst : entity work.gl_remap
|
||||
generic map(
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
generic map(
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
reg_GL_map => reg_GL_map_int,
|
||||
reg_GL_map => reg_GL_map_int,
|
||||
|
||||
in_valid => gl_remap_valid,
|
||||
in_data => gl_remap_in_data,
|
||||
in_ready => gl_remap_ready,
|
||||
in_valid => gl_remap_valid,
|
||||
in_data => gl_remap_in_data,
|
||||
in_ready => gl_remap_ready,
|
||||
|
||||
out_data_head => print_data,
|
||||
out_clk_head => print_clk
|
||||
);
|
||||
out_data_head => print_data,
|
||||
out_clk_head => print_clk
|
||||
);
|
||||
|
||||
|
||||
end rtl;
|
||||
end rtl;
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
-----------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief SOM FPGA preslicer
|
||||
--!
|
||||
--! @details This block is the the data core preslicer. Its purpose is to convert
|
||||
--! variable BPP data into a fixed width stream before sending towards the pixel
|
||||
--! buffer. It uses a FIFo to buffer print streamer data, flagging when to halt
|
||||
--! data at half full, to allow for any inflight memory requests. This replaces
|
||||
--! most of the functionality of the slicers (post pixel buffer), which are fixed
|
||||
--! at 3/4 BPP. 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 bpp_mode : the current bits-per-pixel mode (1, 2 or 3---same as 4BPP)
|
||||
--! @li clear_buffer : Pixel buffer clear pulse input
|
||||
--! @li ps_buf_wr_data : print streamer data input
|
||||
--! @li ps_buf_wr : Write strobe input for print streamer data
|
||||
--! @li ps_buf_rdy : Ready output towards print streamer
|
||||
--! @li ps_buf_last_word : input to flag last word of a image's stripes
|
||||
--! @li pixel_buf_wr_data : pixel buffer data data output
|
||||
--! @li pixel_buf_wr : Write strobe output to pixel buffer
|
||||
--! @li pixel_buf_rdy : Ready input from pixel buffer
|
||||
--! @li pixel_buf_last_word : Output flagging last word of an image's stripes
|
||||
--! @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) 2019 Global Inkjet Systems
|
||||
--! @date 2019-05-02
|
||||
-------------------------------------------------------------------------------
|
||||
-- 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 preslicer is
|
||||
generic(
|
||||
NUM_STRIPES_DEPTH : integer range 2 to 32 := 8; -- whole 1bpp equivalent stripes must it be possible to buffer in preslicer
|
||||
NUM_STRIPES_FULL_MARGIN : integer range 1 to 31 := 2; -- at least this many 1bpp equivalent stripes space must be available
|
||||
SHIFT_DEPTH : integer range 1 to 2048 := 128; -- head shift buffer depth
|
||||
MAX_OP_WIDTH : natural range 1 to 128 := 8;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port
|
||||
(
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
bpp_mode : in std_logic_vector(1 downto 0);
|
||||
clear_buffer : in std_logic;
|
||||
|
||||
-- Interface to print streamer
|
||||
ps_buf_wr : in std_logic;
|
||||
ps_buf_wr_data : in std_logic_vector(31 downto 0);
|
||||
ps_buf_rdy : out std_logic;
|
||||
ps_buf_last_word : in std_logic;
|
||||
|
||||
|
||||
-- Output data
|
||||
pixel_buf_wr : out std_logic;
|
||||
pixel_buf_wr_data : out std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy : in std_logic;
|
||||
pixel_buf_last_word : out std_logic;
|
||||
|
||||
ip_id_ip_number : out std_logic_vector(7 downto 0) := 8x"1d";
|
||||
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"03";
|
||||
ip_ver_major_number : out std_logic_vector(7 downto 0) := 8x"00"
|
||||
|
||||
);
|
||||
end preslicer;
|
||||
|
||||
|
||||
architecture rtl of preslicer is
|
||||
|
||||
type ps_array_t is array (natural range <>) of std_logic_vector;
|
||||
|
||||
constant DWORD_BITS : integer := 32;
|
||||
constant STRIPE_SIZE : integer := ((SHIFT_DEPTH * MAX_OP_WIDTH) / DWORD_BITS);
|
||||
|
||||
constant DEPTH : natural range 1 to 8182 := STRIPE_SIZE * NUM_STRIPES_DEPTH; -- in 32bit words (+ 1 bit flag)
|
||||
constant ALMOST_FULL_THRESH : natural range 1 to 2048 := STRIPE_SIZE * (NUM_STRIPES_DEPTH - NUM_STRIPES_FULL_MARGIN);
|
||||
|
||||
signal rdreq : std_logic;
|
||||
signal word_num : ps_array_t(0 to 0)(1 downto 0);
|
||||
signal empty : std_logic;
|
||||
signal almost_full : std_logic;
|
||||
signal q : std_logic_vector(32 downto 0);
|
||||
|
||||
signal bpp1_slice : ps_array_t(0 to 3)(32 downto 0);
|
||||
signal bpp2_slice : ps_array_t(0 to 1)(32 downto 0);
|
||||
signal bpp3_slice : ps_array_t(0 to 0)(32 downto 0);
|
||||
|
||||
signal read_phase : std_logic;
|
||||
signal pixel_buf_wr_data_int : std_logic_vector(32 downto 0);
|
||||
|
||||
signal ps_buf_wr_data_int : std_logic_vector(32 downto 0);
|
||||
signal ps_buf_wr_int : std_logic;
|
||||
signal pixel_buf_rdy_int : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
-- pragma translate_off
|
||||
assert NUM_STRIPES_DEPTH > NUM_STRIPES_FULL_MARGIN report "NUM_STRIPES_FULL_MARGIN must be < NUM_STRIPES_DEPTH" severity failure;
|
||||
-- pragma translate_on
|
||||
|
||||
|
||||
ps_buf_wr_data_int <= ps_buf_last_word & ps_buf_wr_data;
|
||||
|
||||
ps_buf_wr_int <= ps_buf_wr;
|
||||
|
||||
pixel_buf_rdy_int <= pixel_buf_rdy;
|
||||
|
||||
-- Pull out the bits from the shift register for the 3 BPP mode
|
||||
bpp3_slice(0) <= q;
|
||||
|
||||
-- @formatter:off
|
||||
-- Pull out the bits from the shift register for the 2BPP mode
|
||||
bpp2_slice(1) <= q(32) &
|
||||
"00" & q(31 downto 30) & "00" & q(29 downto 28) &
|
||||
"00" & q(27 downto 26) & "00" & q(25 downto 24) &
|
||||
"00" & q(23 downto 22) & "00" & q(21 downto 20) &
|
||||
"00" & q(19 downto 18) & "00" & q(17 downto 16);
|
||||
|
||||
bpp2_slice(0) <= "000" & q(15 downto 14) & "00" & q(13 downto 12) &
|
||||
"00" & q(11 downto 10) & "00" & q( 9 downto 8) &
|
||||
"00" & q( 7 downto 6) & "00" & q( 5 downto 4) &
|
||||
"00" & q( 3 downto 2) & "00" & q( 1 downto 0);
|
||||
|
||||
-- Pull out the bits from the shift register for the 3BPP mode
|
||||
bpp1_slice(3) <= q(32) &
|
||||
"000" & q(31) & "000" & q(30) & "000" & q(29) & "000" & q(28) &
|
||||
"000" & q(27) & "000" & q(26) & "000" & q(25) & "000" & q(24);
|
||||
bpp1_slice(2) <= "0000" & q(23) & "000" & q(22) & "000" & q(21) & "000" & q(20) &
|
||||
"000" & q(19) & "000" & q(18) & "000" & q(17) & "000" & q(16);
|
||||
bpp1_slice(1) <= "0000" & q(15) & "000" & q(14) & "000" & q(13) & "000" & q(12) &
|
||||
"000" & q(11) & "000" & q(10) & "000" & q( 9) & "000" & q( 8);
|
||||
bpp1_slice(0) <= "0000" & q( 7) & "000" & q( 6) & "000" & q( 5) & "000" & q( 4) &
|
||||
"000" & q( 3) & "000" & q( 2) & "000" & q( 1) & "000" & q( 0);
|
||||
|
||||
|
||||
-- Indicate the word_num phases to read the fifo for each BPP mode
|
||||
read_phase <= '1' when (bpp_mode = 2x"1" and word_num(0) = 2x"3") or
|
||||
(bpp_mode = 2x"2" and word_num(0)(0) = '1') or
|
||||
bpp_mode = 2x"3" or bpp_mode = 2x"0" else '0';
|
||||
-- @formatter:on
|
||||
|
||||
|
||||
pixel_buf_wr_data <= pixel_buf_wr_data_int(31 downto 0);
|
||||
pixel_buf_last_word <= pixel_buf_wr_data_int(32);
|
||||
|
||||
-- Instantiate The FIFO.
|
||||
preslicer_fifo_inst : entity work.alt_sync_fifo
|
||||
generic map
|
||||
(
|
||||
DATA_WIDTH => 33,
|
||||
DEPTH => DEPTH,
|
||||
REGISTER_OUTPUT => "ON",
|
||||
NEARLY_FULL => ALMOST_FULL_THRESH,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "ON"
|
||||
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
|
||||
sclr => clear_buffer,
|
||||
|
||||
wrdata => ps_buf_wr_data_int,
|
||||
wrreq => ps_buf_wr_int,
|
||||
|
||||
almost_full => almost_full,
|
||||
empty => empty,
|
||||
|
||||
rdreq => rdreq,
|
||||
rddata => q
|
||||
);
|
||||
|
||||
|
||||
-- Flag to print streamer we're ready for data until almost full
|
||||
ps_buf_rdy <= not almost_full;
|
||||
|
||||
rdreq <= pixel_buf_rdy_int and not empty and read_phase;
|
||||
|
||||
PRESLICER_CTRL : process(rst_n, clk) is
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
|
||||
pixel_buf_wr <= '0';
|
||||
word_num(0) <= (others => '0');
|
||||
|
||||
elsif clk'event and clk = '1' then
|
||||
|
||||
-- Select, for the data output from the expanded slice, using the matching pipelined word_num value.
|
||||
if bpp_mode = 2x"1" then
|
||||
pixel_buf_wr_data_int <= bpp1_slice(to_integer(unsigned(word_num(0))));
|
||||
elsif bpp_mode = 2x"2" then
|
||||
pixel_buf_wr_data_int <= bpp2_slice(to_integer(unsigned(word_num(0)(0 downto 0))));
|
||||
else
|
||||
pixel_buf_wr_data_int <= bpp3_slice(0);
|
||||
end if;
|
||||
|
||||
-- Start writing to the pixel buffer when word_num reaches 2. Clear if pixel buffer is stalled
|
||||
-- (aligned with output stage).
|
||||
pixel_buf_wr <= not empty and pixel_buf_rdy_int;
|
||||
|
||||
-- Read from the FIFO if the pixel buffer is ready, and okay to read, but continue
|
||||
-- if in the middle of a transfer. Similarly, increment the word_num index.
|
||||
if pixel_buf_rdy_int = '1' and empty = '0' then
|
||||
word_num(0) <= std_logic_vector(unsigned(word_num(0)) + 1);
|
||||
end if;
|
||||
|
||||
if clear_buffer then
|
||||
pixel_buf_wr <= '0';
|
||||
word_num(0) <= (others => '0');
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end rtl;
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief SOM FPGA preslicer
|
||||
--!
|
||||
--! @details This block is the data core dual channel preslicer wrapper.
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li clk : nominally 100MHz
|
||||
--! @li rst_n : active low reset for clk (asynchronous assert)
|
||||
--!
|
||||
--! @b Interfaces:
|
||||
--! @li bpp_mode : the current bits-per-pixel mode (1, 2 or 3---same as 4BPP)
|
||||
--! @li clear_buffer : Pixel buffer clear pulse input
|
||||
--! @li ps_buf_wr_data* : print streamer data input
|
||||
--! @li ps_buf_wr* : Write strobe input for print streamer data
|
||||
--! @li ps_buf_rdy* : Ready output towards print streamer
|
||||
--! @li ps_buf_last_word* : input to flag last word of a image's stripes
|
||||
--! @li pixel_buf_wr_data* : pixel buffer data data output
|
||||
--! @li pixel_buf_wr* : Write strobe output to pixel buffer
|
||||
--! @li pixel_buf_rdy : Ready input from pixel buffer
|
||||
--! @li pixel_buf_last_word : Output flagging last word of an image's stripes
|
||||
--!
|
||||
--! @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) 2020 Global Inkjet Systems
|
||||
--! @date 2020-04-02
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
entity preslicer_dual is
|
||||
generic (
|
||||
NUM_STRIPES_DEPTH : integer range 2 to 32 := 8; -- whole 1bpp equivalent stripes must it be possible to buffer in preslicer
|
||||
NUM_STRIPES_FULL_MARGIN : integer range 1 to 31 := 2; -- at least this many 1bpp equivalent stripes space must be available
|
||||
SHIFT_DEPTH : integer range 1 to 2048 := 128; -- head shift buffer depth
|
||||
MAX_OP_WIDTH : natural range 1 to 128 := 8;
|
||||
NO_ZERO_GAP : boolean := false
|
||||
);
|
||||
port
|
||||
(
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
bpp_mode : in std_logic_vector( 1 downto 0);
|
||||
clear_buffer : in std_logic;
|
||||
|
||||
-- Interface to print streamer
|
||||
ps_buf_wr : in std_logic;
|
||||
ps_buf_wr_data : in std_logic_vector(31 downto 0);
|
||||
ps_buf_rdy : out std_logic;
|
||||
ps_buf_last_word : in std_logic;
|
||||
|
||||
-- Auxiliary print streamer interafce. Used only if mutually
|
||||
-- exclusive from main interafce (shared memory port)
|
||||
ps_buf_wr_aux : in std_logic;
|
||||
ps_buf_wr_data_aux : in std_logic_vector(31 downto 0);
|
||||
ps_buf_rdy_aux : out std_logic;
|
||||
ps_buf_last_word_aux : in std_logic;
|
||||
|
||||
-- Output data
|
||||
pixel_buf_wr_aux : out std_logic;
|
||||
pixel_buf_wr : out std_logic;
|
||||
pixel_buf_wr_data : out std_logic_vector(31 downto 0);
|
||||
pixel_buf_wr_data_aux : out std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy : in std_logic_vector( 1 downto 0);
|
||||
pixel_buf_last_word : out std_logic_vector( 1 downto 0)
|
||||
|
||||
);
|
||||
end preslicer_dual;
|
||||
|
||||
|
||||
architecture rtl of preslicer_dual is
|
||||
|
||||
type data_array_t is array (0 to 1) of std_logic_vector(31 downto 0);
|
||||
|
||||
signal ps_buf_wr_int : std_logic_vector(1 downto 0);
|
||||
signal ps_buf_wr_data_int : data_array_t;
|
||||
signal ps_buf_rdy_int : std_logic_vector(1 downto 0);
|
||||
signal ps_buf_last_word_int : std_logic_vector(1 downto 0);
|
||||
|
||||
signal pixel_buf_wr_int : std_logic_vector(1 downto 0);
|
||||
signal pixel_buf_wr_data_int : data_array_t;
|
||||
signal pixel_buf_rdy_int : std_logic_vector(1 downto 0);
|
||||
signal pixel_buf_last_word_int : std_logic_vector(1 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
ps_buf_wr_int(0) <= ps_buf_wr;
|
||||
ps_buf_wr_data_int(0) <= ps_buf_wr_data;
|
||||
ps_buf_rdy <= ps_buf_rdy_int(0);
|
||||
ps_buf_last_word_int(0) <= ps_buf_last_word;
|
||||
|
||||
pixel_buf_wr <= pixel_buf_wr_int(0);
|
||||
pixel_buf_wr_data <= pixel_buf_wr_data_int(0);
|
||||
pixel_buf_rdy_int(0) <= pixel_buf_rdy(0);
|
||||
pixel_buf_last_word(0) <= pixel_buf_last_word_int(0);
|
||||
|
||||
GEN_ZG: if NO_ZERO_GAP = false generate
|
||||
|
||||
ps_buf_wr_int(1) <= ps_buf_wr_aux;
|
||||
ps_buf_wr_data_int(1) <= ps_buf_wr_data_aux;
|
||||
ps_buf_last_word_int(1) <= ps_buf_last_word_aux;
|
||||
ps_buf_rdy_aux <= ps_buf_rdy_int(1);
|
||||
|
||||
pixel_buf_wr_aux <= pixel_buf_wr_int(1);
|
||||
pixel_buf_wr_data_aux <= pixel_buf_wr_data_int(1);
|
||||
pixel_buf_rdy_int(1) <= pixel_buf_rdy(1);
|
||||
pixel_buf_last_word(1) <= pixel_buf_last_word_int(1);
|
||||
|
||||
end generate;
|
||||
|
||||
GEN_NO_ZG_TIE_OFF : if NO_ZERO_GAP generate
|
||||
|
||||
ps_buf_wr_int(1) <= '0';
|
||||
ps_buf_wr_data_int(1) <= (others => '0');
|
||||
ps_buf_last_word_int(1) <= '0';
|
||||
ps_buf_rdy_aux <= '0';
|
||||
|
||||
pixel_buf_wr_aux <= '0';
|
||||
pixel_buf_wr_data_aux <= (others => '0');
|
||||
pixel_buf_rdy_int(1) <= '0';
|
||||
pixel_buf_last_word(1) <= '0';
|
||||
|
||||
end generate;
|
||||
|
||||
GEN_PRESLICER : for i in 0 to 1 generate
|
||||
|
||||
GEN_NO_ZG : if i = 0 or NO_ZERO_GAP = false generate
|
||||
|
||||
preslicer_inst : entity work.preslicer
|
||||
generic map (
|
||||
NUM_STRIPES_DEPTH => NUM_STRIPES_DEPTH,
|
||||
NUM_STRIPES_FULL_MARGIN => NUM_STRIPES_FULL_MARGIN,
|
||||
SHIFT_DEPTH => SHIFT_DEPTH,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
bpp_mode => bpp_mode,
|
||||
clear_buffer => clear_buffer,
|
||||
|
||||
ps_buf_wr => ps_buf_wr_int(i),
|
||||
ps_buf_wr_data => ps_buf_wr_data_int(i),
|
||||
ps_buf_rdy => ps_buf_rdy_int(i),
|
||||
ps_buf_last_word => ps_buf_last_word_int(i),
|
||||
|
||||
-- Output data
|
||||
pixel_buf_wr => pixel_buf_wr_int(i),
|
||||
pixel_buf_wr_data => pixel_buf_wr_data_int(i),
|
||||
pixel_buf_rdy => pixel_buf_rdy_int(i),
|
||||
pixel_buf_last_word => pixel_buf_last_word_int(i)
|
||||
);
|
||||
end generate;
|
||||
|
||||
end generate;
|
||||
|
||||
end rtl;
|
||||
|
|
@ -30,6 +30,9 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pkg_functions.all;
|
||||
|
||||
entity freq_counter is
|
||||
generic (
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
QUARTUS_VERSION = "18.1"
|
||||
QUARTUS_VERSION = "17.0"
|
||||
DATE = "17:29:20 August 17, 2017"
|
||||
|
||||
# Revisions
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ set_global_assignment -name DEVICE 10CL006YU256C8G
|
|||
set_global_assignment -name TOP_LEVEL_ENTITY hmb_fpga_top
|
||||
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 17.0.0
|
||||
set_global_assignment -name PROJECT_CREATION_TIME_DATE "17:29:20 AUGUST 17, 2017"
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "18.1.0 SP0.18std Standard Edition"
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "18.1.0 Standard Edition"
|
||||
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
|
||||
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
|
||||
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
|
||||
|
|
@ -228,9 +228,6 @@ set_location_assignment PIN_G2 -to led_out[4]
|
|||
set_location_assignment PIN_G1 -to led_out[5]
|
||||
set_global_assignment -name VHDL_FILE ../src/hmb_head_monitor.vhd
|
||||
set_global_assignment -name VERILOG_FILE ../src/simple_i2c_slave.v
|
||||
set_global_assignment -name VHDL_FILE ../src/hmb_fpga_pkg_auto.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/hmb_fpga_csr_decode_auto.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/hmb_fpga_csr_regs_auto.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/hmb_fpga_top.vhd
|
||||
set_global_assignment -name QIP_FILE ip/lvds_rx_1ck_16d.qip
|
||||
set_global_assignment -name QIP_FILE ip/pll_25in_100out.qip
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
###################################################################
|
||||
# Makefile for HMB-DG logic synthesis
|
||||
#
|
||||
# Copyright (c) 2020 Global Inkjet Systems
|
||||
#
|
||||
###################################################################
|
||||
|
||||
TOP_NAME = hmb_fpga_top
|
||||
|
||||
MAKE_EXE = mingw32-make
|
||||
QUARTUS_EXE = quartus_sh
|
||||
OUTDIR = output_files
|
||||
|
||||
all:
|
||||
@${MAKE_EXE} -C ..\test autobuild
|
||||
@${QUARTUS_EXE} --flow compile ${TOP_NAME}.qpf
|
||||
|
||||
|
||||
clean:
|
||||
@rm -rf db incremental_db
|
||||
@rm -rf ${OUTDIR}/*
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1,54 +1,22 @@
|
|||
[{
|
||||
"ip_name" : "hmb_fpga",
|
||||
"bus" : "csr",
|
||||
"addr_width" : "16",
|
||||
"description" : "This block the top level HMB FPGA",
|
||||
"addr_hi_bit" : "9",
|
||||
"addr_lo_bit" : "5",
|
||||
"notes" : "The <tt style='color:#0000c0'>SHUTDN_ENx</tt> registers define which new monitor enables are to be set when an update is instigated. A bit set at 1 will update the equivalent enable. A bit at 0 has no effect, effectively leaving that enable in its previous state. To update the actual enables, the return-to-zero <tt style='color:#0000c0'>SHUTDN_GO</tt> register is written as 1. The enables are then set with the values in the <tt style='color:#0000c0'>SHUTDN_ENx</tt> registers after a delay. The delay is programmed via the <tt style='color:#0000c0'>SHUTDN_DLY_LO</tt>, <tt style='color:#0000c0'>SHUTDN_DLY_MID</tt> and <tt style='color:#0000c0'>SHUTDN_DLY_HI</tt> registers giving 24 bits of delay, in units of the system clock (nominally 10ns). If the delay registers are zero, then the enables are updated immediately on a <tt style='color:#0000c0'>GO</tt>. Otherwise, they are updated after the programmed delay. This mechanism can only set the enable bits. The <tt style='color:#0000c0'>SHUTDN_CLRx</tt> return-to-zero registers are used to clear the monitor enables. Writing a 1 in the bit position will clear that bit. This clearing is immediate, and does not use the delay mechanism. If a delay is in progress the clearing of the enable is ignored. The watch dog is controlled via the <tt style='color:#0000c0'>WD_CTRL</tt> register. The watchdog is enabled with the <tt style='color:#0000c0'>EN</tt> field and must then be periodically cleared by writing 1 to the return-to-zero <tt style='color:#0000c0'>CLR</tt> field. The clearing must occur before the period specified by the <tt style='color:#0000c0'>PERIOD</tt> field, which has units of 100ms. If the watchdog fires, then the <tt style='color:#0000c0'>WD_STATUS</tt> register indicates this. If any event causes a shutdown then the <tt style='color:#0000c0'>SHUTDOWN_MASTER</tt> register indicates this. The actual cause for the shutdown must then be inspected from the individual monitor registers. Some design-for-test registers are provided. The two <tt style='color:#0000c0'>SCRATCHx</tt> registers allow verification of I<sup>2</sup>C communications with the slave FPGA, whilst the <tt style='color:#0000c0'>TEST_TRIP</tt> register allows the artifical generation of a limited number of shutdown events by the software. The <tt style='color:#0000c0'>DBG_LED</tt> register allows the CPU to take control of the LEDs (set <tt style='color:#0000c0'>EN</tt> field) and then set a value (<tt style='color:#0000c0'>VAL</tt> field).",
|
||||
"sub_blocks" : {
|
||||
"local" : {
|
||||
"instance" : "",
|
||||
"process" : "hdl, cpp, txt",
|
||||
"offset" : "0x000"
|
||||
},
|
||||
"monitor:a" : {
|
||||
"instance" : "0",
|
||||
"process" : "cpp",
|
||||
"offset" : "0x020"
|
||||
},
|
||||
"monitor:b" : {
|
||||
"instance" : "1",
|
||||
"process" : "cpp",
|
||||
"offset" : "0x040"
|
||||
},
|
||||
"monitor:c" : {
|
||||
"instance" : "2",
|
||||
"process" : "cpp",
|
||||
"offset" : "0x060"
|
||||
},
|
||||
"monitor:d" : {
|
||||
"instance" : "3",
|
||||
"process" : "cpp",
|
||||
"offset" : "0x080"
|
||||
}
|
||||
},
|
||||
|
||||
"registers" : {
|
||||
"ip_id" : {
|
||||
"scratch0" : {
|
||||
"address" : "0",
|
||||
"width" : "8",
|
||||
"description" : "Unique ID for this IP block",
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x29"
|
||||
"type" : "w",
|
||||
"reset" : "0",
|
||||
"description" : "Scratch register 0"
|
||||
},
|
||||
"ip_ver" : {
|
||||
"scratch1" : {
|
||||
"address" : "1",
|
||||
"width" : "8",
|
||||
"description" : "Version number",
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x02"
|
||||
"type" : "w",
|
||||
"reset" : "0",
|
||||
"description" : "Scratch register 1"
|
||||
},
|
||||
"cpu_dbg_led" : {
|
||||
"address" : "2",
|
||||
|
|
@ -79,76 +47,76 @@
|
|||
"shutdn_en0" : {
|
||||
"address" : "4",
|
||||
"width" : "5",
|
||||
"description" : "Shutdown new trip enables for channel 0",
|
||||
"description" : "Shutdown trip enables",
|
||||
"fields": {
|
||||
"head_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trips from head 0"
|
||||
"description" : "Enable trips from head 0"
|
||||
},
|
||||
"amp_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trip from amp 0"
|
||||
"description" : "Enable trip from amp 0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shutdn_en1" : {
|
||||
"address" : "5",
|
||||
"width" : "5",
|
||||
"description" : "Shutdown new trip enables for channel 1",
|
||||
"description" : "Shutdown trip enables",
|
||||
"fields": {
|
||||
"head_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trips from head 1"
|
||||
"description" : "Enable trips from head 1"
|
||||
},
|
||||
"amp_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trip from amp 1"
|
||||
"description" : "Enable trip from amp 1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shutdn_en2" : {
|
||||
"address" : "6",
|
||||
"width" : "5",
|
||||
"description" : "Shutdown new trip enables for channel 2",
|
||||
"description" : "Shutdown trip enables",
|
||||
"fields": {
|
||||
"head_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trips from head 2"
|
||||
"description" : "Enable trips from head 2"
|
||||
},
|
||||
"amp_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trip from amp 2"
|
||||
"description" : "Enable trip from amp 2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shutdn_en3" : {
|
||||
"address" : "7",
|
||||
"width" : "5",
|
||||
"description" : "Shutdown new trip enables for channel 3",
|
||||
"description" : "Shutdown trip enables",
|
||||
"fields": {
|
||||
"head_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trips from head 3"
|
||||
"description" : "Enable trips from head 3"
|
||||
},
|
||||
"amp_trip" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Set new enable of trip from amp 3"
|
||||
"description" : "Enable trip from amp 3"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -203,28 +171,118 @@
|
|||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Watchdog fire alarm status"
|
||||
},
|
||||
|
||||
"scratch0" : {
|
||||
"address" : "22",
|
||||
"width" : "8",
|
||||
"type" : "w",
|
||||
"reset" : "0",
|
||||
"description" : "Scratch register 0"
|
||||
},
|
||||
"scratch1" : {
|
||||
"address" : "23",
|
||||
"width" : "8",
|
||||
"type" : "w",
|
||||
"h0_therm_rst" : {
|
||||
"address" : "64",
|
||||
"width" : "1",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Scratch register 1"
|
||||
"description" : "Head 0 thermal reset"
|
||||
},
|
||||
"i2c_timeout" : {
|
||||
"address" : "24",
|
||||
"h0_therm_trip_status" : {
|
||||
"address" : "65",
|
||||
"width" : "3",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal trip status"
|
||||
},
|
||||
"h0_shutdn_clr" : {
|
||||
"address" : "66",
|
||||
"width" : "8",
|
||||
"type" : "w",
|
||||
"reset" : "60",
|
||||
"description" : "Number of milliseconds that slave or master i2c can hold bus before being reset"
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown clear"
|
||||
},
|
||||
"h0_shutdn_status" : {
|
||||
"address" : "67",
|
||||
"width" : "8",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown status"
|
||||
},
|
||||
"h1_therm_rst" : {
|
||||
"address" : "80",
|
||||
"width" : "1",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal reset"
|
||||
},
|
||||
"h1_therm_trip_status" : {
|
||||
"address" : "81",
|
||||
"width" : "3",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal trip status"
|
||||
},
|
||||
"h1_shutdn_clr" : {
|
||||
"address" : "82",
|
||||
"width" : "8",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown clear"
|
||||
},
|
||||
"h1_shutdn_status" : {
|
||||
"address" : "83",
|
||||
"width" : "8",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown status"
|
||||
},
|
||||
"h2_therm_rst" : {
|
||||
"address" : "96",
|
||||
"width" : "1",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal reset"
|
||||
},
|
||||
"h2_therm_trip_status" : {
|
||||
"address" : "97",
|
||||
"width" : "3",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal trip status"
|
||||
},
|
||||
"h2_shutdn_clr" : {
|
||||
"address" : "98",
|
||||
"width" : "8",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown clear"
|
||||
},
|
||||
"h2_shutdn_status" : {
|
||||
"address" : "99",
|
||||
"width" : "8",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown status"
|
||||
},
|
||||
"h3_therm_rst" : {
|
||||
"address" : "112",
|
||||
"width" : "1",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal reset"
|
||||
},
|
||||
"h3_therm_trip_status" : {
|
||||
"address" : "113",
|
||||
"width" : "3",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Head 0 thermal trip status"
|
||||
},
|
||||
"h3_shutdn_clr" : {
|
||||
"address" : "114",
|
||||
"width" : "8",
|
||||
"type" : "w0",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown clear"
|
||||
},
|
||||
"h3_shutdn_status" : {
|
||||
"address" : "115",
|
||||
"width" : "8",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Shutdown status"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ use ieee.std_logic_1164.all;
|
|||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.hmb_fpga_pkg.all;
|
||||
|
||||
entity hmb_fpga_top is
|
||||
generic(
|
||||
|
|
@ -56,7 +55,7 @@ entity hmb_fpga_top is
|
|||
|
||||
shutdown_out : out std_logic;
|
||||
therm_trip_rst : out std_logic;
|
||||
|
||||
|
||||
-- thermal trips from onboard comparitors looking at therm_N/P[2:0] from head connectors
|
||||
-- present on FLX-FD-SG600 V1.0
|
||||
-- not present on FLX-FD-SG1024 V0.0
|
||||
|
|
@ -79,13 +78,9 @@ architecture struct of hmb_fpga_top is
|
|||
|
||||
-- Verilog module needs component declaration
|
||||
component simple_i2c_slave
|
||||
generic (
|
||||
FLT_LEN : integer := 20
|
||||
);
|
||||
port
|
||||
(
|
||||
clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
|
|
@ -104,40 +99,39 @@ architecture struct of hmb_fpga_top is
|
|||
type therm_trip_t is array (0 to 3) of std_logic_vector(2 downto 0);
|
||||
type shutdn_trip_t is array (0 to 3) of std_logic_vector(4 downto 0);
|
||||
|
||||
function calcFiltLen(testMode : boolean) return integer is
|
||||
begin
|
||||
if testMode then
|
||||
return 2; -- I2C SCL SDA filter 2 clocks in test mode
|
||||
else
|
||||
return 20;-- I2C SCL SDA filter 20 clocks (200ns) in normal mode
|
||||
end if;
|
||||
end function calcFiltLen;
|
||||
|
||||
constant CYCLES_PER_US : integer := 99;
|
||||
|
||||
constant I2C_FLT_LEN : integer := calcFiltLen(TEST_MODE);
|
||||
|
||||
constant LVDS_CLK1_BIT : integer range 0 to 32 := 14;
|
||||
|
||||
constant I2C_ADDR_SCRATCH0 : std_logic_vector(15 downto 0) := 16x"0000";
|
||||
constant I2C_ADDR_SCRATCH1 : std_logic_vector(15 downto 0) := 16x"0001";
|
||||
constant I2C_ADDR_DBG_LED : std_logic_vector(15 downto 0) := 16x"0002";
|
||||
constant I2C_ADDR_SHTDN_OUT : std_logic_vector(15 downto 0) := 16x"0003";
|
||||
constant I2C_ADDR_SHUT_EN_H0 : std_logic_vector(15 downto 0) := 16x"0004";
|
||||
constant I2C_ADDR_SHUT_EN_H1 : std_logic_vector(15 downto 0) := 16x"0005";
|
||||
constant I2C_ADDR_SHUT_EN_H2 : std_logic_vector(15 downto 0) := 16x"0006";
|
||||
constant I2C_ADDR_SHUT_EN_H3 : std_logic_vector(15 downto 0) := 16x"0007";
|
||||
constant I2C_ADDR_TST_SHUTDN : std_logic_vector(15 downto 0) := 16x"0008";
|
||||
constant I2C_ADDR_WD_CTRL : std_logic_vector(15 downto 0) := 16x"0010";
|
||||
constant I2C_ADDR_WD_STATUS : std_logic_vector(15 downto 0) := 16x"0011";
|
||||
constant I2C_ADDR_MON_BASE_H0 : std_logic_vector(15 downto 0) := 16x"0040";
|
||||
constant I2C_ADDR_MON_BASE_H1 : std_logic_vector(15 downto 0) := 16x"0050";
|
||||
constant I2C_ADDR_MON_BASE_H2 : std_logic_vector(15 downto 0) := 16x"0060";
|
||||
constant I2C_ADDR_MON_BASE_H3 : std_logic_vector(15 downto 0) := 16x"0070";
|
||||
|
||||
-- System clocks
|
||||
signal clk100 : std_logic;
|
||||
signal clk_lvds : std_logic;
|
||||
signal rst_n : std_logic := '0';
|
||||
|
||||
-- I2C signals
|
||||
signal scl_in : std_logic;
|
||||
signal scl_out : std_logic;
|
||||
signal sda_in : std_logic;
|
||||
signal sda_out : std_logic;
|
||||
signal avs_csr_address : std_logic_vector(15 downto 0);
|
||||
signal avs_csr_writedata : std_logic_vector(31 downto 0) := (others => '0');
|
||||
signal avs_csr_readdata : std_logic_vector(31 downto 0) := (others => '0');
|
||||
signal avs_csr_write : std_logic := '0';
|
||||
signal avs_csr_read : std_logic := '0';
|
||||
signal local_readdata : std_logic_vector(31 downto 0);
|
||||
signal local_read : std_logic;
|
||||
signal local_write : std_logic;
|
||||
signal address : std_logic_vector(15 downto 0);
|
||||
signal wr_data : std_logic_vector(7 downto 0);
|
||||
signal rd_data : std_logic_vector(7 downto 0);
|
||||
signal wr_en : std_logic := '0';
|
||||
signal rd_en : std_logic := '0';
|
||||
signal rd_dv : std_logic := '0';
|
||||
|
||||
-- LEDs
|
||||
|
|
@ -151,8 +145,7 @@ architecture struct of hmb_fpga_top is
|
|||
signal data_d2 : std_logic_vector(111 downto 0);
|
||||
|
||||
-- Shutdown signals
|
||||
signal hd_mon_wr : std_logic_vector(3 downto 0) := (others => '0');
|
||||
signal hd_mon_rd : std_logic_vector(3 downto 0) := (others => '0');
|
||||
signal hd_mon_csel : std_logic_vector(3 downto 0) := (others => '0');
|
||||
signal shutdown_int : std_logic_vector(3 downto 0) := (others => '0');
|
||||
|
||||
signal shutdn_trip_en : std_logic_vector(4 * 5 - 1 downto 0) := (others => '0');
|
||||
|
|
@ -184,30 +177,16 @@ architecture struct of hmb_fpga_top is
|
|||
|
||||
signal test_shtdn : std_logic_vector(7 downto 0) := 8x"0";
|
||||
|
||||
signal shutdown_comb : std_logic;
|
||||
|
||||
signal i2c_slv_reset : std_logic := '0';
|
||||
signal i2c_slv_active_uscnt : integer range 0 to 101 := 0;
|
||||
signal i2c_slv_active_uscnt_tick : std_logic := '0';
|
||||
signal i2c_slv_active_mscnt : integer range 0 to 1001 := 0;
|
||||
signal i2c_slv_active_mscnt_tick : std_logic := '0';
|
||||
signal i2c_slv_active_ms : integer range 0 to 255 := 0;
|
||||
signal i2c_slv_reset_count : std_logic_vector(7 downto 0) := (others => '0');
|
||||
|
||||
signal i2c_timeout : std_logic_vector(7 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- I/O Assignments
|
||||
------------------------------------------------------------------------------
|
||||
shutdown_out <= shutdown_comb;
|
||||
|
||||
shutdown_comb <= shutdown_int(0) or
|
||||
shutdown_int(1) or
|
||||
shutdown_int(2) or
|
||||
shutdown_int(3) or
|
||||
wd_alarm;
|
||||
shutdown_out <= shutdown_int(0) or
|
||||
shutdown_int(1) or
|
||||
shutdown_int(2) or
|
||||
shutdown_int(3) or
|
||||
wd_alarm;
|
||||
|
||||
therm_trip_rst <= therm_en(0) or
|
||||
therm_en(1) or
|
||||
|
|
@ -255,11 +234,11 @@ begin
|
|||
hd_mon_inst : entity work.hmb_head_monitor
|
||||
port map(
|
||||
clk => clk100,
|
||||
rst_n => rst_n,
|
||||
avs_csr_address => avs_csr_address(3 downto 0),
|
||||
avs_csr_write => hd_mon_wr(i),
|
||||
avs_csr_writedata => (avs_csr_writedata),
|
||||
avs_csr_read => hd_mon_rd(i),
|
||||
rst_n => '1',
|
||||
avs_csr_address => address(3 downto 0),
|
||||
avs_csr_write => (hd_mon_csel(i) and wr_en),
|
||||
avs_csr_writedata => (24x"0" & wr_data),
|
||||
avs_csr_read => (hd_mon_csel(i) and rd_en),
|
||||
avs_csr_readdata => mon_read_data(i),
|
||||
n_therm_trip_in => n_therm_trip(i),
|
||||
therm_enable_out => therm_en(i),
|
||||
|
|
@ -287,10 +266,6 @@ begin
|
|||
clk_en_10hz <= '0';
|
||||
end if;
|
||||
|
||||
if rst_n = '0' and cnt_10hz > 100 then
|
||||
rst_n <= '1';
|
||||
end if;
|
||||
|
||||
if clk_en_10hz = '1' then
|
||||
|
||||
-- Change led scan direction when end LEDs are set.
|
||||
|
|
@ -326,96 +301,25 @@ begin
|
|||
|
||||
end process;
|
||||
|
||||
--led_out <= cpu_led(5 downto 1) when cpu_led(0) = '1' else led(5) & data_d1(20) & data_d1(41) & data_d1(62) & data_d1(83);
|
||||
led_out <= '0' & clk_pclk & data_d1(12) & data_d1(9) & data_d1(0);
|
||||
led_out <= cpu_led(5 downto 1) when cpu_led(0) = '1' else led(5) & data_d1(20) & data_d1(41) & data_d1(62) & data_d1(83);
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate I2C slave
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
process(clk100)
|
||||
begin
|
||||
if rising_edge(clk100) then
|
||||
-- Read data is valid the cycle after avs_csr_read is asserted
|
||||
rd_dv <= avs_csr_read;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
I2C_SLAVE_MON: process (clk100)
|
||||
begin
|
||||
if clk100'event and clk100 = '1' then
|
||||
-- defaults
|
||||
i2c_slv_reset <= '0';
|
||||
i2c_slv_active_uscnt_tick <= '0';
|
||||
i2c_slv_active_mscnt_tick <= '0';
|
||||
|
||||
if rst_n = '0' then
|
||||
i2c_slv_active_uscnt <= 0;
|
||||
i2c_slv_active_mscnt <= 0;
|
||||
i2c_slv_active_ms <= 0;
|
||||
elsif (scl_out = '0' or sda_out = '0') then
|
||||
|
||||
i2c_slv_active_uscnt <= i2c_slv_active_uscnt + 1;
|
||||
if i2c_slv_active_uscnt = 99 then
|
||||
i2c_slv_active_uscnt_tick <= '1';
|
||||
i2c_slv_active_uscnt <= 0;
|
||||
end if;
|
||||
|
||||
if i2c_slv_active_uscnt_tick = '1' then
|
||||
i2c_slv_active_mscnt <= i2c_slv_active_mscnt + 1;
|
||||
if ((i2c_slv_active_mscnt = 999 and not TEST_MODE)
|
||||
or (i2c_slv_active_mscnt = 9 and TEST_MODE)) then
|
||||
i2c_slv_active_mscnt_tick <= '1';
|
||||
i2c_slv_active_mscnt <= 0;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if i2c_slv_active_mscnt_tick = '1' then
|
||||
i2c_slv_active_ms <= i2c_slv_active_ms + 1;
|
||||
if i2c_slv_active_ms = to_integer(unsigned(i2c_timeout)) then -- I2C bus stuck. We have been driving SCL or SDA low for > Timeout ms
|
||||
i2c_slv_reset <= '1';
|
||||
i2c_slv_active_ms <= 0;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
else
|
||||
i2c_slv_active_uscnt <= 0;
|
||||
i2c_slv_active_uscnt_tick <= '0';
|
||||
i2c_slv_active_ms <= 0;
|
||||
end if;
|
||||
|
||||
|
||||
if rst_n = '0' then
|
||||
i2c_slv_reset_count <= (others => '0');
|
||||
if TEST_MODE then
|
||||
i2c_slv_reset_count(0) <= '1'; -- so can check readback works
|
||||
end if;
|
||||
elsif i2c_slv_reset = '1' then
|
||||
if i2c_slv_reset_count /= x"FF" then
|
||||
i2c_slv_reset_count <= std_logic_vector(unsigned(i2c_slv_reset_count) + 1);
|
||||
end if;
|
||||
end if;
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
simple_i2c_slave_inst : simple_i2c_slave
|
||||
generic map (
|
||||
FLT_LEN => I2C_FLT_LEN
|
||||
)
|
||||
port map(
|
||||
clk => clk100,
|
||||
reset => i2c_slv_reset or not rst_n,
|
||||
scl_in => scl_in,
|
||||
scl_out => scl_out,
|
||||
sda_in => sda_in,
|
||||
sda_out => sda_out,
|
||||
i2c_busy_out => open,
|
||||
add_out => avs_csr_address,
|
||||
wr_data_out => avs_csr_writedata(7 downto 0),
|
||||
wr_en_out => avs_csr_write,
|
||||
rd_en_out => avs_csr_read,
|
||||
rd_data_in => avs_csr_readdata(7 downto 0),
|
||||
add_out => address,
|
||||
wr_data_out => wr_data,
|
||||
wr_en_out => wr_en,
|
||||
rd_en_out => rd_en,
|
||||
rd_data_in => rd_data,
|
||||
rd_dv_in => rd_dv
|
||||
);
|
||||
|
||||
|
|
@ -448,7 +352,7 @@ begin
|
|||
|
||||
-- In test mode, wire the compare counter to the micorsecnd counter
|
||||
-- to speed up simulations
|
||||
GEN_CMP_CNT_TEST : if TEST_MODE generate
|
||||
GEN_CMP_CNT_TEST : if TEST_MODE = true generate
|
||||
|
||||
cmp_count <= us_count(3 downto 0);
|
||||
|
||||
|
|
@ -462,7 +366,7 @@ begin
|
|||
end if;
|
||||
|
||||
-- If watchdog enabled and no shut down, count the time
|
||||
if en_wd = '1' and shutdown_comb = '0' then
|
||||
if en_wd = '1' and shutdown_out = '0' then
|
||||
|
||||
clk_count <= std_logic_vector(unsigned(clk_count) + 1);
|
||||
|
||||
|
|
@ -497,77 +401,65 @@ begin
|
|||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Create registers (non-monitor) and avs_csr_address decoding
|
||||
-- Create registers (non-monitor) and address decoding
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
hmb_fpga_csr_decode_inst : entity work.hmb_fpga_csr_decode
|
||||
generic map (
|
||||
ADDR_DECODE_HI_BIT => 9,
|
||||
ADDR_DECODE_LO_BIT => 5
|
||||
)
|
||||
port map (
|
||||
hd_mon_csel(0) <= '1' when (address(15 downto 4) = I2C_ADDR_MON_BASE_H0(15 downto 4)) else '0';
|
||||
hd_mon_csel(1) <= '1' when (address(15 downto 4) = I2C_ADDR_MON_BASE_H1(15 downto 4)) else '0';
|
||||
hd_mon_csel(2) <= '1' when (address(15 downto 4) = I2C_ADDR_MON_BASE_H2(15 downto 4)) else '0';
|
||||
hd_mon_csel(3) <= '1' when (address(15 downto 4) = I2C_ADDR_MON_BASE_H3(15 downto 4)) else '0';
|
||||
|
||||
local_write => local_write,
|
||||
local_read => local_read,
|
||||
local_readdata => local_readdata,
|
||||
monitor_0_write => hd_mon_wr(0),
|
||||
monitor_0_read => hd_mon_rd(0),
|
||||
monitor_0_readdata => mon_read_data(0),
|
||||
monitor_1_write => hd_mon_wr(1),
|
||||
monitor_1_read => hd_mon_rd(1),
|
||||
monitor_1_readdata => mon_read_data(1),
|
||||
monitor_2_write => hd_mon_wr(2),
|
||||
monitor_2_read => hd_mon_rd(2),
|
||||
monitor_2_readdata => mon_read_data(2),
|
||||
monitor_3_write => hd_mon_wr(3),
|
||||
monitor_3_read => hd_mon_rd(3),
|
||||
monitor_3_readdata => mon_read_data(3),
|
||||
process(clk100)
|
||||
begin
|
||||
if rising_edge(clk100) then
|
||||
|
||||
avs_address => avs_csr_address(9 downto 5),
|
||||
avs_write => avs_csr_write,
|
||||
avs_read => avs_csr_read,
|
||||
avs_readdata => avs_csr_readdata
|
||||
-- Default register values
|
||||
clr_wd <= '0';
|
||||
rd_data <= 8x"0";
|
||||
test_shtdn <= 8x"0";
|
||||
|
||||
);
|
||||
-- Read data is valid the cycle after rd_en is asserted
|
||||
rd_dv <= rd_en;
|
||||
|
||||
hmb_fpga_csr_regs_inst : entity work.hmb_fpga_csr_regs
|
||||
generic map(
|
||||
ADDR_DECODE_WIDTH => 5
|
||||
)
|
||||
port map(
|
||||
-- Clock and reset
|
||||
clk => clk100,
|
||||
rst_n => rst_n,
|
||||
-- Write registers
|
||||
if wr_en = '1' then
|
||||
case address is
|
||||
when I2C_ADDR_SCRATCH0 => scratch0 <= wr_data(7 downto 0);
|
||||
when I2C_ADDR_SCRATCH1 => scratch1 <= wr_data(7 downto 0);
|
||||
when I2C_ADDR_DBG_LED => cpu_led <= wr_data(5 downto 0);
|
||||
when I2C_ADDR_TST_SHUTDN => test_shtdn <= wr_data(7 downto 0);
|
||||
when I2C_ADDR_SHUT_EN_H0 => shutdn_trip_en(4 downto 0) <= wr_data(4 downto 0);
|
||||
when I2C_ADDR_SHUT_EN_H1 => shutdn_trip_en(9 downto 5) <= wr_data(4 downto 0);
|
||||
when I2C_ADDR_SHUT_EN_H2 => shutdn_trip_en(14 downto 10) <= wr_data(4 downto 0);
|
||||
when I2C_ADDR_SHUT_EN_H3 => shutdn_trip_en(19 downto 15) <= wr_data(4 downto 0);
|
||||
when I2C_ADDR_WD_CTRL => clr_wd <= wr_data(0);
|
||||
en_wd <= wr_data(1);
|
||||
wd_period <= wr_data(5 downto 2);
|
||||
when others => null;
|
||||
end case;
|
||||
end if;
|
||||
|
||||
scratch0 => scratch0,
|
||||
scratch1 => open,
|
||||
cpu_dbg_led_en => cpu_led(0),
|
||||
cpu_dbg_led_val => cpu_led(5 downto 1),
|
||||
shutdown_master => shutdown_comb,
|
||||
shutdn_en0_head_trip => shutdn_trip_en(3 downto 0),
|
||||
shutdn_en0_amp_trip => shutdn_trip_en(4),
|
||||
shutdn_en1_head_trip => shutdn_trip_en(8 downto 5),
|
||||
shutdn_en1_amp_trip => shutdn_trip_en(9),
|
||||
shutdn_en2_head_trip => shutdn_trip_en(13 downto 10),
|
||||
shutdn_en2_amp_trip => shutdn_trip_en(14),
|
||||
shutdn_en3_head_trip => shutdn_trip_en(18 downto 15),
|
||||
shutdn_en3_amp_trip => shutdn_trip_en(19),
|
||||
test_trip_head_trip => test_shtdn(3 downto 0),
|
||||
test_trip_amp_trip => test_shtdn(7 downto 4),
|
||||
wd_ctrl_clr => clr_wd,
|
||||
wd_ctrl_en => en_wd,
|
||||
wd_ctrl_period => wd_period,
|
||||
wd_status => wd_alarm,
|
||||
-- Read registers
|
||||
case? address is
|
||||
when I2C_ADDR_SCRATCH0 => rd_data(7 downto 0) <= scratch0;
|
||||
when I2C_ADDR_SCRATCH1 => rd_data(7 downto 0) <= scratch1;
|
||||
when I2C_ADDR_DBG_LED => rd_data(5 downto 0) <= cpu_led;
|
||||
when I2C_ADDR_SHTDN_OUT => rd_data(0) <= shutdown_out;
|
||||
when I2C_ADDR_SHUT_EN_H0 => rd_data(3 downto 0) <= shutdn_trip_en(3 downto 0);
|
||||
when I2C_ADDR_SHUT_EN_H1 => rd_data(3 downto 0) <= shutdn_trip_en(7 downto 4);
|
||||
when I2C_ADDR_SHUT_EN_H2 => rd_data(3 downto 0) <= shutdn_trip_en(11 downto 8);
|
||||
when I2C_ADDR_SHUT_EN_H3 => rd_data(3 downto 0) <= shutdn_trip_en(15 downto 12);
|
||||
when I2C_ADDR_MON_BASE_H0(15 downto 4) & "----" => rd_data <= mon_read_data(0)(7 downto 0);
|
||||
when I2C_ADDR_MON_BASE_H1(15 downto 4) & "----" => rd_data <= mon_read_data(1)(7 downto 0);
|
||||
when I2C_ADDR_MON_BASE_H2(15 downto 4) & "----" => rd_data <= mon_read_data(2)(7 downto 0);
|
||||
when I2C_ADDR_MON_BASE_H3(15 downto 4) & "----" => rd_data <= mon_read_data(3)(7 downto 0);
|
||||
when I2C_ADDR_WD_CTRL => rd_data(5 downto 0) <= wd_period & en_wd & clr_wd;
|
||||
when I2C_ADDR_WD_STATUS => rd_data(0) <= wd_alarm;
|
||||
when others => rd_data(0) <= '0';
|
||||
end case?;
|
||||
end if;
|
||||
|
||||
i2c_timeout => i2c_timeout,
|
||||
|
||||
avs_address => avs_csr_address(4 downto 0),
|
||||
avs_write => local_write,
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => local_read,
|
||||
avs_readdata => local_readdata
|
||||
|
||||
);
|
||||
end process;
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate deserialiser, 16 channel, 7:1, max 100MHz clock
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ end generate;
|
|||
-- default values
|
||||
therm_en_req <= '0'; -- any bit set by CSR write must by single cycle one-shot
|
||||
shutdown_trip_clr_reg <= (others => '0'); -- any bit set by CSR write must by single cycle one-shot
|
||||
avs_csr_readdata <= (others => '0');
|
||||
|
||||
-- write logic
|
||||
if (avs_csr_write = '1') then
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
module simple_i2c_slave
|
||||
(
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
input wire scl_in,
|
||||
output wire scl_out,
|
||||
input wire sda_in,
|
||||
|
|
@ -40,8 +39,6 @@ module simple_i2c_slave
|
|||
//----------------------------------------------------------------------------
|
||||
// Parameters
|
||||
localparam DEVICE_ADDRESS = 7'h39; // 7 bit Device Address
|
||||
parameter WR_SIZE = 2'd3;
|
||||
parameter FLT_LEN = 20; // Number of 100M clocks that signal is high or low to recognise
|
||||
// Timing
|
||||
|
||||
// I2C State Machine States
|
||||
|
|
@ -53,12 +50,8 @@ localparam TX_BYTE = 3'd4;
|
|||
|
||||
|
||||
// Internal Signals
|
||||
reg [FLT_LEN-1:0] scl_sr = {FLT_LEN{1'b1}};
|
||||
reg [FLT_LEN-1:0] sda_sr = {FLT_LEN{1'b1}};
|
||||
reg scl_filt = 1'b1;
|
||||
reg sda_filt = 1'b1;
|
||||
reg scl_filt_d = 1'b1;
|
||||
reg sda_filt_d = 1'b1;
|
||||
reg [2:0] scl_sr = 3'b111;
|
||||
reg [2:0] sda_sr = 3'b111;
|
||||
|
||||
wire scl_re;
|
||||
wire scl_fe;
|
||||
|
|
@ -77,7 +70,7 @@ reg rnw = 1'b0;
|
|||
|
||||
reg [2:0] next_state = RX_BYTE;
|
||||
reg [2:0] state = IDLE;
|
||||
|
||||
|
||||
reg [15:0] add = 16'd0;
|
||||
reg [7:0] wr_data = 8'd0;
|
||||
reg wr_en = 1'b0;
|
||||
|
|
@ -100,40 +93,17 @@ assign rd_en_out = read_pending;
|
|||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (reset == 1'b1) begin
|
||||
scl_sr <= {FLT_LEN{1'b1}};
|
||||
sda_sr <= {FLT_LEN{1'b1}};
|
||||
scl_filt <= 1'b1;
|
||||
sda_filt <= 1'b1;
|
||||
scl_filt_d <= 1'b1;
|
||||
sda_filt_d <= 1'b1;
|
||||
end
|
||||
else begin
|
||||
scl_sr <= {scl_sr[FLT_LEN-2:0], scl_in};
|
||||
sda_sr <= {sda_sr[FLT_LEN-2:0], sda_in};
|
||||
|
||||
if (&scl_sr[FLT_LEN-1:1] == 1'b1)
|
||||
scl_filt <= 1'b1;
|
||||
else if (|scl_sr[FLT_LEN-1:1] == 1'b0)
|
||||
scl_filt <= 1'b0;
|
||||
|
||||
if (&sda_sr[FLT_LEN-1:1] == 1'b1)
|
||||
sda_filt <= 1'b1;
|
||||
else if (|sda_sr[FLT_LEN-1:1] == 1'b0)
|
||||
sda_filt <= 1'b0;
|
||||
|
||||
scl_filt_d <= scl_filt;
|
||||
sda_filt_d <= sda_filt;
|
||||
end
|
||||
scl_sr <= {scl_sr[1:0], scl_in};
|
||||
sda_sr <= {sda_sr[1:0], sda_in};
|
||||
end
|
||||
|
||||
assign scl_re = ( scl_filt & !scl_filt_d);
|
||||
assign scl_fe = (!scl_filt & scl_filt_d);
|
||||
assign scl_hi = ( scl_filt);
|
||||
|
||||
assign sda_re = ( sda_filt & !sda_filt_d);
|
||||
assign sda_fe = (!sda_filt & sda_filt_d);
|
||||
|
||||
assign scl_re = (scl_sr[2:1] == 2'b01);
|
||||
assign scl_fe = (scl_sr[2:1] == 2'b10);
|
||||
assign scl_hi = (scl_sr[2:1] == 2'b11);
|
||||
|
||||
assign sda_re = (sda_sr[2:1] == 2'b01);
|
||||
assign sda_fe = (sda_sr[2:1] == 2'b10);
|
||||
|
||||
assign start = sda_fe & scl_hi;
|
||||
assign stop = sda_re & scl_hi;
|
||||
|
||||
|
|
@ -150,174 +120,151 @@ reg [7:0] rd_data = 8'd0;
|
|||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (reset)
|
||||
begin
|
||||
state <= IDLE;
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
read_pending <= 1'b0;
|
||||
i2c_busy <= 1'b0;
|
||||
case (state)
|
||||
IDLE:
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
read_pending <= 1'b0;
|
||||
i2c_busy <= 1'b0;
|
||||
|
||||
rnw <= 1'b0;
|
||||
next_state <= RX_BYTE;
|
||||
add <= 16'd0;
|
||||
wr_data <= 8'd0;
|
||||
|
||||
rd_byte <= 8'd0;
|
||||
rd_data <= 8'd0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
case (state)
|
||||
IDLE:
|
||||
if (start)
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
read_pending <= 1'b0;
|
||||
i2c_busy <= 1'b0;
|
||||
state <= RX_BYTE;
|
||||
end
|
||||
end
|
||||
|
||||
if (start)
|
||||
begin
|
||||
state <= RX_BYTE;
|
||||
end
|
||||
RX_BYTE :
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_re)
|
||||
begin
|
||||
rd_byte <= {rd_byte[6:0], sda_in}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (&bit_cnt)
|
||||
begin
|
||||
state <= SLV_ACK; // If last bit, go to Slave Acknowledge state
|
||||
end
|
||||
end
|
||||
|
||||
SLV_ACK:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_fe)
|
||||
begin
|
||||
byte_cnt <= byte_cnt + 2'd1; // Increment the byte count
|
||||
|
||||
if ((byte_cnt == 2'd0) & (rd_byte[7:1] == DEVICE_ADDRESS))
|
||||
i2c_busy <= 1'b1; // Assert so I/O control passes this through
|
||||
|
||||
if ((byte_cnt == 2'd0) & (rd_byte[7:1] != DEVICE_ADDRESS))
|
||||
state <= IDLE; // If not for us, ignore
|
||||
else
|
||||
state <= ACK_HOLD; // Otherwise respond
|
||||
|
||||
if (rd_byte[0] & (byte_cnt == 2'd0))
|
||||
next_state <= TX_BYTE;
|
||||
else if (byte_cnt == 3'd3)
|
||||
next_state <= IDLE;
|
||||
else
|
||||
next_state <= RX_BYTE;
|
||||
|
||||
if (byte_cnt == 2'd0)
|
||||
rnw <= rd_byte[0];
|
||||
|
||||
if (~rnw)
|
||||
begin
|
||||
|
||||
if (byte_cnt == 2'd1)
|
||||
add[15:8] <= rd_byte;
|
||||
|
||||
if (byte_cnt == 2'd2)
|
||||
add[7:0] <= rd_byte;
|
||||
|
||||
if (byte_cnt == 2'd3)
|
||||
wr_data <= rd_byte;
|
||||
end
|
||||
|
||||
RX_BYTE :
|
||||
|
||||
wr_en <= ((~rnw) & (byte_cnt == 3'd3)); // Assert write strobe if last byte of a write command
|
||||
read_pending <= rd_byte[0] & (byte_cnt == 2'd0);
|
||||
|
||||
if (byte_cnt == 8'd0)
|
||||
sda <= (rd_byte[7:1] != DEVICE_ADDRESS); // If receiving byte address, verify before asserting ACK
|
||||
else
|
||||
sda <= 1'b0; // Send ACK once line is clear
|
||||
end
|
||||
|
||||
ACK_HOLD:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
state <= IDLE;
|
||||
wr_en <= 1'b0; // Clear write enable
|
||||
end
|
||||
else if (scl_re)
|
||||
else
|
||||
begin
|
||||
rd_byte <= {rd_byte[6:0], sda_in}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
wr_en <= 1'b0; // Clear write enable
|
||||
|
||||
if (&bit_cnt)
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
state <= SLV_ACK; // If last bit, go to Slave Acknowledge state
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
sda <= 1'b1; // On next falling edge, deassert SDA
|
||||
scl <= ~read_pending; // If we're waiting for a read, keep SCL low
|
||||
state <= next_state;
|
||||
end
|
||||
end
|
||||
|
||||
SLV_ACK:
|
||||
TX_BYTE:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_fe)
|
||||
else
|
||||
begin
|
||||
byte_cnt <= byte_cnt + 2'd1; // Increment the byte count
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
if ((byte_cnt == 2'd0) & (rd_byte[7:1] == DEVICE_ADDRESS))
|
||||
i2c_busy <= 1'b1; // Assert so I/O control passes this through
|
||||
scl <= ~read_pending; // Keep SCL low until read is complete
|
||||
sda <= rd_data[7];
|
||||
|
||||
if ((byte_cnt == 2'd0) & (rd_byte[7:1] != DEVICE_ADDRESS))
|
||||
state <= IDLE; // If not for us, ignore
|
||||
else
|
||||
state <= ACK_HOLD; // Otherwise respond
|
||||
if (scl_fe)
|
||||
begin
|
||||
rd_data <= {rd_data[6:0], 1'b0}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (rd_byte[0] & (byte_cnt == 2'd0))
|
||||
next_state <= TX_BYTE;
|
||||
else if (byte_cnt == 3'd3)
|
||||
next_state <= IDLE;
|
||||
else
|
||||
next_state <= RX_BYTE;
|
||||
|
||||
if (byte_cnt == 2'd0)
|
||||
rnw <= rd_byte[0];
|
||||
|
||||
if (~rnw)
|
||||
begin
|
||||
|
||||
if (byte_cnt == 2'd1)
|
||||
add[15:8] <= rd_byte;
|
||||
|
||||
if (byte_cnt == 2'd2)
|
||||
add[7:0] <= rd_byte;
|
||||
|
||||
if (byte_cnt == 2'd3)
|
||||
wr_data <= rd_byte;
|
||||
end
|
||||
|
||||
|
||||
wr_en <= ((~rnw) & (byte_cnt == WR_SIZE)); // Assert write strobe if last byte of a write command
|
||||
read_pending <= rd_byte[0] & (byte_cnt == 2'd0);
|
||||
|
||||
if (byte_cnt == 8'd0)
|
||||
sda <= (rd_byte[7:1] != DEVICE_ADDRESS); // If receiving byte address, verify before asserting ACK
|
||||
else
|
||||
sda <= 1'b0; // Send ACK once line is clear
|
||||
if (&bit_cnt)
|
||||
state <= IDLE; // If last bit sent, go to idle condition
|
||||
end
|
||||
end
|
||||
|
||||
ACK_HOLD:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
wr_en <= 1'b0; // Clear write enable
|
||||
end
|
||||
else
|
||||
begin
|
||||
wr_en <= 1'b0; // Clear write enable
|
||||
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
default :
|
||||
begin // If we end up here, go to IDLE
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
read_pending <= 1'b0;
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
sda <= 1'b1; // On next falling edge, deassert SDA
|
||||
scl <= ~read_pending; // If we're waiting for a read, keep SCL low
|
||||
state <= next_state;
|
||||
end
|
||||
end
|
||||
|
||||
TX_BYTE:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
scl <= ~read_pending; // Keep SCL low until read is complete
|
||||
sda <= rd_data[7];
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
rd_data <= {rd_data[6:0], 1'b0}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (&bit_cnt)
|
||||
state <= IDLE; // If last bit sent, go to idle condition
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
default :
|
||||
begin // If we end up here, go to IDLE
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
read_pending <= 1'b0;
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
endcase
|
||||
end
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,4 @@
|
|||
@py -3 %FWTOOLSDIR%\gen_htm.py -j .\doc\test.json -b csr -B
|
||||
|
||||
@REM Add project specific build here. Normally just point to top of the repository for hierarchical scan
|
||||
@py -3 %FWTOOLSDIR%\gen_elhal.py -j .\doc\test.json -b csr -o .\src\hal
|
||||
@py -3 %FWTOOLSDIR%\gen_elhal.py -j ..\doc\hmb_fpga.json -b csr -o .\src\hal
|
||||
@py -3 %FWTOOLSDIR%\gen_hdl.py -j ..\doc\hmb_fpga.json -b csr -s _auto
|
||||
@py -3 %FWTOOLSDIR%\gen_elhal.py -j .\doc\test.json -b csr -o .\src\hal
|
||||
|
|
@ -9,9 +9,6 @@
|
|||
../build/ip/io_buf_i2c.vhd
|
||||
../build/ip/lvds_rx_1ck_16d.vhd
|
||||
../build/ip/pll_25in_100out.vhd
|
||||
../src/hmb_fpga_pkg_auto.vhd
|
||||
../src/hmb_fpga_csr_decode_auto.vhd
|
||||
../src/hmb_fpga_csr_regs_auto.vhd
|
||||
../src/hmb_head_monitor.vhd
|
||||
../src/hmb_fpga_top.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -8,102 +8,68 @@
|
|||
# User files to build, passed in to vproc makefile build
|
||||
USERCODE = VUserMain0.cpp utils.cpp runTest.cpp
|
||||
|
||||
MODELSIMDIR = c:\altera\ver\modelsim_ae
|
||||
MODELSIMDIRAUX = c:\altera\ver\modelsim_ase
|
||||
FWDEVTOOLS = ../../../../fw_development_tools
|
||||
VPROCDIR = ${FWDEVTOOLS}/verification/vproc
|
||||
MODELSIMDIR = c:\altera_18_1\ver\modelsim_ae
|
||||
FWDEVTOOLS = e:/git/fw_development_tools
|
||||
VPROCDIR = ${FWDEVTOOLS}/verification/vproc
|
||||
|
||||
# Name of gnu-make executable
|
||||
MAKE_EXE = mingw32-make
|
||||
VSIMEXE = ${MODELSIMDIR}\\win32aloem\\vsim
|
||||
VSIMEXEAUX = ${MODELSIMDIRAUX}\\win32aloem\\vsim
|
||||
AUTOSCRIPT = autogen.bat
|
||||
CMDSHELL = cmd /c
|
||||
MAKE_EXE = mingw32-make
|
||||
|
||||
# Pick single target files for two auto-generations---UUT and test.
|
||||
# Pick single target files for two auto-generations---UUT and test.
|
||||
# The core.h file is always presentfor the UUT, and the test package
|
||||
# for the test bench
|
||||
TBAUTOFILE = test_pkg_auto.vhd
|
||||
|
||||
JSONFILES = doc/*.json ../doc/*.json
|
||||
JSONFILES = doc/*.json
|
||||
|
||||
# If no external code directory (e.g. a HAL) set this to local source directory, else set to code directory
|
||||
EXTINCLDIR = ${CURDIR}/src
|
||||
# Add -DVPROC_VHDL to this variable if using the VHDL models for VProc and memory model
|
||||
HALCOPTS = -DVPROC_VHDL
|
||||
|
||||
VSIMARGS =
|
||||
VSIMARGS =
|
||||
|
||||
#------------------------------------------------------
|
||||
# BUILD RULES
|
||||
#------------------------------------------------------
|
||||
|
||||
# Build is dependant on generating the auto-gen file and
|
||||
# Build is dependant on generating the auto-gen file and
|
||||
# processing makefile in vproc
|
||||
all: ${TBAUTOFILE} vproc
|
||||
|
||||
# Make test bench auto-gen code dependant on all the JSON files to
|
||||
# Make test bench auto-gen code dependant on all the JSON files to
|
||||
# call the batch file if any have changed
|
||||
${TBAUTOFILE}: ${JSONFILES}
|
||||
@${CMDSHELL} ${AUTOSCRIPT}
|
||||
@cmd /c autogen.bat
|
||||
|
||||
# Call the vproc make file for it to determine if anything
|
||||
# needs building.
|
||||
.PHONY : vproc
|
||||
vproc:
|
||||
@${MAKE_EXE} -C ${VPROCDIR} \
|
||||
TESTDIR=${CURDIR} \
|
||||
USER_C="${USERCODE}" \
|
||||
MODELSIMDIR="${MODELSIMDIR}" \
|
||||
EXTINCLDIR="${EXTINCLDIR}" \
|
||||
HALCOPTS="${HALCOPTS}"
|
||||
TESTDIR=${CURDIR} \
|
||||
USER_C="${USERCODE}" \
|
||||
MODELSIMDIR="${MODELSIMDIR}" \
|
||||
EXTINCLDIR="${EXTINCLDIR}" \
|
||||
HALCOPTS="${HALCOPTS}"
|
||||
|
||||
#------------------------------------------------------
|
||||
# EXECUTION RULES
|
||||
#------------------------------------------------------
|
||||
|
||||
run: all
|
||||
@${VSIMEXE} -c -do sim.do ${VSIMARGS}
|
||||
@${MODELSIMDIR}\win32aloem\vsim -c -do sim.do ${VSIMARGS}
|
||||
|
||||
rungui: all
|
||||
@${VSIMEXE} -gui -do simg.do ${VSIMARGS}
|
||||
|
||||
runlog: all
|
||||
@awk -F" " '/add wave/{print "log " $$NF}' < wave.do > batch.do
|
||||
@${VSIMEXE} -c -do simlog.do ${VSIMARGS}
|
||||
|
||||
runfree: all
|
||||
@awk -F" " '/add wave/{print "log " $$NF}' < wave.do > batch.do
|
||||
@${VSIMEXEAUX} -c -do simlog.do ${VSIMARGS}
|
||||
|
||||
@${MODELSIMDIR}\\win32aloem\\vsim -gui -do simg.do ${VSIMARGS}
|
||||
|
||||
compile:
|
||||
@${VSIMEXE} -c -do compile.do -do quit
|
||||
|
||||
waves:
|
||||
@${VSIMEXEAUX} -view vsim.wlf -do wave.do
|
||||
|
||||
autobuild:
|
||||
@${CMDSHELL} ${AUTOSCRIPT}
|
||||
@${MODELSIMDIR}\\win32aloem\\vsim -c -do compile.do -do quit
|
||||
|
||||
gui: rungui
|
||||
|
||||
sim: run
|
||||
|
||||
log: runlog
|
||||
|
||||
free: runfree
|
||||
|
||||
help:
|
||||
@echo "make help Display this message"
|
||||
@echo "make Build C/C++ code without running simulation"
|
||||
@echo "make compile Build HDL code without running simulation"
|
||||
@echo "make autobuild Build auto-generated code without running simulation"
|
||||
@echo "make run/sim Build and run batch simulation"
|
||||
@echo "make rungui/gui Build and run GUI simulation"
|
||||
@echo "make runlog/log Build and run batch simulation with signal logging"
|
||||
@echo "make runfree/free Build and run batch simulation with signal logging on free starter ModelSim"
|
||||
@echo "make waves Run wave view in free starter ModelSim (to view runlog/runfree signals)"
|
||||
|
||||
#------------------------------------------------------
|
||||
# CLEANING RULES
|
||||
#------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,774 +0,0 @@
|
|||
/**************************************************************/
|
||||
/* runTest.cpp Date: 2019/09/03 */
|
||||
/* */
|
||||
/* Copyright (c) 2019 GIS. All rights reserved. */
|
||||
/* */
|
||||
/**************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "tb.h"
|
||||
#include "runTest.h"
|
||||
#include "utils.h"
|
||||
|
||||
extern "C" {
|
||||
#include "VUser.h"
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// Test code
|
||||
// --------------------------------------------------
|
||||
|
||||
int runTest::start(int node)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
// ------------------------------------
|
||||
// Create a test bench object for local
|
||||
// TB register access.
|
||||
CTestAuto* pTestBench = new CTestAuto((uint32_t*)(0));
|
||||
|
||||
clkFreqMHz = pTestBench->pConfig->GetClkFreq();
|
||||
i2cFreqKHz = pTestBench->pConfig->GetI2cFreq();
|
||||
testLvds = pTestBench->pConfig->GetTestLvds();
|
||||
|
||||
VPrint("\nNODE%d: Starting main tests...\n", node);
|
||||
|
||||
VPrint("NODE%d: Configuration: clkFreqMHz=%d i2cFreqKHz=%d testLvds=%d\n", node, clkFreqMHz, i2cFreqKHz, testLvds ? 1 : 0);
|
||||
|
||||
// Run all the tests
|
||||
error |= i2c_if_test (pTestBench);
|
||||
//error |= therm_trip_test (pTestBench);
|
||||
//error |= therm_trip_rst_test (pTestBench);
|
||||
//error |= therm_trip_reset_level_test (pTestBench);
|
||||
//error |= shutdn_trip_test (pTestBench);
|
||||
//error |= shutdn_en_dly_test (pTestBench);
|
||||
//error |= watchdog_test (pTestBench);
|
||||
|
||||
// Only test the LVDS data path if enabled in the TB configuration.
|
||||
// This test should be last as it enable sthe LVDS clocking which slows
|
||||
// the simulator down and the other tests do not need this.
|
||||
//if (testLvds)
|
||||
//{
|
||||
//error |= serdes_test (pTestBench);
|
||||
//}
|
||||
|
||||
// Return status to calling function
|
||||
return error ? TEST_ERROR : NOERROR;
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// SERDES test
|
||||
// --------------------------------------------------
|
||||
|
||||
//uint32_t runTest::serdes_test (CTestAuto* pTestBench)
|
||||
//{
|
||||
//uint32_t error = 0;
|
||||
//uint32_t data;
|
||||
|
||||
//bool seen_error = false;
|
||||
|
||||
//VPrint(" Starting LVDS SERDES tests\n");
|
||||
|
||||
//// Enable the LVDS clock
|
||||
//pTestBench->pLvdsClkEn->SetLvdsClkEn(1);
|
||||
|
||||
//nsleepSim(300);
|
||||
|
||||
//for (int idx = 0; idx < 88; idx++)
|
||||
//{
|
||||
//// Each 19th bit in the data out is intercepted
|
||||
//// and a clock placed on the bit so skip
|
||||
//if ((idx % 22) == 18)
|
||||
//continue;
|
||||
|
||||
//// Set bit on LVDS parallel busy
|
||||
//switch(idx / 32)
|
||||
//{
|
||||
//case 0 : pTestBench->pLvdsTxParLo->SetLvdsTxParLo ((1 << (idx % 32))); break;
|
||||
//case 1 : pTestBench->pLvdsTxParMid->SetLvdsTxParMid((1 << (idx % 32))); break;
|
||||
//case 2 : pTestBench->pLvdsTxParHi->SetLvdsTxParHi ((1 << (idx % 32))); break;
|
||||
//}
|
||||
|
||||
//// Allow the data to propogate through the LVDS SERDES chain.
|
||||
//nsleepSim(250);
|
||||
|
||||
//for (int jdx = 0; jdx < 3; jdx ++)
|
||||
//{
|
||||
|
||||
//// Read all d_out bits and check only lvds input set bit is 1
|
||||
//switch(jdx)
|
||||
//{
|
||||
//case 0 : data = pTestBench->pDOutLo->GetDOutLo () ; break;
|
||||
//case 1 : data = pTestBench->pDOutMid->GetDOutMid(); break;
|
||||
//case 2 : data = pTestBench->pDOutHi->GetDOutHi (); break;
|
||||
//}
|
||||
|
||||
//uint32_t exp = ((idx /32) == jdx) ? ( 1 << (idx % 32)) : 0;
|
||||
|
||||
//if (data != exp)
|
||||
//{
|
||||
//if (!seen_error)
|
||||
//{
|
||||
//VPrint("**ERROR 500: d_out status for bit %d at word %d. (got 0x%08x, exp 0x%08x)\n", idx, jdx, data, exp);
|
||||
//error |= 1;
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
||||
//seen_error = error;
|
||||
|
||||
//// Clear bit
|
||||
//switch(idx / 32)
|
||||
//{
|
||||
//case 0 : pTestBench->pLvdsTxParLo->SetLvdsTxParLo (0); break;
|
||||
//case 1 : pTestBench->pLvdsTxParMid->SetLvdsTxParMid(0); break;
|
||||
//case 2 : pTestBench->pLvdsTxParHi->SetLvdsTxParHi (0); break;
|
||||
//}
|
||||
//}
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
// --------------------------------------------------
|
||||
// Watchdog test
|
||||
// --------------------------------------------------
|
||||
|
||||
//uint32_t runTest::watchdog_test(CTestAuto* pTestBench)
|
||||
//{
|
||||
//uint32_t error = 0;
|
||||
//uint32_t data;
|
||||
//uint32_t status;
|
||||
|
||||
//VPrint(" Starting watchdog tests\n");
|
||||
|
||||
//// Enable and Clear
|
||||
//i2cWrite(I2C_ADDR_WD_CTRL, WD_DEFAULT_PERIOD | WD_EN | WD_CLR, pTestBench);
|
||||
|
||||
//// Check it didn't fire
|
||||
//i2cRead(I2C_ADDR_WD_STATUS, data, pTestBench);
|
||||
|
||||
//if (data)
|
||||
//{
|
||||
//VPrint("**ERROR 400: Bad watchdog status. (got 0x%02d, exp 0x%02d)\n", data, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Clear
|
||||
//i2cWrite(I2C_ADDR_WD_CTRL, WD_DEFAULT_PERIOD | WD_EN | WD_CLR, pTestBench);
|
||||
|
||||
//// Wait for past firing time
|
||||
//nsleepSim(10100);
|
||||
|
||||
//// Check it fired
|
||||
//i2cRead(I2C_ADDR_WD_STATUS, data, pTestBench);
|
||||
|
||||
//if (data != 1)
|
||||
//{
|
||||
//VPrint("**ERROR 401: Bad watchdog status. (got 0x%02d, exp 0x%02d)\n", data, 1);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Check shutdown in TB status is set
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status == 0)
|
||||
//{
|
||||
//VPrint("**ERROR 402: bad test bench trip status for watchdog. (got 0x%02d, exp 0x%02d)\n", status, 1);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Disable watchdog
|
||||
//i2cWrite(I2C_ADDR_WD_CTRL, WD_DEFAULT_PERIOD, pTestBench);
|
||||
|
||||
//// Check cleared
|
||||
//i2cRead(I2C_ADDR_WD_STATUS, data, pTestBench);
|
||||
|
||||
//if (data)
|
||||
//{
|
||||
//VPrint("**ERROR 403: Bad watchdog status. (got 0x%02d, exp 0x%02d)\n", data, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Check shutdown deasserted
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status != 0)
|
||||
//{
|
||||
//VPrint("**ERROR 404: bad test bench trip status for watchdog. (got 0x%02d, exp 0x%02d)\n", status, 1);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
//// --------------------------------------------------
|
||||
// Thermal trip test
|
||||
// --------------------------------------------------
|
||||
|
||||
//uint32_t runTest::therm_trip_rst_test(CTestAuto* pTestBench)
|
||||
//{
|
||||
//int error = 0;
|
||||
|
||||
//VPrint(" Starting thermal trip reset tests\n");
|
||||
|
||||
//for (int head = 0; head < 4; head++)
|
||||
//{
|
||||
//// Clear therm_trip_rst_count in TB
|
||||
//pTestBench->pClrThermRstCount->SetClrThermRstCount(1);
|
||||
|
||||
//uint32_t monBaseSpacing = I2C_ADDR_MON_BASE_H1 - I2C_ADDR_MON_BASE_H0;
|
||||
|
||||
//// Write to the I2C register in given head's monitor
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + head*monBaseSpacing + MON_THERM_EN_OFFSET, 1, pTestBench);
|
||||
|
||||
//nsleepSim(200);
|
||||
|
||||
//// Read the count
|
||||
//uint32_t count = pTestBench->pThermRstCount->GetThermRstCount();
|
||||
|
||||
//if (count != 7)
|
||||
//{
|
||||
//VPrint("**ERROR 200: bad thermal trip reset count for head %d. (got 0x%02d, exp 0x%02d)\n", head, count, 7);
|
||||
//error |= 1;
|
||||
//}
|
||||
//}
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
// Thermistor fault trip reset level test
|
||||
// --------------------------------------------------
|
||||
|
||||
//uint32_t runTest::therm_trip_reset_level_test(CTestAuto* pTestBench)
|
||||
//{
|
||||
//int error = 0;
|
||||
//uint32_t status = 0;
|
||||
//uint32_t target = 0;
|
||||
|
||||
//VPrint(" Starting thermistor fault trip reset level set tests\n");
|
||||
|
||||
//for (int head = 0; head < 4; head++)
|
||||
//{
|
||||
//target = 0;
|
||||
//status = pTestBench->pThermTripResetStatus->GetThermTripResetStatus();
|
||||
//if (status != target)
|
||||
//{
|
||||
//VPrint("**ERROR 700: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, target);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//uint32_t monBaseSpacing = I2C_ADDR_MON_BASE_H1 - I2C_ADDR_MON_BASE_H0;
|
||||
|
||||
//// Write to the I2C register in given head's monitor
|
||||
//// set it to 1
|
||||
//target = 1;
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + head*monBaseSpacing + MON_THERM_TRIP_RESET_LEVEL_OFFSET, target, pTestBench);
|
||||
|
||||
//nsleepSim(200);
|
||||
|
||||
//// Read the status
|
||||
//status = pTestBench->pThermTripResetStatus->GetThermTripResetStatus();
|
||||
//if (target != status)
|
||||
//{
|
||||
//VPrint("**ERROR 701: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, target);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Write to the I2C register in given head's monitor
|
||||
//// set it to 1 again
|
||||
//target = 1;
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + head*monBaseSpacing + MON_THERM_TRIP_RESET_LEVEL_OFFSET, target, pTestBench);
|
||||
|
||||
//nsleepSim(200);
|
||||
|
||||
//// Read the status
|
||||
//status = pTestBench->pThermTripResetStatus->GetThermTripResetStatus();
|
||||
//if (target != status)
|
||||
//{
|
||||
//VPrint("**ERROR 702: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, target);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Write to the I2C register in given head's monitor
|
||||
//// set it to 0
|
||||
//target = 0;
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + head*monBaseSpacing + MON_THERM_TRIP_RESET_LEVEL_OFFSET, target, pTestBench);
|
||||
|
||||
//nsleepSim(200);
|
||||
|
||||
//// Read the status
|
||||
//status = pTestBench->pThermTripResetStatus->GetThermTripResetStatus();
|
||||
//if (target != status)
|
||||
//{
|
||||
//VPrint("**ERROR 703: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, target);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Write to the I2C register in given head's monitor
|
||||
//// set it to 0 again
|
||||
//target = 0;
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + head*monBaseSpacing + MON_THERM_TRIP_RESET_LEVEL_OFFSET, target, pTestBench);
|
||||
|
||||
//nsleepSim(200);
|
||||
|
||||
//// Read the status
|
||||
//status = pTestBench->pThermTripResetStatus->GetThermTripResetStatus();
|
||||
//if (target != status)
|
||||
//{
|
||||
//VPrint("**ERROR 704: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, target);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------
|
||||
// Shutdown enable delay test
|
||||
// -------------------------------------------------
|
||||
|
||||
//uint32_t runTest::shutdn_en_dly_test (CTestAuto* pTestBench)
|
||||
//{
|
||||
//int error = 0;
|
||||
//uint32_t status;
|
||||
//uint32_t data;
|
||||
|
||||
//VPrint(" Starting shutdown trip enable delay tests\n");
|
||||
|
||||
//// Disable all shutdowns
|
||||
//for (int head = 0; head < 4; head++)
|
||||
//{
|
||||
//i2cWrite(I2C_ADDR_SHUT_CLR0 + head, 0xff, pTestBench);
|
||||
//}
|
||||
|
||||
//// Set a 1ms delay
|
||||
//uint32_t delay1msTicks = 100000;
|
||||
//i2cWrite(I2C_ADDR_SHUT_DLY_LO, (delay1msTicks >> 0) & 0xff, pTestBench);
|
||||
//i2cWrite(I2C_ADDR_SHUT_DLY_MID, (delay1msTicks >> 8) & 0xff, pTestBench);
|
||||
//i2cWrite(I2C_ADDR_SHUT_DLY_HI, (delay1msTicks >> 16) & 0xff, pTestBench);
|
||||
|
||||
//// Set a new shutdown enable
|
||||
//i2cWrite(I2C_ADDR_SHUT_EN_H0, 1, pTestBench);
|
||||
|
||||
//// Check no shutdown
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status)
|
||||
//{
|
||||
//VPrint("**ERROR 600: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", 0, status, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Set go
|
||||
//i2cWrite(I2C_ADDR_SHUT_GO, 1, pTestBench);
|
||||
|
||||
//// Wait for 0.5ms
|
||||
//usleepSim(500);
|
||||
|
||||
//// Set a trip on the input
|
||||
//pTestBench->pTrip->SetShutdnH0(1);
|
||||
|
||||
//// check no shutdown
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status)
|
||||
//{
|
||||
//VPrint("**ERROR 601: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", 0, status, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Wait for 0.5ms
|
||||
//usleepSim(500);
|
||||
|
||||
//// Set a trip on the input
|
||||
//pTestBench->pTrip->SetShutdnH0(1);
|
||||
|
||||
//// Check for shutdown
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status == 0)
|
||||
//{
|
||||
//VPrint("**ERROR 602: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d, trip 0x%x)\n", 0, status, 1, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Clear enable
|
||||
//i2cWrite(I2C_ADDR_SHUT_CLR0, 1, pTestBench);
|
||||
|
||||
//// Clear shutdown status
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + MON_SHUTDN_CLR_OFFSET, 1, pTestBench);
|
||||
|
||||
//// Set a trip on the input
|
||||
//pTestBench->pTrip->SetShutdnH0(1);
|
||||
|
||||
//// Check no shutdown
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status)
|
||||
//{
|
||||
//VPrint("**ERROR 603: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", 0, status, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Clear the new shutdown enable
|
||||
//i2cWrite(I2C_ADDR_SHUT_EN_H0, 0, pTestBench);
|
||||
|
||||
//// Set go
|
||||
//i2cWrite(I2C_ADDR_SHUT_GO, 1, pTestBench);
|
||||
|
||||
//// Wait for > 1 ms
|
||||
//usleepSim(1100);
|
||||
|
||||
//// Set again the trip input
|
||||
//pTestBench->pTrip->SetShutdnH0(1);
|
||||
|
||||
//// Check no shutdown.
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status)
|
||||
//{
|
||||
//VPrint("**ERROR 604: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", 0, status, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Set delay to 0 once more
|
||||
//i2cWrite(I2C_ADDR_SHUT_DLY_LO, 0, pTestBench);
|
||||
//i2cWrite(I2C_ADDR_SHUT_DLY_MID, 0, pTestBench);
|
||||
//i2cWrite(I2C_ADDR_SHUT_DLY_HI, 0, pTestBench);
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
// -------------------------------------------------
|
||||
// Shutdown trip test
|
||||
// -------------------------------------------------
|
||||
|
||||
////uint32_t runTest::shutdn_trip_test (CTestAuto* pTestBench)
|
||||
//{
|
||||
//int error = 0;
|
||||
//uint32_t status;
|
||||
//uint32_t data;
|
||||
|
||||
//VPrint(" Starting shutdown trip tests\n");
|
||||
|
||||
//uint32_t monBaseSpacing = I2C_ADDR_MON_BASE_H1 - I2C_ADDR_MON_BASE_H0;
|
||||
|
||||
//// Mask all shutdown trips over I2C
|
||||
//for (int head = 0; head < 4; head++)
|
||||
//{
|
||||
//i2cWrite(I2C_ADDR_SHUT_CLR0 + head, 0xff, pTestBench);
|
||||
//}
|
||||
|
||||
//// run through each trip
|
||||
//for (int head = 0; head < NUM_HEADS; head++)
|
||||
//{
|
||||
//for (int trip = 0; trip < TRIPS_PER_HEAD; trip++)
|
||||
//{
|
||||
//// Set TB trip bit
|
||||
//switch(head)
|
||||
//{
|
||||
//case 0: pTestBench->pTrip->SetShutdnH0(1 << trip); break;
|
||||
//case 1: pTestBench->pTrip->SetShutdnH1(1 << trip); break;
|
||||
//case 2: pTestBench->pTrip->SetShutdnH2(1 << trip); break;
|
||||
//case 3: pTestBench->pTrip->SetShutdnH3(1 << trip); break;
|
||||
//default: null; break;
|
||||
//}
|
||||
|
||||
//// Check no shutdown in TB status
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status)
|
||||
//{
|
||||
//VPrint("**ERROR 300: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Check no shutdown in I2C registers for all heads
|
||||
//for (int idx = 0; idx < NUM_HEADS; idx++)
|
||||
//{
|
||||
//i2cRead(I2C_ADDR_MON_BASE_H0 + monBaseSpacing*idx + MON_SHUTDN_TRIP_OFFSET, data, pTestBench);
|
||||
|
||||
//uint32_t exp = 0;
|
||||
|
||||
//if (data != exp)
|
||||
//{
|
||||
//VPrint("**ERROR 301: bad i2c trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, data, exp);
|
||||
//error |= 1;
|
||||
//}
|
||||
//}
|
||||
|
||||
//// Enable trip bit for this head
|
||||
//i2cWrite(I2C_ADDR_SHUT_EN_H0 + head, (1 << (trip+1)) - 1, pTestBench);
|
||||
//i2cWrite(I2C_ADDR_SHUT_GO, 1, pTestBench);
|
||||
|
||||
//// Set TB trip bit
|
||||
//switch(head)
|
||||
//{
|
||||
//case 0: pTestBench->pTrip->SetShutdnH0(1 << trip); break;
|
||||
//case 1: pTestBench->pTrip->SetShutdnH1(1 << trip); break;
|
||||
//case 2: pTestBench->pTrip->SetShutdnH2(1 << trip); break;
|
||||
//case 3: pTestBench->pTrip->SetShutdnH3(1 << trip); break;
|
||||
//default: null; break;
|
||||
//}
|
||||
|
||||
//// Check shutdown in TB status is set
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status == 0)
|
||||
//{
|
||||
//VPrint("**ERROR 302: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d, trip 0x%x)\n", head, status, 1, trip);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Check shutdown statuses over I2C with only expected bit set for given head
|
||||
//for (int idx = 0; idx < NUM_HEADS; idx++)
|
||||
//{
|
||||
//// Check no shutdown in I2C registers for all heads
|
||||
//i2cRead(I2C_ADDR_MON_BASE_H0 + monBaseSpacing*idx + MON_SHUTDN_TRIP_OFFSET, data, pTestBench);
|
||||
|
||||
//uint32_t exp = (head == idx) ? (1 << trip) : 0;
|
||||
|
||||
//if (data != exp)
|
||||
//{
|
||||
//VPrint("**ERROR 303: bad i2c trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, data, exp);
|
||||
//error |= 1;
|
||||
//}
|
||||
//}
|
||||
|
||||
//// Clear shutdown over I2C
|
||||
//i2cWrite(I2C_ADDR_MON_BASE_H0 + monBaseSpacing*head + MON_SHUTDN_CLR_OFFSET, (1 << trip), pTestBench);
|
||||
|
||||
//// Check no shutdown in TB status
|
||||
//status = pTestBench->pShutdownStatus->GetShutdownStatus();
|
||||
|
||||
//if (status)
|
||||
//{
|
||||
//VPrint("**ERROR 304: bad test bench trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, status, 0);
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Check no shutdown in I2C registers for all heads
|
||||
//for (int idx = 0; idx < NUM_HEADS; idx++)
|
||||
//{
|
||||
//i2cRead(I2C_ADDR_MON_BASE_H0 + monBaseSpacing*idx + MON_SHUTDN_TRIP_OFFSET, data, pTestBench);
|
||||
|
||||
//uint32_t exp = 0;
|
||||
|
||||
//if (data != exp)
|
||||
//{
|
||||
//VPrint("**ERROR 305: bad i2c trip status for head %d. (got 0x%02d, exp 0x%02d)\n", head, data, exp);
|
||||
//error |= 1;
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
// -------------------------------------------------
|
||||
// Thermal trip test
|
||||
// -------------------------------------------------
|
||||
|
||||
//uint32_t runTest::therm_trip_test(CTestAuto* pTestBench)
|
||||
//{
|
||||
//int error = 0;
|
||||
//uint32_t data;
|
||||
|
||||
//VPrint(" Starting thermal trip tests\n");
|
||||
|
||||
//// Test the head thermal trips
|
||||
//for (int head = 0; head < NUM_HEADS; head++)
|
||||
//{
|
||||
//for (int bit = 0; bit < 3; bit++)
|
||||
//{
|
||||
//// Set therm value in TB for given head
|
||||
//switch(head)
|
||||
//{
|
||||
//case 0: pTestBench->pTrip->SetThermH0(1 << bit); break;
|
||||
//case 1: pTestBench->pTrip->SetThermH1(1 << bit); break;
|
||||
//case 2: pTestBench->pTrip->SetThermH2(1 << bit); break;
|
||||
//case 3: pTestBench->pTrip->SetThermH3(1 << bit); break;
|
||||
//default: null; break;
|
||||
//}
|
||||
|
||||
//uint32_t monBaseSpacing = I2C_ADDR_MON_BASE_H1 - I2C_ADDR_MON_BASE_H0;
|
||||
|
||||
//// Read back the value over I2C
|
||||
//i2cRead(I2C_ADDR_MON_BASE_H0 + monBaseSpacing*head + MON_THERM_TRIP_OFFSET, data, pTestBench);
|
||||
|
||||
//if (data != (1 << bit))
|
||||
//{
|
||||
//VPrint("**ERROR 100: bad head thermal trip data for head %d. (got 0x%02x, exp 0x%02x)\n", head, data, (1 << bit));
|
||||
//error |= 1;
|
||||
//}
|
||||
|
||||
//// Set therm value back to 0 in TB for given head
|
||||
//switch(head)
|
||||
//{
|
||||
//case 0: pTestBench->pTrip->SetThermH0(0); break;
|
||||
//case 1: pTestBench->pTrip->SetThermH1(0); break;
|
||||
//case 2: pTestBench->pTrip->SetThermH2(0); break;
|
||||
//case 3: pTestBench->pTrip->SetThermH3(0); break;
|
||||
//default: null; break;
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
||||
//return error;
|
||||
//}
|
||||
|
||||
// -------------------------------------------------
|
||||
// I2C test
|
||||
// -------------------------------------------------
|
||||
|
||||
uint32_t runTest::i2c_if_test(CTestAuto* pTestBench)
|
||||
{
|
||||
int error = 0;
|
||||
uint32_t data;
|
||||
|
||||
VPrint(" Starting i2c interface tests\n");
|
||||
|
||||
// Write to scratch register 0
|
||||
i2cWrite(I2C_ADDR_SCRATCH0, TEST_BYTE0, pTestBench);
|
||||
|
||||
if (pTestBench->pI2cStatus->GetAckError() != 0)
|
||||
{
|
||||
VPrint("**ERROR 000: Bad ACK status after data write\n");
|
||||
error = 1;
|
||||
}
|
||||
|
||||
// Write to scratch register 1
|
||||
i2cWrite(I2C_ADDR_SCRATCH1, TEST_BYTE1, pTestBench);
|
||||
|
||||
if (pTestBench->pI2cStatus->GetAckError() != 0)
|
||||
{
|
||||
VPrint("**ERROR 001: Bad ACK status after data write\n");
|
||||
error = 1;
|
||||
}
|
||||
|
||||
// Read scratch register 0 value back
|
||||
i2cRead(I2C_ADDR_SCRATCH0, data, pTestBench);
|
||||
|
||||
if (pTestBench->pI2cStatus->GetAckError() != 0)
|
||||
{
|
||||
VPrint("**ERROR 002: Bad ACK status after data read\n");
|
||||
error = 1;
|
||||
}
|
||||
|
||||
if (data != TEST_BYTE0)
|
||||
{
|
||||
VPrint("**ERROR 003 : bad byte read from scratch 0 register (got 0x%02x exp 0x%02x)\n", data, TEST_BYTE0);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
// Read scratch register 1 back
|
||||
i2cRead(I2C_ADDR_SCRATCH1, data, pTestBench);
|
||||
|
||||
if (pTestBench->pI2cStatus->GetAckError() != 0)
|
||||
{
|
||||
VPrint("**ERROR 003: Bad ACK status after data read\n");
|
||||
error = 1;
|
||||
}
|
||||
|
||||
if (data != TEST_BYTE1)
|
||||
{
|
||||
VPrint("**ERROR 004 : bad byte read from scratch 1 register (got 0x%02x exp 0x%02x)\n", data, TEST_BYTE1);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
|
||||
// Read IP_ID Value
|
||||
i2cRead(I2C_ADDR_IP_ID, data, pTestBench);
|
||||
|
||||
if (pTestBench->pI2cStatus->GetAckError() != 0)
|
||||
{
|
||||
VPrint("**ERROR 005: Bad ACK status after data read\n");
|
||||
error = 1;
|
||||
}
|
||||
|
||||
if (data != 0x29)
|
||||
{
|
||||
VPrint("**ERROR 006 : Bad IP ID read from register (got 0x%02x exp 0x%02x)\n", data, 0x29);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
// Read IP_VER Value
|
||||
i2cRead(I2C_ADDR_IP_VER, data, pTestBench);
|
||||
|
||||
if (pTestBench->pI2cStatus->GetAckError() != 0)
|
||||
{
|
||||
VPrint("**ERROR 007: Bad ACK status after data read\n");
|
||||
error = 1;
|
||||
}
|
||||
|
||||
if (data != 0x02)
|
||||
{
|
||||
VPrint("**ERROR 008 : Bad IP VER read from register (got 0x%02x exp 0x%02x)\n", data, 0x01);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
|
||||
// Set the debug LEDs to CPU control and set a value
|
||||
i2cWrite(I2C_ADDR_DBG_LED, (TEST_BYTE2 << 1) | 1, pTestBench);
|
||||
|
||||
// Read the TB LED status
|
||||
data = pTestBench->pDbgLedStatus->GetDbgLedStatus();
|
||||
|
||||
if (data != TEST_BYTE2)
|
||||
{
|
||||
VPrint("**ERROR 009 : bad debug LED status (got 0x%02x exp 0x%02x)\n", data, TEST_BYTE2);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// I2C write method
|
||||
// --------------------------------------------------
|
||||
|
||||
uint32_t runTest::i2cWrite (uint32_t hmb_addr, uint32_t data, CTestAuto* pTestBench)
|
||||
{
|
||||
csrWriteMem(CSR_TEST_I2C_MASTER | (SLAVE_I2C_ADDR << 2), ((hmb_addr & 0xff00) >> 8) | ((hmb_addr & 0xff) << 8) | ((data & 0xff) << 16));
|
||||
|
||||
// Wait until we've seen busy go high to indicate transaction excepted
|
||||
while (pTestBench->pI2cStatus->GetBusy() == 0)
|
||||
usleepSim(1);
|
||||
|
||||
// Wait until we've seen busy go low at the end of the transaction
|
||||
while (pTestBench->pI2cStatus->GetBusy() == 1)
|
||||
usleepSim(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
// --------------------------------------------------
|
||||
// I2C read method
|
||||
// --------------------------------------------------
|
||||
uint32_t runTest::i2cRead(uint32_t hmb_addr, uint32_t &data, CTestAuto* pTestBench)
|
||||
{
|
||||
csrWriteMem(CSR_TEST_I2C_MASTER | ((CMD_READ_OFFSET | SLAVE_I2C_ADDR) << 2), ((hmb_addr & 0xff00) >> 8) | ((hmb_addr & 0xff) << 8));
|
||||
|
||||
// Wait until we've seen busy go high to indicate transaction excepted
|
||||
while (pTestBench->pI2cStatus->GetBusy() == 0)
|
||||
usleepSim(1);
|
||||
|
||||
// Wait until we've seen busy go low at the end of the transaction
|
||||
while (pTestBench->pI2cStatus->GetBusy() == 1)
|
||||
usleepSim(1);
|
||||
|
||||
uint32_t rd_data;
|
||||
|
||||
csrReadMem(CSR_TEST_I2C_MASTER | ((CMD_READ_OFFSET | SLAVE_I2C_ADDR) << 2), &rd_data);
|
||||
|
||||
data = rd_data;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
/**************************************************************/
|
||||
/* runTest.h Date: 2018/08/9 */
|
||||
/* */
|
||||
/* Copyright (c) 2018 GIS. All rights reserved. */
|
||||
/* */
|
||||
/**************************************************************/
|
||||
|
||||
#ifndef _READTEST_H_
|
||||
#define _READTEST_H_
|
||||
|
||||
#ifdef HDL_SIM
|
||||
#include "VUserMain0.h"
|
||||
|
||||
// Memory model API has C linkage functions
|
||||
extern "C" {
|
||||
#include "mem_model.h"
|
||||
#include "VUser.h"
|
||||
}
|
||||
|
||||
#else
|
||||
#error No co-simulation support as yet
|
||||
#endif
|
||||
|
||||
#include "runTestLocal.h"
|
||||
|
||||
|
||||
class runTest
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructor
|
||||
runTest()
|
||||
{
|
||||
};
|
||||
|
||||
// Entry method for running the tests
|
||||
int start (int node);
|
||||
|
||||
private:
|
||||
|
||||
uint32_t i2c_if_test (CTestAuto* pTestBench);
|
||||
//uint32_t therm_trip_test (CTestAuto* pTestBench);
|
||||
//uint32_t therm_trip_rst_test (CTestAuto* pTestBench);
|
||||
//uint32_t therm_trip_reset_level_test(CTestAuto* pTestBench);
|
||||
//uint32_t shutdn_trip_test (CTestAuto* pTestBench);
|
||||
//uint32_t shutdn_en_dly_test (CTestAuto* pTestBench);
|
||||
//uint32_t watchdog_test (CTestAuto* pTestBench);
|
||||
//uint32_t serdes_test (CTestAuto* pTestBench);
|
||||
|
||||
uint32_t i2cWrite (uint32_t addr, uint32_t data, CTestAuto* pTestBench);
|
||||
uint32_t i2cRead(uint32_t hmb_addr, uint32_t &data, CTestAuto* pTestBench);
|
||||
|
||||
bool testLvds;
|
||||
uint32_t clkFreqMHz;
|
||||
uint32_t i2cFreqKHz;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
/**************************************************************/
|
||||
/* runTest.h Date: 2018/08/9 */
|
||||
/* */
|
||||
/* Copyright (c) 2018 GIS. All rights reserved. */
|
||||
/* */
|
||||
/**************************************************************/
|
||||
|
||||
#ifndef _READTEST_LOCAL_H_
|
||||
#define _READTEST_LOCAL_H_
|
||||
|
||||
// Include top level HAL header
|
||||
#include "hal/CTestAuto.h"
|
||||
#include "hal/hmb_fpga.h"
|
||||
|
||||
#define CMD_READ_OFFSET 0x80
|
||||
#define SLAVE_I2C_ADDR 0x39
|
||||
|
||||
#define TEST_BYTE0 0x55
|
||||
#define TEST_BYTE1 0xaa
|
||||
#define TEST_BYTE2 0x13
|
||||
|
||||
#define NUM_HEADS 4
|
||||
#define TRIPS_PER_HEAD 5
|
||||
#define TOTAL_NUM_TRIPS (NUM_HEADS * TRIPS_PER_HEAD)
|
||||
|
||||
#define I2C_ADDR_SCRATCH0 (CSR_HMB_FPGA_SCRATCH0/4)
|
||||
#define I2C_ADDR_SCRATCH1 (CSR_HMB_FPGA_SCRATCH1/4)
|
||||
#define I2C_ADDR_IP_ID (CSR_HMB_FPGA_IP_ID/4)
|
||||
#define I2C_ADDR_IP_VER (CSR_HMB_FPGA_IP_VER/4)
|
||||
#define I2C_ADDR_DBG_LED (CSR_HMB_FPGA_CPU_DBG_LED/4)
|
||||
#define I2C_ADDR_SHUT_EN_H0 (CSR_HMB_FPGA_SHUTDN_EN0/4)
|
||||
#define I2C_ADDR_SHUT_EN_H1 (CSR_HMB_FPGA_SHUTDN_EN1/4)
|
||||
#define I2C_ADDR_SHUT_EN_H2 (CSR_HMB_FPGA_SHUTDN_EN2/4)
|
||||
#define I2C_ADDR_SHUT_EN_H3 (CSR_HMB_FPGA_SHUTDN_EN3/4)
|
||||
#define I2C_ADDR_SHUT_DLY_LO (CSR_HMB_FPGA_SHUTDN_DLY_LO/4)
|
||||
#define I2C_ADDR_SHUT_DLY_MID (CSR_HMB_FPGA_SHUTDN_DLY_MID/4)
|
||||
#define I2C_ADDR_SHUT_DLY_HI (CSR_HMB_FPGA_SHUTDN_DLY_HI/4)
|
||||
#define I2C_ADDR_SHUT_GO (CSR_HMB_FPGA_SHUTDN_GO/4)
|
||||
#define I2C_ADDR_WD_CTRL (CSR_HMB_FPGA_WD_CTRL/4)
|
||||
#define I2C_ADDR_WD_STATUS (CSR_HMB_FPGA_WD_STATUS/4)
|
||||
#define I2C_ADDR_SHUT_CLR0 (CSR_HMB_FPGA_SHUTDN_CLR0/4)
|
||||
#define I2C_ADDR_SHUT_CLR1 (CSR_HMB_FPGA_SHUTDN_CLR1/4)
|
||||
#define I2C_ADDR_SHUT_CLR2 (CSR_HMB_FPGA_SHUTDN_CLR2/4)
|
||||
#define I2C_ADDR_SHUT_CLR3 (CSR_HMB_FPGA_SHUTDN_CLR3/4)
|
||||
|
||||
#define WD_CLR CSR_HMB_FPGA_WD_CTRL_CLR_MASK
|
||||
#define WD_EN CSR_HMB_FPGA_WD_CTRL_EN_MASK
|
||||
|
||||
#define WD_PERIOD_LO_BIT CSR_HMB_FPGA_WD_CTRL_PERIOD
|
||||
#define WD_PERIOD_MASK CSR_HMB_FPGA_WD_CTRL_PERIOD_MASK;
|
||||
|
||||
#define I2C_ADDR_MON_BASE_H0 (CSR_HMB_FPGA_MONITOR_0/4)
|
||||
#define I2C_ADDR_MON_BASE_H1 (CSR_HMB_FPGA_MONITOR_1/4)
|
||||
#define I2C_ADDR_MON_BASE_H2 (CSR_HMB_FPGA_MONITOR_2/4)
|
||||
#define I2C_ADDR_MON_BASE_H3 (CSR_HMB_FPGA_MONITOR_3/4)
|
||||
|
||||
#define MON_THERM_EN_OFFSET 0x0000
|
||||
#define MON_THERM_TRIP_OFFSET 0x0001
|
||||
#define MON_SHUTDN_CLR_OFFSET 0x0002
|
||||
#define MON_SHUTDN_TRIP_OFFSET 0x0003
|
||||
#define MON_THERM_TRIP_RESET_LEVEL_OFFSET 0X0004
|
||||
|
||||
#define WD_DEFAULT_PERIOD (0xF << WD_PERIOD_LO_BIT)
|
||||
|
||||
#endif
|
||||
|
|
@ -1 +0,0 @@
|
|||
mklink /j generic_ip d:\git\EL-GENERIC-IP\generic_ip
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTDDIO_IN"
|
||||
set_global_assignment -name IP_TOOL_VERSION "19.1"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone 10 LP}"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "ddio_in.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "ddio_in.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "ddio_in.ppf"]
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
-- megafunction wizard: %ALTDDIO_IN%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: ALTDDIO_IN
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: ddio_in.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- ALTDDIO_IN
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 19.1.0 Build 670 09/22/2019 SJ Lite Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 2019 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 ddio_in IS
|
||||
PORT
|
||||
(
|
||||
aclr : IN STD_LOGIC ;
|
||||
datain : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
inclock : IN STD_LOGIC ;
|
||||
dataout_h : OUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataout_l : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END ddio_in;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF ddio_in IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
SIGNAL sub_wire1 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
BEGIN
|
||||
dataout_h <= sub_wire0(0 DOWNTO 0);
|
||||
dataout_l <= sub_wire1(0 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 => 1
|
||||
)
|
||||
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 "1"
|
||||
-- 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 1 0 INPUT NODEFVAL "datain[0..0]"
|
||||
-- Retrieval info: CONNECT: @datain 0 0 1 0 datain 0 0 1 0
|
||||
-- Retrieval info: USED_PORT: dataout_h 0 0 1 0 OUTPUT NODEFVAL "dataout_h[0..0]"
|
||||
-- Retrieval info: CONNECT: dataout_h 0 0 1 0 @dataout_h 0 0 1 0
|
||||
-- Retrieval info: USED_PORT: dataout_l 0 0 1 0 OUTPUT NODEFVAL "dataout_l[0..0]"
|
||||
-- Retrieval info: CONNECT: dataout_l 0 0 1 0 @dataout_l 0 0 1 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 ddio_in.vhd TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_in.qip TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_in.bsf FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_in_inst.vhd FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_in.inc FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_in.cmp TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_in.ppf TRUE FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTDDIO_OUT"
|
||||
set_global_assignment -name IP_TOOL_VERSION "19.1"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone 10 LP}"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "ddio_out.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "ddio_out.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "ddio_out.ppf"]
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
-- megafunction wizard: %ALTDDIO_OUT%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: ALTDDIO_OUT
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: ddio_out.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- ALTDDIO_OUT
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 19.1.0 Build 670 09/22/2019 SJ Lite Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 2019 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 ddio_out IS
|
||||
PORT
|
||||
(
|
||||
aclr : IN STD_LOGIC ;
|
||||
datain_h : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
datain_l : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
outclock : IN STD_LOGIC ;
|
||||
dataout : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END ddio_out;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF ddio_out IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
BEGIN
|
||||
dataout <= sub_wire0(0 DOWNTO 0);
|
||||
|
||||
ALTDDIO_OUT_component : ALTDDIO_OUT
|
||||
GENERIC MAP (
|
||||
extend_oe_disable => "OFF",
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
invert_output => "OFF",
|
||||
lpm_hint => "UNUSED",
|
||||
lpm_type => "altddio_out",
|
||||
oe_reg => "UNREGISTERED",
|
||||
power_up_high => "OFF",
|
||||
width => 1
|
||||
)
|
||||
PORT MAP (
|
||||
aclr => aclr,
|
||||
datain_h => datain_h,
|
||||
datain_l => datain_l,
|
||||
outclock => outclock,
|
||||
dataout => sub_wire0
|
||||
);
|
||||
|
||||
|
||||
|
||||
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: EXTEND_OE_DISABLE STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: INVERT_OUTPUT STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: LPM_HINT STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altddio_out"
|
||||
-- Retrieval info: CONSTANT: OE_REG STRING "UNREGISTERED"
|
||||
-- Retrieval info: CONSTANT: POWER_UP_HIGH STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: WIDTH NUMERIC "1"
|
||||
-- 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_h 0 0 1 0 INPUT NODEFVAL "datain_h[0..0]"
|
||||
-- Retrieval info: CONNECT: @datain_h 0 0 1 0 datain_h 0 0 1 0
|
||||
-- Retrieval info: USED_PORT: datain_l 0 0 1 0 INPUT NODEFVAL "datain_l[0..0]"
|
||||
-- Retrieval info: CONNECT: @datain_l 0 0 1 0 datain_l 0 0 1 0
|
||||
-- Retrieval info: USED_PORT: dataout 0 0 1 0 OUTPUT NODEFVAL "dataout[0..0]"
|
||||
-- Retrieval info: CONNECT: dataout 0 0 1 0 @dataout 0 0 1 0
|
||||
-- Retrieval info: USED_PORT: outclock 0 0 0 0 INPUT_CLK_EXT NODEFVAL "outclock"
|
||||
-- Retrieval info: CONNECT: @outclock 0 0 0 0 outclock 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out.vhd TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out.qip TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out.bsf FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out_inst.vhd FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out.inc FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out.cmp TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL ddio_out.ppf TRUE FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
--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 fifo_v20
|
||||
PORT
|
||||
(
|
||||
clock : IN STD_LOGIC ;
|
||||
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdreq : IN STD_LOGIC ;
|
||||
sclr : IN STD_LOGIC ;
|
||||
wrreq : IN STD_LOGIC ;
|
||||
almost_empty : OUT STD_LOGIC ;
|
||||
almost_full : OUT STD_LOGIC ;
|
||||
empty : OUT STD_LOGIC ;
|
||||
full : OUT STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
usedw : OUT STD_LOGIC_VECTOR (8 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "FIFO"
|
||||
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) "fifo_v20.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "fifo_v20.cmp"]
|
||||
|
|
@ -1,218 +0,0 @@
|
|||
-- megafunction wizard: %FIFO%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: scfifo
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: fifo_v20.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- scfifo
|
||||
--
|
||||
-- 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.all;
|
||||
|
||||
ENTITY fifo_v20 IS
|
||||
PORT
|
||||
(
|
||||
clock : IN STD_LOGIC ;
|
||||
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdreq : IN STD_LOGIC ;
|
||||
sclr : IN STD_LOGIC ;
|
||||
wrreq : IN STD_LOGIC ;
|
||||
almost_empty : OUT STD_LOGIC ;
|
||||
almost_full : OUT STD_LOGIC ;
|
||||
empty : OUT STD_LOGIC ;
|
||||
full : OUT STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
usedw : OUT STD_LOGIC_VECTOR (8 DOWNTO 0)
|
||||
);
|
||||
END fifo_v20;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF fifo_v20 IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC ;
|
||||
SIGNAL sub_wire1 : STD_LOGIC ;
|
||||
SIGNAL sub_wire2 : STD_LOGIC ;
|
||||
SIGNAL sub_wire3 : STD_LOGIC ;
|
||||
SIGNAL sub_wire4 : STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
SIGNAL sub_wire5 : STD_LOGIC_VECTOR (8 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT scfifo
|
||||
GENERIC (
|
||||
add_ram_output_register : STRING;
|
||||
almost_empty_value : NATURAL;
|
||||
almost_full_value : NATURAL;
|
||||
intended_device_family : STRING;
|
||||
lpm_numwords : NATURAL;
|
||||
lpm_showahead : STRING;
|
||||
lpm_type : STRING;
|
||||
lpm_width : NATURAL;
|
||||
lpm_widthu : NATURAL;
|
||||
overflow_checking : STRING;
|
||||
underflow_checking : STRING;
|
||||
use_eab : STRING
|
||||
);
|
||||
PORT (
|
||||
clock : IN STD_LOGIC ;
|
||||
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdreq : IN STD_LOGIC ;
|
||||
sclr : IN STD_LOGIC ;
|
||||
wrreq : IN STD_LOGIC ;
|
||||
almost_empty : OUT STD_LOGIC ;
|
||||
almost_full : OUT STD_LOGIC ;
|
||||
empty : OUT STD_LOGIC ;
|
||||
full : OUT STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
usedw : OUT STD_LOGIC_VECTOR (8 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
almost_empty <= sub_wire0;
|
||||
almost_full <= sub_wire1;
|
||||
empty <= sub_wire2;
|
||||
full <= sub_wire3;
|
||||
q <= sub_wire4(7 DOWNTO 0);
|
||||
usedw <= sub_wire5(8 DOWNTO 0);
|
||||
|
||||
scfifo_component : scfifo
|
||||
GENERIC MAP (
|
||||
add_ram_output_register => "OFF",
|
||||
almost_empty_value => 2,
|
||||
almost_full_value => 509,
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
lpm_numwords => 512,
|
||||
lpm_showahead => "OFF",
|
||||
lpm_type => "scfifo",
|
||||
lpm_width => 8,
|
||||
lpm_widthu => 9,
|
||||
overflow_checking => "ON",
|
||||
underflow_checking => "ON",
|
||||
use_eab => "ON"
|
||||
)
|
||||
PORT MAP (
|
||||
clock => clock,
|
||||
data => data,
|
||||
rdreq => rdreq,
|
||||
sclr => sclr,
|
||||
wrreq => wrreq,
|
||||
almost_empty => sub_wire0,
|
||||
almost_full => sub_wire1,
|
||||
empty => sub_wire2,
|
||||
full => sub_wire3,
|
||||
q => sub_wire4,
|
||||
usedw => sub_wire5
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: AlmostEmpty NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "2"
|
||||
-- Retrieval info: PRIVATE: AlmostFull NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: AlmostFullThr NUMERIC "509"
|
||||
-- Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: Clock NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Depth NUMERIC "512"
|
||||
-- Retrieval info: PRIVATE: Empty NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: Full NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: LegacyRREQ NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Optimize NUMERIC "2"
|
||||
-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: UsedW NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: Width NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: dc_aclr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: diff_widths NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: msb_usedw NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: output_width NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: rsFull NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: sc_sclr NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: wsEmpty NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: wsFull NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: ALMOST_EMPTY_VALUE NUMERIC "2"
|
||||
-- Retrieval info: CONSTANT: ALMOST_FULL_VALUE NUMERIC "509"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "512"
|
||||
-- Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "scfifo"
|
||||
-- Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "9"
|
||||
-- Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "ON"
|
||||
-- Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "ON"
|
||||
-- Retrieval info: CONSTANT: USE_EAB STRING "ON"
|
||||
-- Retrieval info: USED_PORT: almost_empty 0 0 0 0 OUTPUT NODEFVAL "almost_empty"
|
||||
-- Retrieval info: USED_PORT: almost_full 0 0 0 0 OUTPUT NODEFVAL "almost_full"
|
||||
-- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL "clock"
|
||||
-- Retrieval info: USED_PORT: data 0 0 8 0 INPUT NODEFVAL "data[7..0]"
|
||||
-- Retrieval info: USED_PORT: empty 0 0 0 0 OUTPUT NODEFVAL "empty"
|
||||
-- Retrieval info: USED_PORT: full 0 0 0 0 OUTPUT NODEFVAL "full"
|
||||
-- Retrieval info: USED_PORT: q 0 0 8 0 OUTPUT NODEFVAL "q[7..0]"
|
||||
-- Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL "rdreq"
|
||||
-- Retrieval info: USED_PORT: sclr 0 0 0 0 INPUT NODEFVAL "sclr"
|
||||
-- Retrieval info: USED_PORT: usedw 0 0 9 0 OUTPUT NODEFVAL "usedw[8..0]"
|
||||
-- Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL "wrreq"
|
||||
-- Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @data 0 0 8 0 data 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @sclr 0 0 0 0 sclr 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
|
||||
-- Retrieval info: CONNECT: almost_empty 0 0 0 0 @almost_empty 0 0 0 0
|
||||
-- Retrieval info: CONNECT: almost_full 0 0 0 0 @almost_full 0 0 0 0
|
||||
-- Retrieval info: CONNECT: empty 0 0 0 0 @empty 0 0 0 0
|
||||
-- Retrieval info: CONNECT: full 0 0 0 0 @full 0 0 0 0
|
||||
-- Retrieval info: CONNECT: q 0 0 8 0 @q 0 0 8 0
|
||||
-- Retrieval info: CONNECT: usedw 0 0 9 0 @usedw 0 0 9 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL fifo_v20.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL fifo_v20.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL fifo_v20.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL fifo_v20.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL fifo_v20_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
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))
|
||||
)
|
||||
)
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
--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;
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
--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]
|
||||
);
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
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"]
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
-- 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
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
--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 io_buf_i2c
|
||||
PORT
|
||||
(
|
||||
datain : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
oe : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataio : INOUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataout : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTIOBUF"
|
||||
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) "io_buf_i2c.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "io_buf_i2c.cmp"]
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
-- megafunction wizard: %ALTIOBUF%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altiobuf_bidir
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: io_buf_i2c.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altiobuf_bidir
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
--
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- 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.
|
||||
|
||||
|
||||
--altiobuf_bidir CBX_AUTO_BLACKBOX="ALL" DEVICE_FAMILY="Cyclone 10 LP" ENABLE_BUS_HOLD="FALSE" NUMBER_OF_CHANNELS=1 OPEN_DRAIN_OUTPUT="TRUE" USE_DIFFERENTIAL_MODE="FALSE" USE_DYNAMIC_TERMINATION_CONTROL="FALSE" USE_TERMINATION_CONTROL="FALSE" datain dataio dataout oe
|
||||
--VERSION_BEGIN 20.1 cbx_altiobuf_bidir 2020:11:11:17:06:45:SJ cbx_mgl 2020:11:11:17:08:38:SJ cbx_stratixiii 2020:11:11:17:06:46:SJ cbx_stratixv 2020:11:11:17:06:46:SJ VERSION_END
|
||||
|
||||
LIBRARY cyclone10lp;
|
||||
USE cyclone10lp.all;
|
||||
|
||||
--synthesis_resources = cyclone10lp_io_ibuf 1 cyclone10lp_io_obuf 1
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
ENTITY io_buf_i2c_iobuf_bidir_hto IS
|
||||
PORT
|
||||
(
|
||||
datain : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataio : INOUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataout : OUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
oe : IN STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END io_buf_i2c_iobuf_bidir_hto;
|
||||
|
||||
ARCHITECTURE RTL OF io_buf_i2c_iobuf_bidir_hto IS
|
||||
|
||||
SIGNAL wire_ibufa_o : STD_LOGIC;
|
||||
SIGNAL wire_obufa_o : STD_LOGIC;
|
||||
COMPONENT cyclone10lp_io_ibuf
|
||||
GENERIC
|
||||
(
|
||||
bus_hold : STRING := "false";
|
||||
differential_mode : STRING := "false";
|
||||
simulate_z_as : STRING := "Z";
|
||||
lpm_type : STRING := "cyclone10lp_io_ibuf"
|
||||
);
|
||||
PORT
|
||||
(
|
||||
i : IN STD_LOGIC := '0';
|
||||
ibar : IN STD_LOGIC := '0';
|
||||
o : OUT STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
COMPONENT cyclone10lp_io_obuf
|
||||
GENERIC
|
||||
(
|
||||
bus_hold : STRING := "false";
|
||||
open_drain_output : STRING := "false";
|
||||
lpm_type : STRING := "cyclone10lp_io_obuf"
|
||||
);
|
||||
PORT
|
||||
(
|
||||
i : IN STD_LOGIC := '0';
|
||||
o : OUT STD_LOGIC;
|
||||
obar : OUT STD_LOGIC;
|
||||
oe : IN STD_LOGIC := '1';
|
||||
seriesterminationcontrol : IN STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS => '0')
|
||||
);
|
||||
END COMPONENT;
|
||||
BEGIN
|
||||
|
||||
dataio(0) <= wire_obufa_o;
|
||||
dataout(0) <= wire_ibufa_o;
|
||||
ibufa : cyclone10lp_io_ibuf
|
||||
GENERIC MAP (
|
||||
bus_hold => "false",
|
||||
differential_mode => "false"
|
||||
)
|
||||
PORT MAP (
|
||||
i => dataio(0),
|
||||
o => wire_ibufa_o
|
||||
);
|
||||
obufa : cyclone10lp_io_obuf
|
||||
GENERIC MAP (
|
||||
bus_hold => "false",
|
||||
open_drain_output => "true"
|
||||
)
|
||||
PORT MAP (
|
||||
i => datain(0),
|
||||
o => wire_obufa_o,
|
||||
oe => oe(0)
|
||||
);
|
||||
|
||||
END RTL; --io_buf_i2c_iobuf_bidir_hto
|
||||
--VALID FILE
|
||||
|
||||
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
|
||||
ENTITY io_buf_i2c IS
|
||||
PORT
|
||||
(
|
||||
datain : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
oe : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataio : INOUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataout : OUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END io_buf_i2c;
|
||||
|
||||
|
||||
ARCHITECTURE RTL OF io_buf_i2c IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
|
||||
|
||||
|
||||
COMPONENT io_buf_i2c_iobuf_bidir_hto
|
||||
PORT (
|
||||
datain : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
oe : IN STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataout : OUT STD_LOGIC_VECTOR (0 DOWNTO 0);
|
||||
dataio : INOUT STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
dataout <= sub_wire0(0 DOWNTO 0);
|
||||
|
||||
io_buf_i2c_iobuf_bidir_hto_component : io_buf_i2c_iobuf_bidir_hto
|
||||
PORT MAP (
|
||||
datain => datain,
|
||||
oe => oe,
|
||||
dataout => sub_wire0,
|
||||
dataio => dataio
|
||||
);
|
||||
|
||||
|
||||
|
||||
END RTL;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: enable_bus_hold STRING "FALSE"
|
||||
-- Retrieval info: CONSTANT: number_of_channels NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: open_drain_output STRING "TRUE"
|
||||
-- Retrieval info: CONSTANT: use_differential_mode STRING "FALSE"
|
||||
-- Retrieval info: CONSTANT: use_dynamic_termination_control STRING "FALSE"
|
||||
-- Retrieval info: CONSTANT: use_termination_control STRING "FALSE"
|
||||
-- Retrieval info: USED_PORT: datain 0 0 1 0 INPUT NODEFVAL "datain[0..0]"
|
||||
-- Retrieval info: USED_PORT: dataio 0 0 1 0 BIDIR NODEFVAL "dataio[0..0]"
|
||||
-- Retrieval info: USED_PORT: dataout 0 0 1 0 OUTPUT NODEFVAL "dataout[0..0]"
|
||||
-- Retrieval info: USED_PORT: oe 0 0 1 0 INPUT NODEFVAL "oe[0..0]"
|
||||
-- Retrieval info: CONNECT: @datain 0 0 1 0 datain 0 0 1 0
|
||||
-- Retrieval info: CONNECT: @oe 0 0 1 0 oe 0 0 1 0
|
||||
-- Retrieval info: CONNECT: dataio 0 0 1 0 @dataio 0 0 1 0
|
||||
-- Retrieval info: CONNECT: dataout 0 0 1 0 @dataout 0 0 1 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL io_buf_i2c.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL io_buf_i2c.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL io_buf_i2c.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL io_buf_i2c.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL io_buf_i2c_inst.vhd FALSE
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
|
||||
<cof>
|
||||
<eprom_name>MT25QU128</eprom_name>
|
||||
<flash_loader_device>10CL010Y</flash_loader_device>
|
||||
<output_filename>output_files/pei_sg1024_new.jic</output_filename>
|
||||
<n_pages>1</n_pages>
|
||||
<width>1</width>
|
||||
<mode>7</mode>
|
||||
<sof_data>
|
||||
<user_name>Page_0</user_name>
|
||||
<page_flags>1</page_flags>
|
||||
<bit0>
|
||||
<sof_filename>D:/git/hmb-fd-sg1024/firmware/pei_fpga_top/build/output_files/pei_fpga_top.sof</sof_filename>
|
||||
</bit0>
|
||||
</sof_data>
|
||||
<version>10</version>
|
||||
<create_cvp_file>0</create_cvp_file>
|
||||
<create_hps_iocsr>0</create_hps_iocsr>
|
||||
<auto_create_rpd>0</auto_create_rpd>
|
||||
<rpd_little_endian>1</rpd_little_endian>
|
||||
<options>
|
||||
<map_file>1</map_file>
|
||||
</options>
|
||||
<advanced_options>
|
||||
<ignore_epcs_id_check>1</ignore_epcs_id_check>
|
||||
<ignore_condone_check>2</ignore_condone_check>
|
||||
<plc_adjustment>0</plc_adjustment>
|
||||
<post_chain_bitstream_pad_bytes>-1</post_chain_bitstream_pad_bytes>
|
||||
<post_device_bitstream_pad_bytes>-1</post_device_bitstream_pad_bytes>
|
||||
<bitslice_pre_padding>1</bitslice_pre_padding>
|
||||
</advanced_options>
|
||||
</cof>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "FIFO"
|
||||
set_global_assignment -name IP_TOOL_VERSION "19.1"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone 10 LP}"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "pei_din_fifo.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pei_din_fifo.cmp"]
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
-- megafunction wizard: %FIFO%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: dcfifo
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: pei_din_fifo.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- dcfifo
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 19.1.0 Build 670 09/22/2019 SJ Lite Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 2019 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.all;
|
||||
|
||||
ENTITY pei_din_fifo IS
|
||||
PORT
|
||||
(
|
||||
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdclk : IN STD_LOGIC ;
|
||||
rdreq : IN STD_LOGIC ;
|
||||
wrclk : IN STD_LOGIC ;
|
||||
wrreq : IN STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdempty : OUT STD_LOGIC ;
|
||||
wrfull : OUT STD_LOGIC
|
||||
);
|
||||
END pei_din_fifo;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pei_din_fifo IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
SIGNAL sub_wire1 : STD_LOGIC ;
|
||||
SIGNAL sub_wire2 : STD_LOGIC ;
|
||||
|
||||
|
||||
|
||||
COMPONENT dcfifo
|
||||
GENERIC (
|
||||
intended_device_family : STRING;
|
||||
lpm_numwords : NATURAL;
|
||||
lpm_showahead : STRING;
|
||||
lpm_type : STRING;
|
||||
lpm_width : NATURAL;
|
||||
lpm_widthu : NATURAL;
|
||||
overflow_checking : STRING;
|
||||
rdsync_delaypipe : NATURAL;
|
||||
underflow_checking : STRING;
|
||||
use_eab : STRING;
|
||||
wrsync_delaypipe : NATURAL
|
||||
);
|
||||
PORT (
|
||||
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdclk : IN STD_LOGIC ;
|
||||
rdreq : IN STD_LOGIC ;
|
||||
wrclk : IN STD_LOGIC ;
|
||||
wrreq : IN STD_LOGIC ;
|
||||
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rdempty : OUT STD_LOGIC ;
|
||||
wrfull : OUT STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
q <= sub_wire0(7 DOWNTO 0);
|
||||
rdempty <= sub_wire1;
|
||||
wrfull <= sub_wire2;
|
||||
|
||||
dcfifo_component : dcfifo
|
||||
GENERIC MAP (
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
lpm_numwords => 256,
|
||||
lpm_showahead => "ON",
|
||||
lpm_type => "dcfifo",
|
||||
lpm_width => 8,
|
||||
lpm_widthu => 8,
|
||||
overflow_checking => "ON",
|
||||
rdsync_delaypipe => 4,
|
||||
underflow_checking => "ON",
|
||||
use_eab => "ON",
|
||||
wrsync_delaypipe => 4
|
||||
)
|
||||
PORT MAP (
|
||||
data => data,
|
||||
rdclk => rdclk,
|
||||
rdreq => rdreq,
|
||||
wrclk => wrclk,
|
||||
wrreq => wrreq,
|
||||
q => sub_wire0,
|
||||
rdempty => sub_wire1,
|
||||
wrfull => sub_wire2
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
|
||||
-- Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
|
||||
-- Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clock NUMERIC "4"
|
||||
-- Retrieval info: PRIVATE: Depth NUMERIC "256"
|
||||
-- Retrieval info: PRIVATE: Empty NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: Full NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Optimize NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: UsedW NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: Width NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: dc_aclr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: diff_widths NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: msb_usedw NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: output_width NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: rsFull NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: rsUsedW NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: wsFull NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: wsUsedW NUMERIC "0"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "256"
|
||||
-- Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
|
||||
-- Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "ON"
|
||||
-- Retrieval info: CONSTANT: RDSYNC_DELAYPIPE NUMERIC "4"
|
||||
-- Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "ON"
|
||||
-- Retrieval info: CONSTANT: USE_EAB STRING "ON"
|
||||
-- Retrieval info: CONSTANT: WRSYNC_DELAYPIPE NUMERIC "4"
|
||||
-- Retrieval info: USED_PORT: data 0 0 8 0 INPUT NODEFVAL "data[7..0]"
|
||||
-- Retrieval info: USED_PORT: q 0 0 8 0 OUTPUT NODEFVAL "q[7..0]"
|
||||
-- Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL "rdclk"
|
||||
-- Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL "rdempty"
|
||||
-- Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL "rdreq"
|
||||
-- Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL "wrclk"
|
||||
-- Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL "wrfull"
|
||||
-- Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL "wrreq"
|
||||
-- Retrieval info: CONNECT: @data 0 0 8 0 data 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
|
||||
-- Retrieval info: CONNECT: q 0 0 8 0 @q 0 0 8 0
|
||||
-- Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
|
||||
-- Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_din_fifo.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_din_fifo.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_din_fifo.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_din_fifo.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_din_fifo_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
IP Upgrade report for pei_fpga_top
|
||||
Thu Apr 27 16:15:54 2023
|
||||
Quartus Prime Version 20.1.1 Build 720 11/11/2020 SJ Lite Edition
|
||||
|
||||
|
||||
---------------------
|
||||
; Table of Contents ;
|
||||
---------------------
|
||||
1. Legal Notice
|
||||
2. IP Upgrade Summary
|
||||
3. IP Upgrade Messages
|
||||
|
||||
|
||||
|
||||
----------------
|
||||
; Legal Notice ;
|
||||
----------------
|
||||
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.
|
||||
|
||||
|
||||
|
||||
+----------------------------------------------------------------------------+
|
||||
; IP Upgrade Summary ;
|
||||
+------------------------------+---------------------------------------------+
|
||||
; IP Components Upgrade Status ; Failed - Thu Apr 27 16:15:54 2023 ;
|
||||
; Quartus Prime Version ; 20.1.1 Build 720 11/11/2020 SJ Lite Edition ;
|
||||
; Revision Name ; pei_fpga_top ;
|
||||
; Top-level Entity Name ; pei_fpga_top ;
|
||||
; Family ; Cyclone 10 LP ;
|
||||
+------------------------------+---------------------------------------------+
|
||||
|
||||
|
||||
+---------------------+
|
||||
; IP Upgrade Messages ;
|
||||
+---------------------+
|
||||
Info (23030): Evaluation of Tcl script c:/intelfpga_lite/20.1/quartus/common/tcl/internal/ip_regen/ip_regen.tcl was successful
|
||||
Info: Quartus Prime Shell was successful. 0 errors, 0 warnings
|
||||
Info: Peak virtual memory: 4886 megabytes
|
||||
Info: Processing ended: Thu Apr 27 16:15:54 2023
|
||||
Info: Elapsed time: 00:00:10
|
||||
Info: Total CPU time (on all processors): 00:00:20
|
||||
|
||||
|
||||
|
|
@ -1,134 +0,0 @@
|
|||
## Generated SDC file "pei_fpga_top.out.sdc"
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
## VENDOR "Altera"
|
||||
## PROGRAM "Quartus Prime"
|
||||
## VERSION "Version 20.1.1 Build 720 11/11/2020 SJ Lite Edition"
|
||||
|
||||
## DATE "Tue Sep 10 16:20:15 2024"
|
||||
|
||||
##
|
||||
## DEVICE "10CL010YU256C8G"
|
||||
##
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Time Information
|
||||
#**************************************************************
|
||||
|
||||
set_time_format -unit ns -decimal_places 3
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Create Clock
|
||||
#**************************************************************
|
||||
|
||||
create_clock -name {clk25_in} -period 40.000 -waveform { 0.000 20.000 } [get_ports {clk25_in}]
|
||||
create_clock -name {c_clk[0]} -period 62.500 -waveform { 0.000 31.250 } [get_ports { c_clk[0] }]
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Create Generated Clock
|
||||
#**************************************************************
|
||||
|
||||
create_generated_clock -name {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]} -source [get_pins {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|inclk[0]}] -duty_cycle 50/1 -multiply_by 4 -master_clock {clk25_in} [get_pins {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}]
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Clock Latency
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Clock Uncertainty
|
||||
#**************************************************************
|
||||
|
||||
set_clock_uncertainty -rise_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -rise_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] 0.020
|
||||
set_clock_uncertainty -rise_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -fall_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] 0.020
|
||||
set_clock_uncertainty -rise_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -rise_to [get_clocks {c_clk[0]}] -setup 0.110
|
||||
set_clock_uncertainty -rise_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -rise_to [get_clocks {c_clk[0]}] -hold 0.080
|
||||
set_clock_uncertainty -rise_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -fall_to [get_clocks {c_clk[0]}] -setup 0.110
|
||||
set_clock_uncertainty -rise_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -fall_to [get_clocks {c_clk[0]}] -hold 0.080
|
||||
set_clock_uncertainty -fall_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -rise_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] 0.020
|
||||
set_clock_uncertainty -fall_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -fall_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] 0.020
|
||||
set_clock_uncertainty -fall_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -rise_to [get_clocks {c_clk[0]}] -setup 0.110
|
||||
set_clock_uncertainty -fall_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -rise_to [get_clocks {c_clk[0]}] -hold 0.080
|
||||
set_clock_uncertainty -fall_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -fall_to [get_clocks {c_clk[0]}] -setup 0.110
|
||||
set_clock_uncertainty -fall_from [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -fall_to [get_clocks {c_clk[0]}] -hold 0.080
|
||||
set_clock_uncertainty -rise_from [get_clocks {c_clk[0]}] -rise_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -setup 0.080
|
||||
set_clock_uncertainty -rise_from [get_clocks {c_clk[0]}] -rise_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -hold 0.110
|
||||
set_clock_uncertainty -rise_from [get_clocks {c_clk[0]}] -fall_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -setup 0.080
|
||||
set_clock_uncertainty -rise_from [get_clocks {c_clk[0]}] -fall_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -hold 0.110
|
||||
set_clock_uncertainty -rise_from [get_clocks {c_clk[0]}] -rise_to [get_clocks {c_clk[0]}] 0.020
|
||||
set_clock_uncertainty -rise_from [get_clocks {c_clk[0]}] -fall_to [get_clocks {c_clk[0]}] 0.020
|
||||
set_clock_uncertainty -fall_from [get_clocks {c_clk[0]}] -rise_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -setup 0.080
|
||||
set_clock_uncertainty -fall_from [get_clocks {c_clk[0]}] -rise_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -hold 0.110
|
||||
set_clock_uncertainty -fall_from [get_clocks {c_clk[0]}] -fall_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -setup 0.080
|
||||
set_clock_uncertainty -fall_from [get_clocks {c_clk[0]}] -fall_to [get_clocks {\GEN_PLL:pll_25in_100out_inst|altpll_component|auto_generated|pll1|clk[0]}] -hold 0.110
|
||||
set_clock_uncertainty -fall_from [get_clocks {c_clk[0]}] -rise_to [get_clocks {c_clk[0]}] 0.020
|
||||
set_clock_uncertainty -fall_from [get_clocks {c_clk[0]}] -fall_to [get_clocks {c_clk[0]}] 0.020
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Input Delay
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Output Delay
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Clock Groups
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set False Path
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Multicycle Path
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Maximum Delay
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Minimum Delay
|
||||
#**************************************************************
|
||||
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Input Transition
|
||||
#**************************************************************
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Copyright (C) 2019 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.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Quartus Prime
|
||||
# Version 19.1.0 Build 670 09/22/2019 SJ Lite Edition
|
||||
# Date created = 16:16:35 April 19, 2022
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
QUARTUS_VERSION = "19.1"
|
||||
DATE = "16:16:35 April 19, 2022"
|
||||
|
||||
# Revisions
|
||||
|
||||
PROJECT_REVISION = "pei_fpga_top"
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Copyright (C) 2019 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.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Quartus Prime
|
||||
# Version 19.1.0 Build 670 09/22/2019 SJ Lite Edition
|
||||
# Date created = 16:16:35 April 19, 2022
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# 1) The default values for assignments are stored in the file:
|
||||
# pei_fpga_top_assignment_defaults.qdf
|
||||
# If this file doesn't exist, see file:
|
||||
# assignment_defaults.qdf
|
||||
#
|
||||
# 2) Altera recommends that you do not modify this file. This
|
||||
# file is updated automatically by the Quartus Prime software
|
||||
# and any changes you make may be lost or overwritten.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
|
||||
set_global_assignment -name FAMILY "Cyclone 10 LP"
|
||||
set_global_assignment -name DEVICE 10CL010YU256C8G
|
||||
set_global_assignment -name TOP_LEVEL_ENTITY pei_fpga_top
|
||||
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 19.1.0
|
||||
set_global_assignment -name PROJECT_CREATION_TIME_DATE "16:16:35 APRIL 19, 2022"
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "20.1.1 Lite Edition"
|
||||
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
|
||||
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
|
||||
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
|
||||
set_global_assignment -name DEVICE_FILTER_PACKAGE UFBGA
|
||||
set_global_assignment -name DEVICE_FILTER_PIN_COUNT 256
|
||||
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE 8
|
||||
set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 1
|
||||
set_global_assignment -name NOMINAL_CORE_SUPPLY_VOLTAGE 1.2V
|
||||
set_global_assignment -name EDA_SIMULATION_TOOL "ModelSim-Altera (VHDL)"
|
||||
set_global_assignment -name EDA_TIME_SCALE "1 ps" -section_id eda_simulation
|
||||
set_global_assignment -name EDA_OUTPUT_DATA_FORMAT VHDL -section_id eda_simulation
|
||||
set_global_assignment -name EDA_GENERATE_FUNCTIONAL_NETLIST OFF -section_id eda_board_design_timing
|
||||
set_global_assignment -name EDA_GENERATE_FUNCTIONAL_NETLIST OFF -section_id eda_board_design_symbol
|
||||
set_global_assignment -name EDA_GENERATE_FUNCTIONAL_NETLIST OFF -section_id eda_board_design_signal_integrity
|
||||
set_global_assignment -name EDA_GENERATE_FUNCTIONAL_NETLIST OFF -section_id eda_board_design_boundary_scan
|
||||
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
|
||||
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
|
||||
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
|
||||
set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
|
||||
set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
|
||||
|
||||
set_instance_assignment -name IO_STANDARD LVDS -to lvds_clk_in
|
||||
set_location_assignment PIN_M2 -to lvds_clk_in
|
||||
set_location_assignment PIN_M1 -to "lvds_clk_in(n)"
|
||||
|
||||
set_instance_assignment -name IO_STANDARD LVDS -to lvds_d_in[0]
|
||||
set_location_assignment PIN_J2 -to lvds_d_in[0]
|
||||
set_location_assignment PIN_J1 -to "lvds_d_in[0](n)"
|
||||
|
||||
set_instance_assignment -name IO_STANDARD LVDS -to lvds_d_in[1]
|
||||
set_location_assignment PIN_L2 -to lvds_d_in[1]
|
||||
set_location_assignment PIN_L1 -to "lvds_d_in[1](n)"
|
||||
|
||||
set_instance_assignment -name IO_STANDARD LVDS -to lvds_d_in[2]
|
||||
set_location_assignment PIN_K6 -to lvds_d_in[2]
|
||||
set_location_assignment PIN_L6 -to "lvds_d_in[2](n)"
|
||||
|
||||
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 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_N9 -to two_col
|
||||
|
||||
set_location_assignment PIN_L15 -to head_lat[0]
|
||||
set_location_assignment PIN_R4 -to head_lat[1]
|
||||
|
||||
set_location_assignment PIN_P8 -to head_data[0]
|
||||
set_location_assignment PIN_R5 -to head_data[6]
|
||||
set_location_assignment PIN_R6 -to head_data[3]
|
||||
set_location_assignment PIN_R7 -to head_data[1]
|
||||
set_location_assignment PIN_T4 -to head_data[7]
|
||||
set_location_assignment PIN_T5 -to head_data[5]
|
||||
set_location_assignment PIN_T6 -to head_data[4]
|
||||
set_location_assignment PIN_T7 -to head_data[2]
|
||||
|
||||
|
||||
set_location_assignment PIN_G15 -to v_en[1]
|
||||
set_location_assignment PIN_G16 -to v_en[2]
|
||||
set_location_assignment PIN_E6 -to v_en[0]
|
||||
set_location_assignment PIN_F8 -to v_en[3]
|
||||
set_location_assignment PIN_K5 -to stm8_alert_in[0]
|
||||
set_location_assignment PIN_P16 -to sda_fpga
|
||||
set_location_assignment PIN_B16 -to scl_fpga
|
||||
set_location_assignment PIN_C3 -to shutdn
|
||||
set_location_assignment PIN_K10 -to wf_sel[0]
|
||||
set_location_assignment PIN_R10 -to wf_sel[1]
|
||||
set_location_assignment PIN_T12 -to wf_sel[2]
|
||||
set_location_assignment PIN_A9 -to temp_alert_in
|
||||
set_location_assignment PIN_E2 -to stm8_alert_in[1]
|
||||
set_location_assignment PIN_E8 -to dbg_ser_out
|
||||
set_location_assignment PIN_E7 -to dbg_ser_in
|
||||
|
||||
set_location_assignment PIN_A10 -to nled_g
|
||||
set_location_assignment PIN_D11 -to nled_r
|
||||
set_location_assignment PIN_B10 -to nled_y
|
||||
set_location_assignment PIN_B8 -to pei_clkin
|
||||
set_location_assignment PIN_A8 -to pei_clkout
|
||||
set_location_assignment PIN_P3 -to hd_scl_fpga
|
||||
set_location_assignment PIN_N6 -to hd_sda_fpga
|
||||
|
||||
set_global_assignment -name ENABLE_OCT_DONE OFF
|
||||
set_global_assignment -name ENABLE_CONFIGURATION_PINS OFF
|
||||
set_global_assignment -name ENABLE_BOOT_SEL_PIN OFF
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN OFF
|
||||
set_global_assignment -name RESERVE_DATA1_AFTER_CONFIGURATION "USE AS REGULAR IO"
|
||||
set_global_assignment -name RESERVE_FLASH_NCE_AFTER_CONFIGURATION "USE AS REGULAR IO"
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -rise
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_NEAR_END_VMEAS "HALF VCCIO" -fall
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -rise
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_FAR_END_VMEAS "HALF SIGNAL SWING" -fall
|
||||
|
||||
set_global_assignment -name VHDL_INPUT_VERSION VHDL_2008
|
||||
set_global_assignment -name VHDL_SHOW_LMF_MAPPING_MESSAGES OFF
|
||||
|
||||
set_global_assignment -name ENABLE_SIGNALTAP ON
|
||||
set_global_assignment -name USE_SIGNALTAP_FILE output_files/stpI2C.stp
|
||||
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
set_global_assignment -name VERILOG_FILE ../src/simple_i2c_masterPEI.v
|
||||
set_global_assignment -name VHDL_FILE ../src/mcp4631.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/ring_buffer.vhd
|
||||
set_global_assignment -name VERILOG_FILE ../src/simple_i2c_slave_eprom.v
|
||||
set_global_assignment -name VHDL_FILE ../src/pkg_functions_pei.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/pei_register_pkg.vhd
|
||||
set_global_assignment -name VERILOG_FILE ../src/simple_i2c_slave_tmp275.v
|
||||
set_global_assignment -name VHDL_FILE ../../el_generic_ip/generic_ip/common/0/src/sync_pulse.vhd
|
||||
set_global_assignment -name VERILOG_FILE ../../el_generic_ip/generic_ip/pei_shared/1/src/pei_decoder_uart_1.v
|
||||
set_global_assignment -name VERILOG_FILE ../../generic_ip/pei_shared/1/src/pei_unbuffered_uart_1.v
|
||||
set_global_assignment -name VERILOG_FILE ../../generic_ip/pei_shared/1/src/pei_debug_serial_port_1.v
|
||||
set_global_assignment -name VHDL_FILE ../../generic_ip/pei_shared/1/src/pei_debug_uart_1.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/head_data_proc.vhd
|
||||
set_global_assignment -name VHDL_FILE ../src/TMP275.vhd
|
||||
set_global_assignment -name SDC_FILE pei_fpga_top.out.sdc
|
||||
set_global_assignment -name VERILOG_FILE ../src/simple_i2c_slave.v
|
||||
set_global_assignment -name VHDL_FILE ../src/pei_fpga_top.vhd
|
||||
set_global_assignment -name QIP_FILE io_buf_i2c.qip
|
||||
set_global_assignment -name QIP_FILE pll_25in_100out_pei.qip
|
||||
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_global_assignment -name QIP_FILE head_data.qip
|
||||
set_global_assignment -name QIP_FILE head_datain.qip
|
||||
|
|
@ -1,808 +0,0 @@
|
|||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Quartus Prime
|
||||
# Version 20.1.1 Build 720 11/11/2020 SJ Lite Edition
|
||||
# Date created = 10:31:25 May 25, 2022
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
#
|
||||
# Note:
|
||||
#
|
||||
# 1) Do not modify this file. This file was generated
|
||||
# automatically by the Quartus Prime software and is used
|
||||
# to preserve global assignments across Quartus Prime versions.
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
set_global_assignment -name IP_COMPONENT_REPORT_HIERARCHY Off
|
||||
set_global_assignment -name IP_COMPONENT_INTERNAL Off
|
||||
set_global_assignment -name PROJECT_SHOW_ENTITY_NAME On
|
||||
set_global_assignment -name PROJECT_USE_SIMPLIFIED_NAMES Off
|
||||
set_global_assignment -name ENABLE_REDUCED_MEMORY_MODE Off
|
||||
set_global_assignment -name VER_COMPATIBLE_DB_DIR export_db
|
||||
set_global_assignment -name AUTO_EXPORT_VER_COMPATIBLE_DB Off
|
||||
set_global_assignment -name FLOW_DISABLE_ASSEMBLER Off
|
||||
set_global_assignment -name FLOW_ENABLE_POWER_ANALYZER Off
|
||||
set_global_assignment -name FLOW_ENABLE_HC_COMPARE Off
|
||||
set_global_assignment -name HC_OUTPUT_DIR hc_output
|
||||
set_global_assignment -name SAVE_MIGRATION_INFO_DURING_COMPILATION Off
|
||||
set_global_assignment -name FLOW_ENABLE_IO_ASSIGNMENT_ANALYSIS Off
|
||||
set_global_assignment -name RUN_FULL_COMPILE_ON_DEVICE_CHANGE On
|
||||
set_global_assignment -name FLOW_ENABLE_RTL_VIEWER Off
|
||||
set_global_assignment -name READ_OR_WRITE_IN_BYTE_ADDRESS "Use global settings"
|
||||
set_global_assignment -name FLOW_HARDCOPY_DESIGN_READINESS_CHECK On
|
||||
set_global_assignment -name FLOW_ENABLE_PARALLEL_MODULES On
|
||||
set_global_assignment -name ENABLE_COMPACT_REPORT_TABLE Off
|
||||
set_global_assignment -name REVISION_TYPE Base -family "Arria V"
|
||||
set_global_assignment -name REVISION_TYPE Base -family "Stratix V"
|
||||
set_global_assignment -name REVISION_TYPE Base -family "Arria V GZ"
|
||||
set_global_assignment -name REVISION_TYPE Base -family "Cyclone V"
|
||||
set_global_assignment -name DEFAULT_HOLD_MULTICYCLE "Same as Multicycle"
|
||||
set_global_assignment -name CUT_OFF_PATHS_BETWEEN_CLOCK_DOMAINS On
|
||||
set_global_assignment -name CUT_OFF_READ_DURING_WRITE_PATHS On
|
||||
set_global_assignment -name CUT_OFF_IO_PIN_FEEDBACK On
|
||||
set_global_assignment -name DO_COMBINED_ANALYSIS Off
|
||||
set_global_assignment -name TDC_AGGRESSIVE_HOLD_CLOSURE_EFFORT Off
|
||||
set_global_assignment -name ENABLE_HPS_INTERNAL_TIMING Off
|
||||
set_global_assignment -name EMIF_SOC_PHYCLK_ADVANCE_MODELING Off
|
||||
set_global_assignment -name USE_DLL_FREQUENCY_FOR_DQS_DELAY_CHAIN Off
|
||||
set_global_assignment -name ANALYZE_LATCHES_AS_SYNCHRONOUS_ELEMENTS On
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_SCRIPT_INCLUDE_DEFAULT_ANALYSIS On
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Arria V"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "MAX 10"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Stratix IV"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Cyclone IV E"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Arria 10"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS Off -family "MAX V"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Stratix V"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Arria V GZ"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS Off -family "MAX II"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Arria II GX"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Arria II GZ"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Cyclone IV GX"
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS On -family "Cyclone V"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_REPORT_TIMING Off
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Arria V"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "MAX 10"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Stratix IV"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS On -family "Cyclone IV E"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Arria 10"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS On -family "MAX V"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Stratix V"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Arria V GZ"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS On -family "MAX II"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Arria II GX"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Arria II GZ"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS On -family "Cyclone IV GX"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_WORST_CASE_TIMING_PATHS Off -family "Cyclone V"
|
||||
set_global_assignment -name TIMING_ANALYZER_REPORT_NUM_WORST_CASE_TIMING_PATHS 100
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Arria V"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "MAX 10"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Cyclone IV E"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Stratix IV"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Arria 10"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL Off -family "MAX V"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Stratix V"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Arria V GZ"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL Off -family "MAX II"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Arria II GX"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Arria II GZ"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Cyclone IV GX"
|
||||
set_global_assignment -name TIMING_ANALYZER_DO_CCPP_REMOVAL On -family "Cyclone V"
|
||||
set_global_assignment -name OPTIMIZATION_MODE Balanced
|
||||
set_global_assignment -name ALLOW_REGISTER_MERGING On
|
||||
set_global_assignment -name ALLOW_REGISTER_DUPLICATION On
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Arria V"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER ON -family "Cyclone 10 LP"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "MAX 10"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Stratix IV"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Cyclone IV E"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER ON -family "Arria 10"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "MAX V"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Stratix V"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Arria V GZ"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "MAX II"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Arria II GX"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Arria II GZ"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Cyclone IV GX"
|
||||
set_global_assignment -name DISABLE_LEGACY_TIMING_ANALYZER OFF -family "Cyclone V"
|
||||
set_global_assignment -name MUX_RESTRUCTURE Auto
|
||||
set_global_assignment -name MLAB_ADD_TIMING_CONSTRAINTS_FOR_MIXED_PORT_FEED_THROUGH_MODE_SETTING_DONT_CARE Off
|
||||
set_global_assignment -name ENABLE_IP_DEBUG Off
|
||||
set_global_assignment -name SAVE_DISK_SPACE On
|
||||
set_global_assignment -name OCP_HW_EVAL Enable
|
||||
set_global_assignment -name DEVICE_FILTER_PACKAGE Any
|
||||
set_global_assignment -name DEVICE_FILTER_PIN_COUNT Any
|
||||
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE Any
|
||||
set_global_assignment -name EDA_DESIGN_ENTRY_SYNTHESIS_TOOL "<None>"
|
||||
set_global_assignment -name VERILOG_INPUT_VERSION Verilog_2001
|
||||
set_global_assignment -name VHDL_INPUT_VERSION VHDL_1993
|
||||
set_global_assignment -name FAMILY "Cyclone V"
|
||||
set_global_assignment -name TRUE_WYSIWYG_FLOW Off
|
||||
set_global_assignment -name SMART_COMPILE_IGNORES_TDC_FOR_STRATIX_PLL_CHANGES Off
|
||||
set_global_assignment -name STATE_MACHINE_PROCESSING Auto
|
||||
set_global_assignment -name SAFE_STATE_MACHINE Off
|
||||
set_global_assignment -name EXTRACT_VERILOG_STATE_MACHINES On
|
||||
set_global_assignment -name EXTRACT_VHDL_STATE_MACHINES On
|
||||
set_global_assignment -name IGNORE_VERILOG_INITIAL_CONSTRUCTS Off
|
||||
set_global_assignment -name VERILOG_CONSTANT_LOOP_LIMIT 5000
|
||||
set_global_assignment -name VERILOG_NON_CONSTANT_LOOP_LIMIT 250
|
||||
set_global_assignment -name INFER_RAMS_FROM_RAW_LOGIC On
|
||||
set_global_assignment -name PARALLEL_SYNTHESIS On
|
||||
set_global_assignment -name DSP_BLOCK_BALANCING Auto
|
||||
set_global_assignment -name MAX_BALANCING_DSP_BLOCKS "-1 (Unlimited)"
|
||||
set_global_assignment -name NOT_GATE_PUSH_BACK On
|
||||
set_global_assignment -name ALLOW_POWER_UP_DONT_CARE On
|
||||
set_global_assignment -name REMOVE_REDUNDANT_LOGIC_CELLS Off
|
||||
set_global_assignment -name REMOVE_DUPLICATE_REGISTERS On
|
||||
set_global_assignment -name IGNORE_CARRY_BUFFERS Off
|
||||
set_global_assignment -name IGNORE_CASCADE_BUFFERS Off
|
||||
set_global_assignment -name IGNORE_GLOBAL_BUFFERS Off
|
||||
set_global_assignment -name IGNORE_ROW_GLOBAL_BUFFERS Off
|
||||
set_global_assignment -name IGNORE_LCELL_BUFFERS Off
|
||||
set_global_assignment -name MAX7000_IGNORE_LCELL_BUFFERS AUTO
|
||||
set_global_assignment -name IGNORE_SOFT_BUFFERS On
|
||||
set_global_assignment -name MAX7000_IGNORE_SOFT_BUFFERS Off
|
||||
set_global_assignment -name LIMIT_AHDL_INTEGERS_TO_32_BITS Off
|
||||
set_global_assignment -name AUTO_GLOBAL_CLOCK_MAX On
|
||||
set_global_assignment -name AUTO_GLOBAL_OE_MAX On
|
||||
set_global_assignment -name MAX_AUTO_GLOBAL_REGISTER_CONTROLS On
|
||||
set_global_assignment -name AUTO_IMPLEMENT_IN_ROM Off
|
||||
set_global_assignment -name APEX20K_TECHNOLOGY_MAPPER Lut
|
||||
set_global_assignment -name OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name STRATIXII_OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name CYCLONE_OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name CYCLONEII_OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name STRATIX_OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name MAXII_OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name MAX7000_OPTIMIZATION_TECHNIQUE Speed
|
||||
set_global_assignment -name APEX20K_OPTIMIZATION_TECHNIQUE Balanced
|
||||
set_global_assignment -name MERCURY_OPTIMIZATION_TECHNIQUE Area
|
||||
set_global_assignment -name FLEX6K_OPTIMIZATION_TECHNIQUE Area
|
||||
set_global_assignment -name FLEX10K_OPTIMIZATION_TECHNIQUE Area
|
||||
set_global_assignment -name ALLOW_XOR_GATE_USAGE On
|
||||
set_global_assignment -name AUTO_LCELL_INSERTION On
|
||||
set_global_assignment -name CARRY_CHAIN_LENGTH 48
|
||||
set_global_assignment -name FLEX6K_CARRY_CHAIN_LENGTH 32
|
||||
set_global_assignment -name FLEX10K_CARRY_CHAIN_LENGTH 32
|
||||
set_global_assignment -name MERCURY_CARRY_CHAIN_LENGTH 48
|
||||
set_global_assignment -name STRATIX_CARRY_CHAIN_LENGTH 70
|
||||
set_global_assignment -name STRATIXII_CARRY_CHAIN_LENGTH 70
|
||||
set_global_assignment -name CASCADE_CHAIN_LENGTH 2
|
||||
set_global_assignment -name PARALLEL_EXPANDER_CHAIN_LENGTH 16
|
||||
set_global_assignment -name MAX7000_PARALLEL_EXPANDER_CHAIN_LENGTH 4
|
||||
set_global_assignment -name AUTO_CARRY_CHAINS On
|
||||
set_global_assignment -name AUTO_CASCADE_CHAINS On
|
||||
set_global_assignment -name AUTO_PARALLEL_EXPANDERS On
|
||||
set_global_assignment -name AUTO_OPEN_DRAIN_PINS On
|
||||
set_global_assignment -name ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP Off
|
||||
set_global_assignment -name AUTO_ROM_RECOGNITION On
|
||||
set_global_assignment -name AUTO_RAM_RECOGNITION On
|
||||
set_global_assignment -name AUTO_DSP_RECOGNITION On
|
||||
set_global_assignment -name AUTO_SHIFT_REGISTER_RECOGNITION Auto
|
||||
set_global_assignment -name ALLOW_SHIFT_REGISTER_MERGING_ACROSS_HIERARCHIES Auto
|
||||
set_global_assignment -name AUTO_CLOCK_ENABLE_RECOGNITION On
|
||||
set_global_assignment -name STRICT_RAM_RECOGNITION Off
|
||||
set_global_assignment -name ALLOW_SYNCH_CTRL_USAGE On
|
||||
set_global_assignment -name FORCE_SYNCH_CLEAR Off
|
||||
set_global_assignment -name AUTO_RAM_BLOCK_BALANCING On
|
||||
set_global_assignment -name AUTO_RAM_TO_LCELL_CONVERSION Off
|
||||
set_global_assignment -name AUTO_RESOURCE_SHARING Off
|
||||
set_global_assignment -name ALLOW_ANY_RAM_SIZE_FOR_RECOGNITION Off
|
||||
set_global_assignment -name ALLOW_ANY_ROM_SIZE_FOR_RECOGNITION Off
|
||||
set_global_assignment -name ALLOW_ANY_SHIFT_REGISTER_SIZE_FOR_RECOGNITION Off
|
||||
set_global_assignment -name MAX7000_FANIN_PER_CELL 100
|
||||
set_global_assignment -name USE_LOGICLOCK_CONSTRAINTS_IN_BALANCING On
|
||||
set_global_assignment -name MAX_RAM_BLOCKS_M512 "-1 (Unlimited)"
|
||||
set_global_assignment -name MAX_RAM_BLOCKS_M4K "-1 (Unlimited)"
|
||||
set_global_assignment -name MAX_RAM_BLOCKS_MRAM "-1 (Unlimited)"
|
||||
set_global_assignment -name IGNORE_TRANSLATE_OFF_AND_SYNTHESIS_OFF Off
|
||||
set_global_assignment -name STRATIXGX_BYPASS_REMAPPING_OF_FORCE_SIGNAL_DETECT_SIGNAL_THRESHOLD_SELECT Off
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Arria II GZ"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Arria V"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "MAX 10"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Cyclone IV GX"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Stratix IV"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Cyclone IV E"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Arria 10"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Stratix V"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Arria V GZ"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Cyclone V"
|
||||
set_global_assignment -name SYNTH_TIMING_DRIVEN_SYNTHESIS On -family "Arria II GX"
|
||||
set_global_assignment -name REPORT_PARAMETER_SETTINGS On
|
||||
set_global_assignment -name REPORT_SOURCE_ASSIGNMENTS On
|
||||
set_global_assignment -name REPORT_CONNECTIVITY_CHECKS On
|
||||
set_global_assignment -name IGNORE_MAX_FANOUT_ASSIGNMENTS Off
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Arria V"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 2 -family "Cyclone 10 LP"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 2 -family "MAX 10"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 2 -family "Cyclone IV E"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Stratix IV"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Arria 10"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 2 -family "MAX V"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Stratix V"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 2 -family "MAX II"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Arria V GZ"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Arria II GX"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Arria II GZ"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 2 -family "Cyclone IV GX"
|
||||
set_global_assignment -name SYNCHRONIZATION_REGISTER_CHAIN_LENGTH 3 -family "Cyclone V"
|
||||
set_global_assignment -name OPTIMIZE_POWER_DURING_SYNTHESIS "Normal compilation"
|
||||
set_global_assignment -name HDL_MESSAGE_LEVEL Level2
|
||||
set_global_assignment -name USE_HIGH_SPEED_ADDER Auto
|
||||
set_global_assignment -name NUMBER_OF_PROTECTED_REGISTERS_REPORTED 100
|
||||
set_global_assignment -name NUMBER_OF_REMOVED_REGISTERS_REPORTED 5000
|
||||
set_global_assignment -name NUMBER_OF_SYNTHESIS_MIGRATION_ROWS 5000
|
||||
set_global_assignment -name SYNTHESIS_S10_MIGRATION_CHECKS Off
|
||||
set_global_assignment -name NUMBER_OF_SWEPT_NODES_REPORTED 5000
|
||||
set_global_assignment -name NUMBER_OF_INVERTED_REGISTERS_REPORTED 100
|
||||
set_global_assignment -name SYNTH_CLOCK_MUX_PROTECTION On
|
||||
set_global_assignment -name SYNTH_GATED_CLOCK_CONVERSION Off
|
||||
set_global_assignment -name BLOCK_DESIGN_NAMING Auto
|
||||
set_global_assignment -name SYNTH_PROTECT_SDC_CONSTRAINT Off
|
||||
set_global_assignment -name SYNTHESIS_EFFORT Auto
|
||||
set_global_assignment -name SHIFT_REGISTER_RECOGNITION_ACLR_SIGNAL On
|
||||
set_global_assignment -name PRE_MAPPING_RESYNTHESIS Off
|
||||
set_global_assignment -name SYNTH_MESSAGE_LEVEL Medium
|
||||
set_global_assignment -name DISABLE_REGISTER_MERGING_ACROSS_HIERARCHIES Auto
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Arria II GZ"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Arria V"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "MAX 10"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Cyclone IV GX"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Stratix IV"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Cyclone IV E"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Arria 10"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Stratix V"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Arria V GZ"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Cyclone V"
|
||||
set_global_assignment -name SYNTH_RESOURCE_AWARE_INFERENCE_FOR_BLOCK_RAM On -family "Arria II GX"
|
||||
set_global_assignment -name MAX_LABS "-1 (Unlimited)"
|
||||
set_global_assignment -name RBCGEN_CRITICAL_WARNING_TO_ERROR On
|
||||
set_global_assignment -name MAX_NUMBER_OF_REGISTERS_FROM_UNINFERRED_RAMS "-1 (Unlimited)"
|
||||
set_global_assignment -name AUTO_PARALLEL_SYNTHESIS On
|
||||
set_global_assignment -name PRPOF_ID Off
|
||||
set_global_assignment -name DISABLE_DSP_NEGATE_INFERENCING Off
|
||||
set_global_assignment -name REPORT_PARAMETER_SETTINGS_PRO On
|
||||
set_global_assignment -name REPORT_SOURCE_ASSIGNMENTS_PRO On
|
||||
set_global_assignment -name ENABLE_STATE_MACHINE_INFERENCE Off
|
||||
set_global_assignment -name FLEX10K_ENABLE_LOCK_OUTPUT Off
|
||||
set_global_assignment -name AUTO_MERGE_PLLS On
|
||||
set_global_assignment -name IGNORE_MODE_FOR_MERGE Off
|
||||
set_global_assignment -name TXPMA_SLEW_RATE Low
|
||||
set_global_assignment -name ADCE_ENABLED Auto
|
||||
set_global_assignment -name ROUTER_TIMING_OPTIMIZATION_LEVEL Normal
|
||||
set_global_assignment -name ROUTER_CLOCKING_TOPOLOGY_ANALYSIS Off
|
||||
set_global_assignment -name PLACEMENT_EFFORT_MULTIPLIER 1.0
|
||||
set_global_assignment -name ROUTER_EFFORT_MULTIPLIER 1.0
|
||||
set_global_assignment -name FIT_ATTEMPTS_TO_SKIP 0.0
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS Off
|
||||
set_global_assignment -name ECO_ALLOW_ROUTING_CHANGES Off
|
||||
set_global_assignment -name DEVICE AUTO
|
||||
set_global_assignment -name BASE_PIN_OUT_FILE_ON_SAMEFRAME_DEVICE Off
|
||||
set_global_assignment -name ENABLE_JTAG_BST_SUPPORT Off
|
||||
set_global_assignment -name MAX7000_ENABLE_JTAG_BST_SUPPORT On
|
||||
set_global_assignment -name ENABLE_NCEO_OUTPUT Off
|
||||
set_global_assignment -name RESERVE_NCEO_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name CYCLONEII_RESERVE_NCEO_AFTER_CONFIGURATION "Use as programming pin"
|
||||
set_global_assignment -name STRATIXIII_UPDATE_MODE Standard
|
||||
set_global_assignment -name STRATIX_UPDATE_MODE Standard
|
||||
set_global_assignment -name INTERNAL_FLASH_UPDATE_MODE "Single Image"
|
||||
set_global_assignment -name CVP_MODE Off
|
||||
set_global_assignment -name STRATIXV_CONFIGURATION_SCHEME "Passive Serial" -family "Arria V"
|
||||
set_global_assignment -name STRATIXV_CONFIGURATION_SCHEME "Passive Serial" -family "Arria 10"
|
||||
set_global_assignment -name STRATIXV_CONFIGURATION_SCHEME "Passive Serial" -family "Stratix V"
|
||||
set_global_assignment -name STRATIXV_CONFIGURATION_SCHEME "Passive Serial" -family "Arria V GZ"
|
||||
set_global_assignment -name STRATIXV_CONFIGURATION_SCHEME "Passive Serial" -family "Cyclone V"
|
||||
set_global_assignment -name VID_OPERATION_MODE "PMBus Slave"
|
||||
set_global_assignment -name USE_CONF_DONE AUTO
|
||||
set_global_assignment -name USE_PWRMGT_SCL AUTO
|
||||
set_global_assignment -name USE_PWRMGT_SDA AUTO
|
||||
set_global_assignment -name USE_PWRMGT_ALERT AUTO
|
||||
set_global_assignment -name USE_INIT_DONE AUTO
|
||||
set_global_assignment -name USE_CVP_CONFDONE AUTO
|
||||
set_global_assignment -name USE_SEU_ERROR AUTO
|
||||
set_global_assignment -name RESERVE_AVST_CLK_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_AVST_VALID_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_AVST_DATA15_THROUGH_DATA0_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_AVST_DATA31_THROUGH_DATA16_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name STRATIXIII_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name MAX10FPGA_CONFIGURATION_SCHEME "Internal Configuration"
|
||||
set_global_assignment -name CYCLONEIII_CONFIGURATION_SCHEME "Active Serial"
|
||||
set_global_assignment -name STRATIXII_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name CYCLONEII_CONFIGURATION_SCHEME "Active Serial"
|
||||
set_global_assignment -name APEX20K_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name STRATIX_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name CYCLONE_CONFIGURATION_SCHEME "Active Serial"
|
||||
set_global_assignment -name MERCURY_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name FLEX6K_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name FLEX10K_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name APEXII_CONFIGURATION_SCHEME "Passive Serial"
|
||||
set_global_assignment -name USER_START_UP_CLOCK Off
|
||||
set_global_assignment -name ENABLE_UNUSED_RX_CLOCK_WORKAROUND Off
|
||||
set_global_assignment -name PRESERVE_UNUSED_XCVR_CHANNEL Off
|
||||
set_global_assignment -name IGNORE_HSSI_COLUMN_POWER_WHEN_PRESERVING_UNUSED_XCVR_CHANNELS On
|
||||
set_global_assignment -name AUTO_RESERVE_CLKUSR_FOR_CALIBRATION On
|
||||
set_global_assignment -name DEVICE_INITIALIZATION_CLOCK INIT_INTOSC
|
||||
set_global_assignment -name ENABLE_VREFA_PIN Off
|
||||
set_global_assignment -name ENABLE_VREFB_PIN Off
|
||||
set_global_assignment -name ALWAYS_ENABLE_INPUT_BUFFERS Off
|
||||
set_global_assignment -name ENABLE_ASMI_FOR_FLASH_LOADER Off
|
||||
set_global_assignment -name ENABLE_DEVICE_WIDE_RESET Off
|
||||
set_global_assignment -name ENABLE_DEVICE_WIDE_OE Off
|
||||
set_global_assignment -name RESERVE_ALL_UNUSED_PINS "As output driving ground"
|
||||
set_global_assignment -name ENABLE_INIT_DONE_OUTPUT Off
|
||||
set_global_assignment -name INIT_DONE_OPEN_DRAIN On
|
||||
set_global_assignment -name RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_RDYNBUSY_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_DATA31_THROUGH_DATA16_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_DATA15_THROUGH_DATA8_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_DATA0_AFTER_CONFIGURATION "As input tri-stated"
|
||||
set_global_assignment -name RESERVE_DATA1_AFTER_CONFIGURATION "As input tri-stated"
|
||||
set_global_assignment -name RESERVE_DATA7_THROUGH_DATA2_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_DATA7_THROUGH_DATA5_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_FLASH_NCE_AFTER_CONFIGURATION "As input tri-stated"
|
||||
set_global_assignment -name RESERVE_OTHER_AP_PINS_AFTER_CONFIGURATION "Use as regular IO"
|
||||
set_global_assignment -name RESERVE_DCLK_AFTER_CONFIGURATION "Use as programming pin"
|
||||
set_global_assignment -name ENABLE_CONFIGURATION_PINS On
|
||||
set_global_assignment -name ENABLE_JTAG_PIN_SHARING Off
|
||||
set_global_assignment -name ENABLE_NCE_PIN Off
|
||||
set_global_assignment -name ENABLE_BOOT_SEL_PIN On
|
||||
set_global_assignment -name CRC_ERROR_CHECKING Off
|
||||
set_global_assignment -name INTERNAL_SCRUBBING Off
|
||||
set_global_assignment -name PR_ERROR_OPEN_DRAIN On
|
||||
set_global_assignment -name PR_READY_OPEN_DRAIN On
|
||||
set_global_assignment -name ENABLE_CVP_CONFDONE Off
|
||||
set_global_assignment -name CVP_CONFDONE_OPEN_DRAIN On
|
||||
set_global_assignment -name ENABLE_NCONFIG_FROM_CORE On
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Arria II GZ"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Arria V"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Cyclone 10 LP"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "MAX 10"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Cyclone IV GX"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Stratix IV"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Cyclone IV E"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Arria 10"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "IO Paths and Minimum TPD Paths" -family "MAX V"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Stratix V"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "IO Paths and Minimum TPD Paths" -family "MAX II"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Arria V GZ"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Cyclone V"
|
||||
set_global_assignment -name OPTIMIZE_HOLD_TIMING "All Paths" -family "Arria II GX"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Arria V"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "MAX 10"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Cyclone IV E"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Stratix IV"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Arria 10"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING Off -family "MAX V"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Stratix V"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Arria V GZ"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING Off -family "MAX II"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Arria II GX"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Arria II GZ"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Cyclone IV GX"
|
||||
set_global_assignment -name OPTIMIZE_MULTI_CORNER_TIMING On -family "Cyclone V"
|
||||
set_global_assignment -name BLOCK_RAM_TO_MLAB_CELL_CONVERSION On
|
||||
set_global_assignment -name BLOCK_RAM_AND_MLAB_EQUIVALENT_POWER_UP_CONDITIONS Auto
|
||||
set_global_assignment -name BLOCK_RAM_AND_MLAB_EQUIVALENT_PAUSED_READ_CAPABILITIES Care
|
||||
set_global_assignment -name PROGRAMMABLE_POWER_TECHNOLOGY_SETTING Automatic -family "Stratix IV"
|
||||
set_global_assignment -name PROGRAMMABLE_POWER_TECHNOLOGY_SETTING Automatic -family "Arria 10"
|
||||
set_global_assignment -name PROGRAMMABLE_POWER_TECHNOLOGY_SETTING Automatic -family "Stratix V"
|
||||
set_global_assignment -name PROGRAMMABLE_POWER_TECHNOLOGY_SETTING Automatic -family "Arria V GZ"
|
||||
set_global_assignment -name PROGRAMMABLE_POWER_MAXIMUM_HIGH_SPEED_FRACTION_OF_USED_LAB_TILES 1.0
|
||||
set_global_assignment -name GUARANTEE_MIN_DELAY_CORNER_IO_ZERO_HOLD_TIME On
|
||||
set_global_assignment -name OPTIMIZE_POWER_DURING_FITTING "Normal compilation"
|
||||
set_global_assignment -name OPTIMIZE_SSN Off
|
||||
set_global_assignment -name OPTIMIZE_TIMING "Normal compilation"
|
||||
set_global_assignment -name ECO_OPTIMIZE_TIMING Off
|
||||
set_global_assignment -name ECO_REGENERATE_REPORT Off
|
||||
set_global_assignment -name OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING Normal
|
||||
set_global_assignment -name FIT_ONLY_ONE_ATTEMPT Off
|
||||
set_global_assignment -name FINAL_PLACEMENT_OPTIMIZATION Automatically
|
||||
set_global_assignment -name FITTER_AGGRESSIVE_ROUTABILITY_OPTIMIZATION Automatically
|
||||
set_global_assignment -name SEED 1
|
||||
set_global_assignment -name PERIPHERY_TO_CORE_PLACEMENT_AND_ROUTING_OPTIMIZATION OFF
|
||||
set_global_assignment -name RESERVE_ROUTING_OUTPUT_FLEXIBILITY Off
|
||||
set_global_assignment -name SLOW_SLEW_RATE Off
|
||||
set_global_assignment -name PCI_IO Off
|
||||
set_global_assignment -name TURBO_BIT On
|
||||
set_global_assignment -name WEAK_PULL_UP_RESISTOR Off
|
||||
set_global_assignment -name ENABLE_BUS_HOLD_CIRCUITRY Off
|
||||
set_global_assignment -name AUTO_GLOBAL_MEMORY_CONTROLS Off
|
||||
set_global_assignment -name MIGRATION_CONSTRAIN_CORE_RESOURCES On
|
||||
set_global_assignment -name QII_AUTO_PACKED_REGISTERS Auto
|
||||
set_global_assignment -name AUTO_PACKED_REGISTERS_MAX Auto
|
||||
set_global_assignment -name NORMAL_LCELL_INSERT On
|
||||
set_global_assignment -name CARRY_OUT_PINS_LCELL_INSERT On
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Arria V"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Cyclone 10 LP"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "MAX 10"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Stratix IV"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Cyclone IV E"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Arria 10"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "MAX V"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Stratix V"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "MAX II"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Arria V GZ"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Arria II GX"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Arria II GZ"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Cyclone IV GX"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS On -family "Cyclone V"
|
||||
set_global_assignment -name AUTO_DELAY_CHAINS_FOR_HIGH_FANOUT_INPUT_PINS OFF
|
||||
set_global_assignment -name XSTL_INPUT_ALLOW_SE_BUFFER Off
|
||||
set_global_assignment -name TREAT_BIDIR_AS_OUTPUT Off
|
||||
set_global_assignment -name AUTO_TURBO_BIT ON
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC_FOR_AREA Off
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC Off
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_LOG_FILE Off
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION Off
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_MAP_LOGIC_TO_MEMORY_FOR_AREA Off
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING Off
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_ASYNCHRONOUS_SIGNAL_PIPELINING Off
|
||||
set_global_assignment -name IO_PLACEMENT_OPTIMIZATION On
|
||||
set_global_assignment -name ALLOW_LVTTL_LVCMOS_INPUT_LEVELS_TO_OVERDRIVE_INPUT_BUFFER Off
|
||||
set_global_assignment -name OVERRIDE_DEFAULT_ELECTROMIGRATION_PARAMETERS Off
|
||||
set_global_assignment -name FITTER_EFFORT "Auto Fit"
|
||||
set_global_assignment -name FITTER_AUTO_EFFORT_DESIRED_SLACK_MARGIN 0ns
|
||||
set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT Normal
|
||||
set_global_assignment -name ROUTER_LCELL_INSERTION_AND_LOGIC_DUPLICATION Auto
|
||||
set_global_assignment -name ROUTER_REGISTER_DUPLICATION Auto
|
||||
set_global_assignment -name STRATIXGX_ALLOW_CLOCK_FANOUT_WITH_ANALOG_RESET Off
|
||||
set_global_assignment -name AUTO_GLOBAL_CLOCK On
|
||||
set_global_assignment -name AUTO_GLOBAL_OE On
|
||||
set_global_assignment -name AUTO_GLOBAL_REGISTER_CONTROLS On
|
||||
set_global_assignment -name FITTER_EARLY_TIMING_ESTIMATE_MODE Realistic
|
||||
set_global_assignment -name STRATIXGX_ALLOW_GIGE_UNDER_FULL_DATARATE_RANGE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_RX_CORECLK_FROM_NON_RX_CLKOUT_SOURCE_IN_DOUBLE_DATA_WIDTH_MODE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_GIGE_IN_DOUBLE_DATA_WIDTH_MODE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_PARALLEL_LOOPBACK_IN_DOUBLE_DATA_WIDTH_MODE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_XAUI_IN_SINGLE_DATA_WIDTH_MODE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_XAUI_WITH_CORECLK_SELECTED_AT_RATE_MATCHER Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_XAUI_WITH_RX_CORECLK_FROM_NON_TXPLL_SOURCE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_GIGE_WITH_CORECLK_SELECTED_AT_RATE_MATCHER Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_GIGE_WITHOUT_8B10B Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_GIGE_WITH_RX_CORECLK_FROM_NON_TXPLL_SOURCE Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_POST8B10B_LOOPBACK Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_REVERSE_PARALLEL_LOOPBACK Off
|
||||
set_global_assignment -name STRATIXGX_ALLOW_USE_OF_GXB_COUPLED_IOS Off
|
||||
set_global_assignment -name GENERATE_GXB_RECONFIG_MIF Off
|
||||
set_global_assignment -name GENERATE_GXB_RECONFIG_MIF_WITH_PLL Off
|
||||
set_global_assignment -name RESERVE_ALL_UNUSED_PINS_WEAK_PULLUP "As input tri-stated with weak pull-up"
|
||||
set_global_assignment -name ENABLE_HOLD_BACK_OFF On
|
||||
set_global_assignment -name CONFIGURATION_VCCIO_LEVEL Auto
|
||||
set_global_assignment -name FORCE_CONFIGURATION_VCCIO Off
|
||||
set_global_assignment -name SYNCHRONIZER_IDENTIFICATION Auto
|
||||
set_global_assignment -name ENABLE_BENEFICIAL_SKEW_OPTIMIZATION On
|
||||
set_global_assignment -name OPTIMIZE_FOR_METASTABILITY On
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN On -family "Arria V"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN Off -family "Cyclone 10 LP"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN Off -family "MAX 10"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN Off -family "Cyclone IV E"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN On -family "Arria 10"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN On -family "Stratix V"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN On -family "Arria V GZ"
|
||||
set_global_assignment -name CRC_ERROR_OPEN_DRAIN On -family "Cyclone V"
|
||||
set_global_assignment -name MAX_GLOBAL_CLOCKS_ALLOWED "-1 (Unlimited)"
|
||||
set_global_assignment -name MAX_REGIONAL_CLOCKS_ALLOWED "-1 (Unlimited)"
|
||||
set_global_assignment -name MAX_PERIPHERY_CLOCKS_ALLOWED "-1 (Unlimited)"
|
||||
set_global_assignment -name MAX_CLOCKS_ALLOWED "-1 (Unlimited)"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_100MHz -family "Arria 10"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_100MHz -family "Arria V"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_100MHz -family "Stratix V"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_40MHz -family "Cyclone IV GX"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_100MHz -family "Arria V GZ"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_100MHz -family "Cyclone V"
|
||||
set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_40MHz -family "Arria II GX"
|
||||
set_global_assignment -name M144K_BLOCK_READ_CLOCK_DUTY_CYCLE_DEPENDENCY Off
|
||||
set_global_assignment -name STRATIXIII_MRAM_COMPATIBILITY On
|
||||
set_global_assignment -name FORCE_FITTER_TO_AVOID_PERIPHERY_PLACEMENT_WARNINGS Off
|
||||
set_global_assignment -name AUTO_C3_M9K_BIT_SKIP Off
|
||||
set_global_assignment -name PR_DONE_OPEN_DRAIN On
|
||||
set_global_assignment -name NCEO_OPEN_DRAIN On
|
||||
set_global_assignment -name ENABLE_CRC_ERROR_PIN Off
|
||||
set_global_assignment -name ENABLE_PR_PINS Off
|
||||
set_global_assignment -name RESERVE_PR_PINS Off
|
||||
set_global_assignment -name CONVERT_PR_WARNINGS_TO_ERRORS Off
|
||||
set_global_assignment -name PR_PINS_OPEN_DRAIN Off
|
||||
set_global_assignment -name CLAMPING_DIODE Off
|
||||
set_global_assignment -name TRI_STATE_SPI_PINS Off
|
||||
set_global_assignment -name UNUSED_TSD_PINS_GND Off
|
||||
set_global_assignment -name IMPLEMENT_MLAB_IN_16_BIT_DEEP_MODE Off
|
||||
set_global_assignment -name FORM_DDR_CLUSTERING_CLIQUE Off
|
||||
set_global_assignment -name ALM_REGISTER_PACKING_EFFORT Medium
|
||||
set_global_assignment -name ADVANCED_PHYSICAL_OPTIMIZATION On -family "Arria V"
|
||||
set_global_assignment -name ADVANCED_PHYSICAL_OPTIMIZATION Off -family "Stratix IV"
|
||||
set_global_assignment -name ADVANCED_PHYSICAL_OPTIMIZATION On -family "Arria 10"
|
||||
set_global_assignment -name ADVANCED_PHYSICAL_OPTIMIZATION On -family "Stratix V"
|
||||
set_global_assignment -name ADVANCED_PHYSICAL_OPTIMIZATION On -family "Arria V GZ"
|
||||
set_global_assignment -name ADVANCED_PHYSICAL_OPTIMIZATION On -family "Cyclone V"
|
||||
set_global_assignment -name RELATIVE_NEUTRON_FLUX 1.0
|
||||
set_global_assignment -name SEU_FIT_REPORT Off
|
||||
set_global_assignment -name HYPER_RETIMER Off -family "Arria 10"
|
||||
set_global_assignment -name HYPER_RETIMER_FAST_FORWARD_ADD_PIPELINING_MAX "-1"
|
||||
set_global_assignment -name HYPER_RETIMER_FAST_FORWARD_ASYNCH_CLEAR Auto
|
||||
set_global_assignment -name HYPER_RETIMER_FAST_FORWARD_USER_PRESERVE_RESTRICTION Auto
|
||||
set_global_assignment -name HYPER_RETIMER_FAST_FORWARD_DSP_BLOCKS On
|
||||
set_global_assignment -name HYPER_RETIMER_FAST_FORWARD_RAM_BLOCKS On
|
||||
set_global_assignment -name EDA_SIMULATION_TOOL "<None>"
|
||||
set_global_assignment -name EDA_TIMING_ANALYSIS_TOOL "<None>"
|
||||
set_global_assignment -name EDA_BOARD_DESIGN_TIMING_TOOL "<None>"
|
||||
set_global_assignment -name EDA_BOARD_DESIGN_SYMBOL_TOOL "<None>"
|
||||
set_global_assignment -name EDA_BOARD_DESIGN_SIGNAL_INTEGRITY_TOOL "<None>"
|
||||
set_global_assignment -name EDA_BOARD_DESIGN_BOUNDARY_SCAN_TOOL "<None>"
|
||||
set_global_assignment -name EDA_BOARD_DESIGN_TOOL "<None>"
|
||||
set_global_assignment -name EDA_FORMAL_VERIFICATION_TOOL "<None>"
|
||||
set_global_assignment -name EDA_RESYNTHESIS_TOOL "<None>"
|
||||
set_global_assignment -name ON_CHIP_BITSTREAM_DECOMPRESSION On
|
||||
set_global_assignment -name COMPRESSION_MODE Off
|
||||
set_global_assignment -name CLOCK_SOURCE Internal
|
||||
set_global_assignment -name CONFIGURATION_CLOCK_FREQUENCY "10 MHz"
|
||||
set_global_assignment -name CONFIGURATION_CLOCK_DIVISOR 1
|
||||
set_global_assignment -name ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE On
|
||||
set_global_assignment -name FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE Off
|
||||
set_global_assignment -name FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE On
|
||||
set_global_assignment -name MAX7000S_JTAG_USER_CODE FFFF
|
||||
set_global_assignment -name STRATIX_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name APEX20K_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name MERCURY_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name FLEX10K_JTAG_USER_CODE 7F
|
||||
set_global_assignment -name MAX7000_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name MAX7000_USE_CHECKSUM_AS_USERCODE Off
|
||||
set_global_assignment -name USE_CHECKSUM_AS_USERCODE On
|
||||
set_global_assignment -name SECURITY_BIT Off
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE Off -family "Cyclone 10 LP"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE On -family "MAX 10"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE Off -family "Cyclone IV E"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE Off -family "Stratix IV"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE On -family "MAX V"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE On -family "MAX II"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE Off -family "Arria II GX"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE Off -family "Arria II GZ"
|
||||
set_global_assignment -name USE_CONFIGURATION_DEVICE Off -family "Cyclone IV GX"
|
||||
set_global_assignment -name CYCLONEIII_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name STRATIXII_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE_TYPE "PV3102 or EM1130"
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE0_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE1_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE2_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE3_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE4_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE5_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE6_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_SLAVE_DEVICE7_ADDRESS 0000000
|
||||
set_global_assignment -name PWRMGT_VOLTAGE_OUTPUT_FORMAT "Auto discovery"
|
||||
set_global_assignment -name PWRMGT_DIRECT_FORMAT_COEFFICIENT_M 0
|
||||
set_global_assignment -name PWRMGT_DIRECT_FORMAT_COEFFICIENT_B 0
|
||||
set_global_assignment -name PWRMGT_DIRECT_FORMAT_COEFFICIENT_R 0
|
||||
set_global_assignment -name APEX20K_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name MERCURY_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name FLEX6K_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name FLEX10K_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name CYCLONE_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name STRATIX_CONFIGURATION_DEVICE Auto
|
||||
set_global_assignment -name APEX20K_CONFIG_DEVICE_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name STRATIX_CONFIG_DEVICE_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name MERCURY_CONFIG_DEVICE_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE FFFFFFFF
|
||||
set_global_assignment -name EPROM_USE_CHECKSUM_AS_USERCODE Off
|
||||
set_global_assignment -name AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE On
|
||||
set_global_assignment -name DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE Off
|
||||
set_global_assignment -name GENERATE_TTF_FILE Off
|
||||
set_global_assignment -name GENERATE_RBF_FILE Off
|
||||
set_global_assignment -name GENERATE_HEX_FILE Off
|
||||
set_global_assignment -name HEXOUT_FILE_START_ADDRESS 0
|
||||
set_global_assignment -name HEXOUT_FILE_COUNT_DIRECTION Up
|
||||
set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "As output driving an unspecified signal"
|
||||
set_global_assignment -name RELEASE_CLEARS_BEFORE_TRI_STATES Off
|
||||
set_global_assignment -name AUTO_RESTART_CONFIGURATION On
|
||||
set_global_assignment -name HARDCOPYII_POWER_ON_EXTRA_DELAY Off
|
||||
set_global_assignment -name STRATIXII_MRAM_COMPATIBILITY Off
|
||||
set_global_assignment -name CYCLONEII_M4K_COMPATIBILITY On
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Arria V"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Cyclone 10 LP"
|
||||
set_global_assignment -name ENABLE_OCT_DONE On -family "MAX 10"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Cyclone IV E"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Arria 10"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Stratix V"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Arria V GZ"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Arria II GX"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Cyclone IV GX"
|
||||
set_global_assignment -name ENABLE_OCT_DONE Off -family "Cyclone V"
|
||||
set_global_assignment -name USE_CHECKERED_PATTERN_AS_UNINITIALIZED_RAM_CONTENT OFF
|
||||
set_global_assignment -name ARRIAIIGX_RX_CDR_LOCKUP_FIX_OVERRIDE Off
|
||||
set_global_assignment -name ENABLE_AUTONOMOUS_PCIE_HIP Off
|
||||
set_global_assignment -name ENABLE_ADV_SEU_DETECTION Off
|
||||
set_global_assignment -name POR_SCHEME "Instant ON"
|
||||
set_global_assignment -name EN_USER_IO_WEAK_PULLUP On
|
||||
set_global_assignment -name EN_SPI_IO_WEAK_PULLUP On
|
||||
set_global_assignment -name POF_VERIFY_PROTECT Off
|
||||
set_global_assignment -name ENABLE_SPI_MODE_CHECK Off
|
||||
set_global_assignment -name FORCE_SSMCLK_TO_ISMCLK On
|
||||
set_global_assignment -name FALLBACK_TO_EXTERNAL_FLASH Off
|
||||
set_global_assignment -name EXTERNAL_FLASH_FALLBACK_ADDRESS 0
|
||||
set_global_assignment -name GENERATE_PMSF_FILES On
|
||||
set_global_assignment -name START_TIME 0ns
|
||||
set_global_assignment -name SIMULATION_MODE TIMING
|
||||
set_global_assignment -name AUTO_USE_SIMULATION_PDB_NETLIST Off
|
||||
set_global_assignment -name ADD_DEFAULT_PINS_TO_SIMULATION_OUTPUT_WAVEFORMS On
|
||||
set_global_assignment -name SETUP_HOLD_DETECTION Off
|
||||
set_global_assignment -name SETUP_HOLD_DETECTION_INPUT_REGISTERS_BIDIR_PINS_DISABLED Off
|
||||
set_global_assignment -name CHECK_OUTPUTS Off
|
||||
set_global_assignment -name SIMULATION_COVERAGE On
|
||||
set_global_assignment -name SIMULATION_COMPLETE_COVERAGE_REPORT_PANEL On
|
||||
set_global_assignment -name SIMULATION_MISSING_1_VALUE_COVERAGE_REPORT_PANEL On
|
||||
set_global_assignment -name SIMULATION_MISSING_0_VALUE_COVERAGE_REPORT_PANEL On
|
||||
set_global_assignment -name GLITCH_DETECTION Off
|
||||
set_global_assignment -name GLITCH_INTERVAL 1ns
|
||||
set_global_assignment -name SIMULATOR_GENERATE_SIGNAL_ACTIVITY_FILE Off
|
||||
set_global_assignment -name SIMULATION_WITH_GLITCH_FILTERING_WHEN_GENERATING_SAF On
|
||||
set_global_assignment -name SIMULATION_BUS_CHANNEL_GROUPING Off
|
||||
set_global_assignment -name SIMULATION_VDB_RESULT_FLUSH On
|
||||
set_global_assignment -name VECTOR_COMPARE_TRIGGER_MODE INPUT_EDGE
|
||||
set_global_assignment -name SIMULATION_NETLIST_VIEWER Off
|
||||
set_global_assignment -name SIMULATION_INTERCONNECT_DELAY_MODEL_TYPE TRANSPORT
|
||||
set_global_assignment -name SIMULATION_CELL_DELAY_MODEL_TYPE TRANSPORT
|
||||
set_global_assignment -name SIMULATOR_GENERATE_POWERPLAY_VCD_FILE Off
|
||||
set_global_assignment -name SIMULATOR_PVT_TIMING_MODEL_TYPE AUTO
|
||||
set_global_assignment -name SIMULATION_WITH_AUTO_GLITCH_FILTERING AUTO
|
||||
set_global_assignment -name DRC_TOP_FANOUT 50
|
||||
set_global_assignment -name DRC_FANOUT_EXCEEDING 30
|
||||
set_global_assignment -name DRC_GATED_CLOCK_FEED 30
|
||||
set_global_assignment -name HARDCOPY_FLOW_AUTOMATION MIGRATION_ONLY
|
||||
set_global_assignment -name ENABLE_DRC_SETTINGS Off
|
||||
set_global_assignment -name CLK_RULE_CLKNET_CLKSPINES_THRESHOLD 25
|
||||
set_global_assignment -name DRC_DETAIL_MESSAGE_LIMIT 10
|
||||
set_global_assignment -name DRC_VIOLATION_MESSAGE_LIMIT 30
|
||||
set_global_assignment -name DRC_DEADLOCK_STATE_LIMIT 2
|
||||
set_global_assignment -name MERGE_HEX_FILE Off
|
||||
set_global_assignment -name GENERATE_SVF_FILE Off
|
||||
set_global_assignment -name GENERATE_ISC_FILE Off
|
||||
set_global_assignment -name GENERATE_JAM_FILE Off
|
||||
set_global_assignment -name GENERATE_JBC_FILE Off
|
||||
set_global_assignment -name GENERATE_JBC_FILE_COMPRESSED On
|
||||
set_global_assignment -name GENERATE_CONFIG_SVF_FILE Off
|
||||
set_global_assignment -name GENERATE_CONFIG_ISC_FILE Off
|
||||
set_global_assignment -name GENERATE_CONFIG_JAM_FILE Off
|
||||
set_global_assignment -name GENERATE_CONFIG_JBC_FILE Off
|
||||
set_global_assignment -name GENERATE_CONFIG_JBC_FILE_COMPRESSED On
|
||||
set_global_assignment -name GENERATE_CONFIG_HEXOUT_FILE Off
|
||||
set_global_assignment -name ISP_CLAMP_STATE_DEFAULT "Tri-state"
|
||||
set_global_assignment -name HPS_EARLY_IO_RELEASE Off
|
||||
set_global_assignment -name SIGNALPROBE_ALLOW_OVERUSE Off
|
||||
set_global_assignment -name SIGNALPROBE_DURING_NORMAL_COMPILATION Off
|
||||
set_global_assignment -name POWER_DEFAULT_TOGGLE_RATE 12.5%
|
||||
set_global_assignment -name POWER_DEFAULT_INPUT_IO_TOGGLE_RATE 12.5%
|
||||
set_global_assignment -name POWER_USE_PVA On
|
||||
set_global_assignment -name POWER_USE_INPUT_FILE "No File"
|
||||
set_global_assignment -name POWER_USE_INPUT_FILES Off
|
||||
set_global_assignment -name POWER_VCD_FILTER_GLITCHES On
|
||||
set_global_assignment -name POWER_REPORT_SIGNAL_ACTIVITY Off
|
||||
set_global_assignment -name POWER_REPORT_POWER_DISSIPATION Off
|
||||
set_global_assignment -name POWER_USE_DEVICE_CHARACTERISTICS TYPICAL
|
||||
set_global_assignment -name POWER_AUTO_COMPUTE_TJ On
|
||||
set_global_assignment -name POWER_TJ_VALUE 25
|
||||
set_global_assignment -name POWER_USE_TA_VALUE 25
|
||||
set_global_assignment -name POWER_USE_CUSTOM_COOLING_SOLUTION Off
|
||||
set_global_assignment -name POWER_BOARD_TEMPERATURE 25
|
||||
set_global_assignment -name POWER_HPS_ENABLE Off
|
||||
set_global_assignment -name POWER_HPS_PROC_FREQ 0.0
|
||||
set_global_assignment -name ENABLE_SMART_VOLTAGE_ID Off
|
||||
set_global_assignment -name IGNORE_PARTITIONS Off
|
||||
set_global_assignment -name AUTO_EXPORT_INCREMENTAL_COMPILATION Off
|
||||
set_global_assignment -name RAPID_RECOMPILE_ASSIGNMENT_CHECKING On
|
||||
set_global_assignment -name OUTPUT_IO_TIMING_ENDPOINT "Near End"
|
||||
set_global_assignment -name RTLV_REMOVE_FANOUT_FREE_REGISTERS On
|
||||
set_global_assignment -name RTLV_SIMPLIFIED_LOGIC On
|
||||
set_global_assignment -name RTLV_GROUP_RELATED_NODES On
|
||||
set_global_assignment -name RTLV_GROUP_COMB_LOGIC_IN_CLOUD Off
|
||||
set_global_assignment -name RTLV_GROUP_COMB_LOGIC_IN_CLOUD_TMV Off
|
||||
set_global_assignment -name RTLV_GROUP_RELATED_NODES_TMV On
|
||||
set_global_assignment -name EQC_CONSTANT_DFF_DETECTION On
|
||||
set_global_assignment -name EQC_DUPLICATE_DFF_DETECTION On
|
||||
set_global_assignment -name EQC_BBOX_MERGE On
|
||||
set_global_assignment -name EQC_LVDS_MERGE On
|
||||
set_global_assignment -name EQC_RAM_UNMERGING On
|
||||
set_global_assignment -name EQC_DFF_SS_EMULATION On
|
||||
set_global_assignment -name EQC_RAM_REGISTER_UNPACK On
|
||||
set_global_assignment -name EQC_MAC_REGISTER_UNPACK On
|
||||
set_global_assignment -name EQC_SET_PARTITION_BB_TO_VCC_GND On
|
||||
set_global_assignment -name EQC_STRUCTURE_MATCHING On
|
||||
set_global_assignment -name EQC_AUTO_BREAK_CONE On
|
||||
set_global_assignment -name EQC_POWER_UP_COMPARE Off
|
||||
set_global_assignment -name EQC_AUTO_COMP_LOOP_CUT On
|
||||
set_global_assignment -name EQC_AUTO_INVERSION On
|
||||
set_global_assignment -name EQC_AUTO_TERMINATE On
|
||||
set_global_assignment -name EQC_SUB_CONE_REPORT Off
|
||||
set_global_assignment -name EQC_RENAMING_RULES On
|
||||
set_global_assignment -name EQC_PARAMETER_CHECK On
|
||||
set_global_assignment -name EQC_AUTO_PORTSWAP On
|
||||
set_global_assignment -name EQC_DETECT_DONT_CARES On
|
||||
set_global_assignment -name EQC_SHOW_ALL_MAPPED_POINTS Off
|
||||
set_global_assignment -name EDA_INPUT_GND_NAME GND -section_id ?
|
||||
set_global_assignment -name EDA_INPUT_VCC_NAME VCC -section_id ?
|
||||
set_global_assignment -name EDA_INPUT_DATA_FORMAT NONE -section_id ?
|
||||
set_global_assignment -name EDA_SHOW_LMF_MAPPING_MESSAGES Off -section_id ?
|
||||
set_global_assignment -name EDA_RUN_TOOL_AUTOMATICALLY Off -section_id ?
|
||||
set_global_assignment -name RESYNTHESIS_RETIMING FULL -section_id ?
|
||||
set_global_assignment -name RESYNTHESIS_OPTIMIZATION_EFFORT Normal -section_id ?
|
||||
set_global_assignment -name RESYNTHESIS_PHYSICAL_SYNTHESIS Normal -section_id ?
|
||||
set_global_assignment -name USE_GENERATED_PHYSICAL_CONSTRAINTS On -section_id ?
|
||||
set_global_assignment -name VCCPD_VOLTAGE 3.3V -section_id ?
|
||||
set_global_assignment -name EDA_USER_COMPILED_SIMULATION_LIBRARY_DIRECTORY "<None>" -section_id ?
|
||||
set_global_assignment -name EDA_LAUNCH_CMD_LINE_TOOL Off -section_id ?
|
||||
set_global_assignment -name EDA_ENABLE_IPUTF_MODE On -section_id ?
|
||||
set_global_assignment -name EDA_NATIVELINK_PORTABLE_FILE_PATHS Off -section_id ?
|
||||
set_global_assignment -name EDA_NATIVELINK_GENERATE_SCRIPT_ONLY Off -section_id ?
|
||||
set_global_assignment -name EDA_WAIT_FOR_GUI_TOOL_COMPLETION Off -section_id ?
|
||||
set_global_assignment -name EDA_TRUNCATE_LONG_HIERARCHY_PATHS Off -section_id ?
|
||||
set_global_assignment -name EDA_FLATTEN_BUSES Off -section_id ?
|
||||
set_global_assignment -name EDA_MAP_ILLEGAL_CHARACTERS Off -section_id ?
|
||||
set_global_assignment -name EDA_GENERATE_TIMING_CLOSURE_DATA Off -section_id ?
|
||||
set_global_assignment -name EDA_GENERATE_POWER_INPUT_FILE Off -section_id ?
|
||||
set_global_assignment -name EDA_TEST_BENCH_ENABLE_STATUS NOT_USED -section_id ?
|
||||
set_global_assignment -name EDA_RTL_SIM_MODE NOT_USED -section_id ?
|
||||
set_global_assignment -name EDA_MAINTAIN_DESIGN_HIERARCHY OFF -section_id ?
|
||||
set_global_assignment -name EDA_GENERATE_FUNCTIONAL_NETLIST On -section_id ?
|
||||
set_global_assignment -name EDA_WRITE_DEVICE_CONTROL_PORTS Off -section_id ?
|
||||
set_global_assignment -name EDA_SIMULATION_VCD_OUTPUT_TCL_FILE Off -section_id ?
|
||||
set_global_assignment -name EDA_SIMULATION_VCD_OUTPUT_SIGNALS_TO_TCL_FILE "All Except Combinational Logic Element Outputs" -section_id ?
|
||||
set_global_assignment -name EDA_ENABLE_GLITCH_FILTERING Off -section_id ?
|
||||
set_global_assignment -name EDA_WRITE_NODES_FOR_POWER_ESTIMATION OFF -section_id ?
|
||||
set_global_assignment -name EDA_SETUP_HOLD_DETECTION_INPUT_REGISTERS_BIDIR_PINS_DISABLED Off -section_id ?
|
||||
set_global_assignment -name EDA_WRITER_DONT_WRITE_TOP_ENTITY Off -section_id ?
|
||||
set_global_assignment -name EDA_VHDL_ARCH_NAME structure -section_id ?
|
||||
set_global_assignment -name EDA_IBIS_MODEL_SELECTOR Off -section_id ?
|
||||
set_global_assignment -name EDA_IBIS_EXTENDED_MODEL_SELECTOR Off -section_id ?
|
||||
set_global_assignment -name EDA_IBIS_MUTUAL_COUPLING Off -section_id ?
|
||||
set_global_assignment -name EDA_FORMAL_VERIFICATION_ALLOW_RETIMING Off -section_id ?
|
||||
set_global_assignment -name EDA_BOARD_BOUNDARY_SCAN_OPERATION PRE_CONFIG -section_id ?
|
||||
set_global_assignment -name EDA_GENERATE_RTL_SIMULATION_COMMAND_SCRIPT Off -section_id ?
|
||||
set_global_assignment -name EDA_GENERATE_GATE_LEVEL_SIMULATION_COMMAND_SCRIPT Off -section_id ?
|
||||
set_global_assignment -name EDA_IBIS_SPECIFICATION_VERSION 4p2 -section_id ?
|
||||
set_global_assignment -name SIM_VECTOR_COMPARED_CLOCK_OFFSET 0ns -section_id ?
|
||||
set_global_assignment -name SIM_VECTOR_COMPARED_CLOCK_DUTY_CYCLE 50 -section_id ?
|
||||
set_global_assignment -name APEX20K_CLIQUE_TYPE LAB -section_id ? -entity ?
|
||||
set_global_assignment -name MAX7K_CLIQUE_TYPE LAB -section_id ? -entity ?
|
||||
set_global_assignment -name MERCURY_CLIQUE_TYPE LAB -section_id ? -entity ?
|
||||
set_global_assignment -name FLEX6K_CLIQUE_TYPE LAB -section_id ? -entity ?
|
||||
set_global_assignment -name FLEX10K_CLIQUE_TYPE LAB -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_PRESERVE_HIGH_SPEED_TILES On -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_IGNORE_SOURCE_FILE_CHANGES Off -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_ALWAYS_USE_QXP_NETLIST Off -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_IMPORT_ASSIGNMENTS On -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_IMPORT_EXISTING_ASSIGNMENTS REPLACE_CONFLICTING -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_IMPORT_EXISTING_LOGICLOCK_REGIONS UPDATE_CONFLICTING -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_IMPORT_PROMOTE_ASSIGNMENTS On -section_id ? -entity ?
|
||||
set_global_assignment -name ALLOW_MULTIPLE_PERSONAS Off -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_ASD_REGION_ID 1 -section_id ? -entity ?
|
||||
set_global_assignment -name CROSS_BOUNDARY_OPTIMIZATIONS Off -section_id ? -entity ?
|
||||
set_global_assignment -name PROPAGATE_CONSTANTS_ON_INPUTS On -section_id ? -entity ?
|
||||
set_global_assignment -name PROPAGATE_INVERSIONS_ON_INPUTS On -section_id ? -entity ?
|
||||
set_global_assignment -name REMOVE_LOGIC_ON_UNCONNECTED_OUTPUTS On -section_id ? -entity ?
|
||||
set_global_assignment -name MERGE_EQUIVALENT_INPUTS On -section_id ? -entity ?
|
||||
set_global_assignment -name MERGE_EQUIVALENT_BIDIRS On -section_id ? -entity ?
|
||||
set_global_assignment -name ABSORB_PATHS_FROM_OUTPUTS_TO_INPUTS On -section_id ? -entity ?
|
||||
set_global_assignment -name PARTITION_ENABLE_STRICT_PRESERVATION Off -section_id ? -entity ?
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
--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 pei_lvds_rx
|
||||
PORT
|
||||
(
|
||||
pll_areset : IN STD_LOGIC ;
|
||||
rx_in : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
|
||||
rx_inclock : IN STD_LOGIC ;
|
||||
rx_locked : OUT STD_LOGIC ;
|
||||
rx_out : OUT STD_LOGIC_VECTOR (27 DOWNTO 0);
|
||||
rx_outclock : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE pinplan>
|
||||
<pinplan intended_family="Cyclone 10 LP" variation_name="pei_lvds_rx" megafunction_name="ALTLVDS_RX" specifies="all_ports">
|
||||
<global>
|
||||
<pin name="pll_areset" direction="input" scope="external" />
|
||||
<pin name="rx_in[3..0]" direction="input" scope="external" />
|
||||
<pin name="rx_inclock" direction="input" scope="external" />
|
||||
<pin name="rx_locked" direction="output" scope="external" />
|
||||
<pin name="rx_out[27..0]" direction="output" scope="external" />
|
||||
<pin name="rx_outclock" direction="output" scope="external" />
|
||||
|
||||
</global>
|
||||
</pinplan>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTLVDS_RX"
|
||||
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) "pei_lvds_rx.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pei_lvds_rx_inst.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pei_lvds_rx.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pei_lvds_rx.ppf"]
|
||||
|
|
@ -1,295 +0,0 @@
|
|||
-- megafunction wizard: %ALTLVDS_RX%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: ALTLVDS_RX
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: pei_lvds_rx.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- ALTLVDS_RX
|
||||
--
|
||||
-- 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.all;
|
||||
|
||||
ENTITY pei_lvds_rx IS
|
||||
PORT
|
||||
(
|
||||
pll_areset : IN STD_LOGIC ;
|
||||
rx_in : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
|
||||
rx_inclock : IN STD_LOGIC ;
|
||||
rx_locked : OUT STD_LOGIC ;
|
||||
rx_out : OUT STD_LOGIC_VECTOR (27 DOWNTO 0);
|
||||
rx_outclock : OUT STD_LOGIC
|
||||
);
|
||||
END pei_lvds_rx;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pei_lvds_rx IS
|
||||
|
||||
SIGNAL sub_wire0 : STD_LOGIC ;
|
||||
SIGNAL sub_wire1 : STD_LOGIC_VECTOR (27 DOWNTO 0);
|
||||
SIGNAL sub_wire2 : STD_LOGIC ;
|
||||
|
||||
|
||||
|
||||
COMPONENT altlvds_rx
|
||||
GENERIC (
|
||||
buffer_implementation : STRING;
|
||||
cds_mode : STRING;
|
||||
common_rx_tx_pll : STRING;
|
||||
data_align_rollover : NATURAL;
|
||||
data_rate : STRING;
|
||||
deserialization_factor : NATURAL;
|
||||
dpa_initial_phase_value : NATURAL;
|
||||
dpll_lock_count : NATURAL;
|
||||
dpll_lock_window : NATURAL;
|
||||
enable_clock_pin_mode : STRING;
|
||||
enable_dpa_align_to_rising_edge_only : STRING;
|
||||
enable_dpa_calibration : STRING;
|
||||
enable_dpa_fifo : STRING;
|
||||
enable_dpa_initial_phase_selection : STRING;
|
||||
enable_dpa_mode : STRING;
|
||||
enable_dpa_pll_calibration : STRING;
|
||||
enable_soft_cdr_mode : STRING;
|
||||
implement_in_les : STRING;
|
||||
inclock_boost : NATURAL;
|
||||
inclock_data_alignment : STRING;
|
||||
inclock_period : NATURAL;
|
||||
inclock_phase_shift : NATURAL;
|
||||
input_data_rate : NATURAL;
|
||||
intended_device_family : STRING;
|
||||
lose_lock_on_one_change : STRING;
|
||||
lpm_hint : STRING;
|
||||
lpm_type : STRING;
|
||||
--lvds_rx_reg_setting : STRING;
|
||||
number_of_channels : NATURAL;
|
||||
outclock_resource : STRING;
|
||||
pll_operation_mode : STRING;
|
||||
pll_self_reset_on_loss_lock : STRING;
|
||||
port_rx_channel_data_align : STRING;
|
||||
port_rx_data_align : STRING;
|
||||
refclk_frequency : STRING;
|
||||
registered_data_align_input : STRING;
|
||||
registered_output : STRING;
|
||||
reset_fifo_at_first_lock : STRING;
|
||||
rx_align_data_reg : STRING;
|
||||
sim_dpa_is_negative_ppm_drift : STRING;
|
||||
sim_dpa_net_ppm_variation : NATURAL;
|
||||
sim_dpa_output_clock_phase_shift : NATURAL;
|
||||
use_coreclock_input : STRING;
|
||||
use_dpll_rawperror : STRING;
|
||||
use_external_pll : STRING;
|
||||
use_no_phase_shift : STRING;
|
||||
x_on_bitslip : STRING;
|
||||
clk_src_is_pll : STRING
|
||||
);
|
||||
PORT (
|
||||
pll_areset : IN STD_LOGIC ;
|
||||
rx_in : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
|
||||
rx_inclock : IN STD_LOGIC ;
|
||||
rx_locked : OUT STD_LOGIC ;
|
||||
rx_out : OUT STD_LOGIC_VECTOR (27 DOWNTO 0);
|
||||
rx_outclock : OUT STD_LOGIC
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
BEGIN
|
||||
rx_locked <= sub_wire0;
|
||||
rx_out <= sub_wire1(27 DOWNTO 0);
|
||||
rx_outclock <= sub_wire2;
|
||||
|
||||
ALTLVDS_RX_component : ALTLVDS_RX
|
||||
GENERIC MAP (
|
||||
buffer_implementation => "RAM",
|
||||
cds_mode => "UNUSED",
|
||||
common_rx_tx_pll => "OFF",
|
||||
data_align_rollover => 4,
|
||||
data_rate => "160.0 Mbps",
|
||||
deserialization_factor => 7,
|
||||
dpa_initial_phase_value => 0,
|
||||
dpll_lock_count => 0,
|
||||
dpll_lock_window => 0,
|
||||
enable_clock_pin_mode => "UNUSED",
|
||||
enable_dpa_align_to_rising_edge_only => "OFF",
|
||||
enable_dpa_calibration => "ON",
|
||||
enable_dpa_fifo => "UNUSED",
|
||||
enable_dpa_initial_phase_selection => "OFF",
|
||||
enable_dpa_mode => "OFF",
|
||||
enable_dpa_pll_calibration => "OFF",
|
||||
enable_soft_cdr_mode => "OFF",
|
||||
implement_in_les => "ON",
|
||||
inclock_boost => 0,
|
||||
inclock_data_alignment => "EDGE_ALIGNED",
|
||||
inclock_period => 43745,
|
||||
inclock_phase_shift => 0,
|
||||
input_data_rate => 160,
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
lose_lock_on_one_change => "UNUSED",
|
||||
lpm_hint => "CBX_MODULE_PREFIX=pei_lvds_rx",
|
||||
lpm_type => "altlvds_rx",
|
||||
--lvds_rx_reg_setting => "ON",
|
||||
number_of_channels => 4,
|
||||
outclock_resource => "AUTO",
|
||||
pll_operation_mode => "UNUSED",
|
||||
pll_self_reset_on_loss_lock => "OFF",
|
||||
port_rx_channel_data_align => "PORT_UNUSED",
|
||||
port_rx_data_align => "PORT_UNUSED",
|
||||
refclk_frequency => "UNUSED",
|
||||
registered_data_align_input => "UNUSED",
|
||||
registered_output => "ON",
|
||||
reset_fifo_at_first_lock => "UNUSED",
|
||||
rx_align_data_reg => "UNUSED",
|
||||
sim_dpa_is_negative_ppm_drift => "OFF",
|
||||
sim_dpa_net_ppm_variation => 0,
|
||||
sim_dpa_output_clock_phase_shift => 0,
|
||||
use_coreclock_input => "OFF",
|
||||
use_dpll_rawperror => "OFF",
|
||||
use_external_pll => "OFF",
|
||||
use_no_phase_shift => "ON",
|
||||
x_on_bitslip => "ON",
|
||||
clk_src_is_pll => "off"
|
||||
)
|
||||
PORT MAP (
|
||||
pll_areset => pll_areset,
|
||||
rx_in => rx_in,
|
||||
rx_inclock => rx_inclock,
|
||||
rx_locked => sub_wire0,
|
||||
rx_out => sub_wire1,
|
||||
rx_outclock => sub_wire2
|
||||
);
|
||||
|
||||
|
||||
|
||||
END SYN;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: PRIVATE: Bitslip NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clock_Choices STRING "tx_coreclock"
|
||||
-- Retrieval info: PRIVATE: Clock_Mode NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Data_rate STRING "160.0"
|
||||
-- Retrieval info: PRIVATE: Deser_Factor NUMERIC "7"
|
||||
-- Retrieval info: PRIVATE: Dpll_Lock_Count NUMERIC "0"
|
||||
-- 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: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: PRIVATE: Le_Serdes STRING "ON"
|
||||
-- Retrieval info: PRIVATE: Num_Channel NUMERIC "4"
|
||||
-- Retrieval info: PRIVATE: Outclock_Divide_By NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: pCNX_OUTCLK_ALIGN NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: pINCLOCK_PHASE_SHIFT STRING "0.00"
|
||||
-- Retrieval info: PRIVATE: PLL_Enable NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: PLL_Freq STRING "22.86"
|
||||
-- Retrieval info: PRIVATE: PLL_Period STRING "43.745"
|
||||
-- Retrieval info: PRIVATE: pOUTCLOCK_PHASE_SHIFT NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Reg_InOut NUMERIC "1"
|
||||
-- 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_Pll_Areset NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: Use_Rawperror NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Use_Tx_Out_Phase NUMERIC "0"
|
||||
-- Retrieval info: CONSTANT: BUFFER_IMPLEMENTATION STRING "RAM"
|
||||
-- Retrieval info: CONSTANT: CDS_MODE STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: COMMON_RX_TX_PLL STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: clk_src_is_pll STRING "off"
|
||||
-- Retrieval info: CONSTANT: DATA_ALIGN_ROLLOVER NUMERIC "4"
|
||||
-- Retrieval info: CONSTANT: DATA_RATE STRING "160.0 Mbps"
|
||||
-- Retrieval info: CONSTANT: DESERIALIZATION_FACTOR NUMERIC "7"
|
||||
-- Retrieval info: CONSTANT: DPA_INITIAL_PHASE_VALUE NUMERIC "0"
|
||||
-- Retrieval info: CONSTANT: DPLL_LOCK_COUNT NUMERIC "0"
|
||||
-- Retrieval info: CONSTANT: DPLL_LOCK_WINDOW NUMERIC "0"
|
||||
-- Retrieval info: CONSTANT: ENABLE_CLOCK_PIN_MODE STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: ENABLE_DPA_ALIGN_TO_RISING_EDGE_ONLY STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: ENABLE_DPA_CALIBRATION STRING "ON"
|
||||
-- Retrieval info: CONSTANT: ENABLE_DPA_FIFO STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: ENABLE_DPA_INITIAL_PHASE_SELECTION STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: ENABLE_DPA_MODE STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: ENABLE_DPA_PLL_CALIBRATION STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: ENABLE_SOFT_CDR_MODE STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: IMPLEMENT_IN_LES STRING "ON"
|
||||
-- Retrieval info: CONSTANT: INCLOCK_BOOST NUMERIC "0"
|
||||
-- Retrieval info: CONSTANT: INCLOCK_DATA_ALIGNMENT STRING "EDGE_ALIGNED"
|
||||
-- Retrieval info: CONSTANT: INCLOCK_PERIOD NUMERIC "43745"
|
||||
-- Retrieval info: CONSTANT: INCLOCK_PHASE_SHIFT NUMERIC "0"
|
||||
-- Retrieval info: CONSTANT: INPUT_DATA_RATE NUMERIC "160"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone 10 LP"
|
||||
-- Retrieval info: CONSTANT: LOSE_LOCK_ON_ONE_CHANGE STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: LPM_HINT STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altlvds_rx"
|
||||
-- Retrieval info: CONSTANT: LVDS_RX_REG_SETTING STRING "ON"
|
||||
-- Retrieval info: CONSTANT: NUMBER_OF_CHANNELS NUMERIC "4"
|
||||
-- Retrieval info: CONSTANT: OUTCLOCK_RESOURCE STRING "AUTO"
|
||||
-- Retrieval info: CONSTANT: PLL_OPERATION_MODE STRING "UNUSED"
|
||||
-- Retrieval info: CONSTANT: PLL_SELF_RESET_ON_LOSS_LOCK STRING "OFF"
|
||||
-- Retrieval info: CONSTANT: PORT_RX_CHANNEL_DATA_ALIGN STRING "PORT_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_RX_DATA_ALIGN STRING "PORT_UNUSED"
|
||||
-- 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: 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"
|
||||
-- Retrieval info: CONSTANT: SIM_DPA_NET_PPM_VARIATION NUMERIC "0"
|
||||
-- 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_NO_PHASE_SHIFT STRING "ON"
|
||||
-- Retrieval info: CONSTANT: X_ON_BITSLIP STRING "ON"
|
||||
-- Retrieval info: USED_PORT: pll_areset 0 0 0 0 INPUT NODEFVAL "pll_areset"
|
||||
-- Retrieval info: CONNECT: @pll_areset 0 0 0 0 pll_areset 0 0 0 0
|
||||
-- Retrieval info: USED_PORT: rx_in 0 0 4 0 INPUT NODEFVAL "rx_in[3..0]"
|
||||
-- Retrieval info: CONNECT: @rx_in 0 0 4 0 rx_in 0 0 4 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 28 0 OUTPUT NODEFVAL "rx_out[27..0]"
|
||||
-- Retrieval info: CONNECT: rx_out 0 0 28 0 @rx_out 0 0 28 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 pei_lvds_rx.vhd TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_lvds_rx.qip TRUE FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_lvds_rx.bsf FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_lvds_rx_inst.vhd TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_lvds_rx.inc FALSE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_lvds_rx.cmp TRUE TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pei_lvds_rx.ppf TRUE FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
-- Retrieval info: CBX_MODULE_PREFIX: ON
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
pei_lvds_rx_inst : pei_lvds_rx PORT MAP (
|
||||
pll_areset => pll_areset_sig,
|
||||
rx_in => rx_in_sig,
|
||||
rx_inclock => rx_inclock_sig,
|
||||
rx_locked => rx_locked_sig,
|
||||
rx_out => rx_out_sig,
|
||||
rx_outclock => rx_outclock_sig
|
||||
);
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
--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 pll_25in_100out_pei
|
||||
PORT
|
||||
(
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE pinplan>
|
||||
<pinplan intended_family="Cyclone 10 LP" variation_name="pll_25in_100out_pei" megafunction_name="ALTPLL" specifies="all_ports">
|
||||
<global>
|
||||
<pin name="inclk0" direction="input" scope="external" source="clock" />
|
||||
<pin name="c0" direction="output" scope="external" source="clock" />
|
||||
<pin name="locked" direction="output" scope="external" />
|
||||
|
||||
</global>
|
||||
</pinplan>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
|
||||
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) "pll_25in_100out_pei.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_25in_100out_pei.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_25in_100out_pei.ppf"]
|
||||
|
|
@ -1,360 +0,0 @@
|
|||
-- megafunction wizard: %ALTPLL%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altpll
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: pll_25in_100out_pei.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altpll
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
--
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- 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.all;
|
||||
|
||||
ENTITY pll_25in_100out_pei IS
|
||||
PORT
|
||||
(
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
END pll_25in_100out_pei;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pll_25in_100out_pei 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 ;
|
||||
|
||||
|
||||
|
||||
COMPONENT altpll
|
||||
GENERIC (
|
||||
bandwidth_type : STRING;
|
||||
clk0_divide_by : NATURAL;
|
||||
clk0_duty_cycle : NATURAL;
|
||||
clk0_multiply_by : NATURAL;
|
||||
clk0_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_wire4 <= sub_wire3(0);
|
||||
c0 <= sub_wire4;
|
||||
locked <= sub_wire5;
|
||||
|
||||
altpll_component : altpll
|
||||
GENERIC MAP (
|
||||
bandwidth_type => "AUTO",
|
||||
clk0_divide_by => 1,
|
||||
clk0_duty_cycle => 50,
|
||||
clk0_multiply_by => 4,
|
||||
clk0_phase_shift => "0",
|
||||
compensate_clock => "CLK0",
|
||||
inclk0_input_frequency => 40000,
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
lpm_hint => "CBX_MODULE_PREFIX=pll_25in_100out_pei",
|
||||
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_UNUSED",
|
||||
port_clk2 => "PORT_UNUSED",
|
||||
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 => "OFF",
|
||||
width_clock => 5
|
||||
)
|
||||
PORT MAP (
|
||||
inclk => sub_wire1,
|
||||
clk => sub_wire3,
|
||||
locked => sub_wire5
|
||||
);
|
||||
|
||||
|
||||
|
||||
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 "8"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "100.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 "25.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: MIG_DEVICE_SPEED_GRADE STRING "Any"
|
||||
-- Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 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_SHIFT_STEP_ENABLED_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 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_25in_100out.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 "0"
|
||||
-- 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: 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_CLKENA0 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 "4"
|
||||
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
|
||||
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
|
||||
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "40000"
|
||||
-- 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_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_UNUSED"
|
||||
-- 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 "OFF"
|
||||
-- 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: 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: locked 0 0 0 0 @locked 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_25in_100out_pei.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_25in_100out_pei.ppf TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_25in_100out_pei.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_25in_100out_pei.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_25in_100out_pei.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_25in_100out_pei_inst.vhd FALSE
|
||||
-- Retrieval info: CBX_MODULE_PREFIX: ON
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
--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 pll_head_clk
|
||||
PORT
|
||||
(
|
||||
areset : IN STD_LOGIC := '0';
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
c1 : OUT STD_LOGIC ;
|
||||
c2 : OUT STD_LOGIC ;
|
||||
c3 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE pinplan>
|
||||
<pinplan intended_family="Cyclone 10 LP" variation_name="pll_head_clk" megafunction_name="ALTPLL" specifies="all_ports">
|
||||
<global>
|
||||
<pin name="areset" direction="input" scope="external" />
|
||||
<pin name="inclk0" direction="input" scope="external" source="clock" />
|
||||
<pin name="c0" direction="output" scope="external" source="clock" />
|
||||
<pin name="c1" direction="output" scope="external" source="clock" />
|
||||
<pin name="c2" direction="output" scope="external" source="clock" />
|
||||
<pin name="c3" direction="output" scope="external" source="clock" />
|
||||
<pin name="locked" direction="output" scope="external" />
|
||||
|
||||
</global>
|
||||
</pinplan>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
|
||||
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) "pll_head_clk.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_head_clk_inst.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_head_clk.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_head_clk.ppf"]
|
||||
|
|
@ -1,462 +0,0 @@
|
|||
-- megafunction wizard: %ALTPLL%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altpll
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: pll_head_clk.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altpll
|
||||
--
|
||||
-- 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.all;
|
||||
|
||||
ENTITY pll_head_clk IS
|
||||
PORT
|
||||
(
|
||||
areset : IN STD_LOGIC := '0';
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
c1 : OUT STD_LOGIC ;
|
||||
c2 : OUT STD_LOGIC ;
|
||||
c3 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
END pll_head_clk;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pll_head_clk 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 ;
|
||||
SIGNAL sub_wire8 : 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;
|
||||
clk3_divide_by : NATURAL;
|
||||
clk3_duty_cycle : NATURAL;
|
||||
clk3_multiply_by : NATURAL;
|
||||
clk3_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 (
|
||||
areset : IN STD_LOGIC ;
|
||||
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_wire7 <= sub_wire3(3);
|
||||
sub_wire6 <= sub_wire3(2);
|
||||
sub_wire5 <= sub_wire3(1);
|
||||
sub_wire4 <= sub_wire3(0);
|
||||
c0 <= sub_wire4;
|
||||
c1 <= sub_wire5;
|
||||
c2 <= sub_wire6;
|
||||
c3 <= sub_wire7;
|
||||
locked <= sub_wire8;
|
||||
|
||||
altpll_component : altpll
|
||||
GENERIC MAP (
|
||||
bandwidth_type => "AUTO",
|
||||
clk0_divide_by => 2,
|
||||
clk0_duty_cycle => 50,
|
||||
clk0_multiply_by => 7,
|
||||
clk0_phase_shift => "0",
|
||||
clk1_divide_by => 2,
|
||||
clk1_duty_cycle => 50,
|
||||
clk1_multiply_by => 1,
|
||||
clk1_phase_shift => "11999",
|
||||
clk2_divide_by => 2,
|
||||
clk2_duty_cycle => 50,
|
||||
clk2_multiply_by => 7,
|
||||
clk2_phase_shift => "429",
|
||||
clk3_divide_by => 1,
|
||||
clk3_duty_cycle => 50,
|
||||
clk3_multiply_by => 1,
|
||||
clk3_phase_shift => "0",
|
||||
compensate_clock => "CLK0",
|
||||
inclk0_input_frequency => 21000,
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
lpm_hint => "CBX_MODULE_PREFIX=pll_head_clk",
|
||||
lpm_type => "altpll",
|
||||
operation_mode => "NORMAL",
|
||||
pll_type => "AUTO",
|
||||
port_activeclock => "PORT_UNUSED",
|
||||
port_areset => "PORT_USED",
|
||||
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_USED",
|
||||
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 => "OFF",
|
||||
width_clock => 5
|
||||
)
|
||||
PORT MAP (
|
||||
areset => areset,
|
||||
inclk => sub_wire1,
|
||||
clk => sub_wire3,
|
||||
locked => sub_wire8
|
||||
);
|
||||
|
||||
|
||||
|
||||
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 "2"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "2"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR2 NUMERIC "2"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR3 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: DUTY_CYCLE3 STRING "50.00000000"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "166.666504"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE1 STRING "23.809500"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE2 STRING "166.666504"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE3 STRING "47.618999"
|
||||
-- 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 "47.619"
|
||||
-- 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 "deg"
|
||||
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT2 STRING "ps"
|
||||
-- Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT3 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: MIRROR_CLK3 STRING "0"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "7"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR2 NUMERIC "7"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR3 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ2 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ3 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "0"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE2 STRING "0"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE3 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: OUTPUT_FREQ_UNIT3 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 "102.85000000"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT2 STRING "25.71000000"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT3 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: PHASE_SHIFT_UNIT3 STRING "ps"
|
||||
-- Retrieval info: PRIVATE: PLL_ADVANCED_PARAM_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "1"
|
||||
-- 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_head_clk.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 "0"
|
||||
-- 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: STICKY_CLK3 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_CLK3 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_CLKENA3 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 "2"
|
||||
-- Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "7"
|
||||
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
|
||||
-- Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "2"
|
||||
-- Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "11999"
|
||||
-- Retrieval info: CONSTANT: CLK2_DIVIDE_BY NUMERIC "2"
|
||||
-- Retrieval info: CONSTANT: CLK2_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK2_MULTIPLY_BY NUMERIC "7"
|
||||
-- Retrieval info: CONSTANT: CLK2_PHASE_SHIFT STRING "429"
|
||||
-- Retrieval info: CONSTANT: CLK3_DIVIDE_BY NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: CLK3_DUTY_CYCLE NUMERIC "50"
|
||||
-- Retrieval info: CONSTANT: CLK3_MULTIPLY_BY NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: CLK3_PHASE_SHIFT STRING "0"
|
||||
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
|
||||
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "21000"
|
||||
-- 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_USED"
|
||||
-- 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_USED"
|
||||
-- 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 "OFF"
|
||||
-- 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: areset 0 0 0 0 INPUT GND "areset"
|
||||
-- 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: c3 0 0 0 0 OUTPUT_CLK_EXT VCC "c3"
|
||||
-- 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: @areset 0 0 0 0 areset 0 0 0 0
|
||||
-- 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: c3 0 0 0 0 @clk 0 0 1 3
|
||||
-- Retrieval info: CONNECT: locked 0 0 0 0 @locked 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_head_clk.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_head_clk.ppf TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_head_clk.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_head_clk.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_head_clk.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_head_clk_inst.vhd TRUE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
-- Retrieval info: CBX_MODULE_PREFIX: ON
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "ALTPLL"
|
||||
set_global_assignment -name IP_TOOL_VERSION "19.1"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone 10 LP}"
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "pll_phe_if.vhd"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_phe_if.cmp"]
|
||||
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "pll_phe_if.ppf"]
|
||||
|
|
@ -1,361 +0,0 @@
|
|||
-- megafunction wizard: %ALTPLL%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altpll
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: pll_phe_if.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altpll
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 19.1.0 Build 670 09/22/2019 SJ Lite Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 2019 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.all;
|
||||
|
||||
ENTITY pll_phe_if IS
|
||||
PORT
|
||||
(
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
END pll_phe_if;
|
||||
|
||||
|
||||
ARCHITECTURE SYN OF pll_phe_if 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 ;
|
||||
|
||||
|
||||
|
||||
COMPONENT altpll
|
||||
GENERIC (
|
||||
bandwidth_type : STRING;
|
||||
clk0_divide_by : NATURAL;
|
||||
clk0_duty_cycle : NATURAL;
|
||||
clk0_multiply_by : NATURAL;
|
||||
clk0_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_wire4 <= sub_wire3(0);
|
||||
c0 <= sub_wire4;
|
||||
locked <= sub_wire5;
|
||||
|
||||
altpll_component : altpll
|
||||
GENERIC MAP (
|
||||
bandwidth_type => "AUTO",
|
||||
clk0_divide_by => 1,
|
||||
clk0_duty_cycle => 50,
|
||||
clk0_multiply_by => 1,
|
||||
clk0_phase_shift => "0",
|
||||
compensate_clock => "CLK0",
|
||||
inclk0_input_frequency => 4000,
|
||||
intended_device_family => "Cyclone 10 LP",
|
||||
lpm_hint => "CBX_MODULE_PREFIX=pll_phe_if",
|
||||
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_UNUSED",
|
||||
port_clk2 => "PORT_UNUSED",
|
||||
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 => "OFF",
|
||||
width_clock => 5
|
||||
)
|
||||
PORT MAP (
|
||||
inclk => sub_wire1,
|
||||
clk => sub_wire3,
|
||||
locked => sub_wire5
|
||||
);
|
||||
|
||||
|
||||
|
||||
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 "8"
|
||||
-- Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
|
||||
-- Retrieval info: PRIVATE: EFF_OUTPUT_FREQ_VALUE0 STRING "250.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 "250.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: MIG_DEVICE_SPEED_GRADE STRING "Any"
|
||||
-- Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
|
||||
-- Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.00000000"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
|
||||
-- Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 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_SHIFT_STEP_ENABLED_CHECK STRING "0"
|
||||
-- Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 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_phe_if.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 "0"
|
||||
-- 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: 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_CLKENA0 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 "1"
|
||||
-- Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
|
||||
-- Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
|
||||
-- Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "4000"
|
||||
-- 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_UNUSED"
|
||||
-- Retrieval info: CONSTANT: PORT_clk2 STRING "PORT_UNUSED"
|
||||
-- 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 "OFF"
|
||||
-- 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: 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: locked 0 0 0 0 @locked 0 0 0 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_phe_if.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_phe_if.ppf TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_phe_if.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_phe_if.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_phe_if.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL pll_phe_if_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
-- Retrieval info: CBX_MODULE_PREFIX: ON
|
||||
|
|
@ -1 +0,0 @@
|
|||
set tool_name "ModelSim-Altera (VHDL)"
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,193 +0,0 @@
|
|||
/* Module description
|
||||
Behevaiour model of the TMP275 temperature sensor
|
||||
|
||||
All the registers are 16 bit apart from the config register which is 8bit
|
||||
|
||||
rd and wr signals are defined from the Master point of view. A rd signal means the master is reading from a FPGA register
|
||||
wr_i2C_div shows write 8bit data pack from the slave
|
||||
rd_i2c_div shows read 8bit data pack to the slave
|
||||
|
||||
|
||||
*/
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pei_register_pkg.all;
|
||||
|
||||
--add_out has been elminated. The I2C interface decodes write and read frame
|
||||
entity tmp275 is
|
||||
|
||||
GENERIC(
|
||||
--Paramaters for the debugger
|
||||
ADDRESS_TMP275 : integer range 0 to 255 :=0
|
||||
);
|
||||
|
||||
PORT(
|
||||
|
||||
clk : IN STD_LOGIC;
|
||||
rst_n : IN STD_LOGIC;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
sda_out : out std_logic;
|
||||
reg_temp : IN STD_LOGIC_VECTOR(15 downto 0);
|
||||
conf_tmp275 : OUT STD_LOGIC_VECTOR(15 downto 0);
|
||||
Tlow_tmp275 : OUT STD_LOGIC_VECTOR(15 downto 0);
|
||||
Thigh_tmp275 : OUT STD_LOGIC_VECTOR(15 downto 0)
|
||||
|
||||
);
|
||||
end entity tmp275;
|
||||
|
||||
architecture struct of tmp275 is
|
||||
|
||||
|
||||
|
||||
component i2c_slv_simple_tmp275 -- Add reset signal
|
||||
generic(
|
||||
DEVICE_ADDRESS : integer range 0 to 255);
|
||||
|
||||
port(
|
||||
|
||||
|
||||
clk : in std_logic;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
sda_out : out std_logic;
|
||||
i2c_busy_out : out std_logic;
|
||||
add_out : out std_logic_vector(15 downto 0);
|
||||
wr_data_out : out std_logic_vector(7 downto 0);
|
||||
wr_en_out : out std_logic;
|
||||
rd_en_out : out std_logic;
|
||||
rd_data_in : in std_logic_vector(7 downto 0);
|
||||
rd_dv_in : in std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
|
||||
signal i2c_busy_out : std_logic;
|
||||
signal wr_i2c_div : std_logic;
|
||||
signal rd_i2c_div : std_logic;
|
||||
signal rd_en_out : std_logic;
|
||||
signal reg_tmp275 : std_logic_vector(15 downto 0);
|
||||
signal data_in : std_logic_vector(15 downto 0);
|
||||
signal temp_i : std_logic_vector(15 downto 0);
|
||||
signal wr_data_out : std_logic_vector(7 downto 0);
|
||||
signal rd_data_in : std_logic_vector(7 downto 0);
|
||||
signal bct_rd, bct_wr : std_logic_vector(7 downto 0);
|
||||
signal ptr_tmp275 : std_logic_vector(7 downto 0);
|
||||
signal ptr_tmp275_i : integer;
|
||||
signal data_out, data_out_i : std_logic_vector(15 downto 0);
|
||||
signal i2c_busy_out_d1 : std_logic;
|
||||
begin
|
||||
--ADD generic I2C address
|
||||
|
||||
i2c_slv_simple_tmp275_isnt: i2c_slv_simple_tmp275
|
||||
|
||||
generic map ( DEVICE_ADDRESS => ADDRESS_TMP275 )
|
||||
|
||||
port map(
|
||||
|
||||
clk => clk, scl_in => scl_in, scl_out => scl_out, sda_in => sda_in, sda_out => sda_out, i2c_busy_out => i2c_busy_out, wr_data_out => wr_data_out,
|
||||
wr_en_out => wr_i2c_div, rd_en_out => rd_en_out, rd_data_in => rd_data_in, rd_dv_in => rd_i2c_div, add_out => open
|
||||
);
|
||||
|
||||
|
||||
DATA_FRAME_P : process(clk,rst_n) -- counters and shifters
|
||||
|
||||
begin
|
||||
if (rst_n ='0') then
|
||||
|
||||
bct_rd <= (others => '0');
|
||||
bct_wr <= (others => '0');
|
||||
ptr_tmp275 <= (others => '0');
|
||||
reg_tmp275 <= (others => '0');
|
||||
data_out <= (others => '0');
|
||||
--ptr <= (others => '0');
|
||||
data_in <= (others => '0');
|
||||
rd_data_in <= (others => '0');
|
||||
|
||||
elsif (clk'event and clk='1') then
|
||||
|
||||
rd_i2c_div <= rd_en_out ; -- this signal should be only valid for clock
|
||||
|
||||
if (i2c_busy_out ='1' and wr_i2C_div='1') then
|
||||
bct_wr <= std_logic_vector(unsigned(bct_wr)+1); --Master writes
|
||||
if (bct_wr = x"00") then -- First Frame is a pointer
|
||||
ptr_tmp275 <= wr_data_out;
|
||||
else
|
||||
data_in <= data_in( 7 downto 0) & wr_data_out; --Shift to the left MSB byte first. Data MSB aligned
|
||||
end if;
|
||||
elsif (i2c_busy_out ='0') then
|
||||
bct_wr <= (others => '0');
|
||||
|
||||
end if;
|
||||
|
||||
if (i2c_busy_out = '1' and rd_en_out = '1'and rd_i2c_div ='1') then
|
||||
bct_rd <= std_logic_vector(unsigned(bct_rd)+1); -- The counter is not necessary
|
||||
rd_data_in <= data_out(15 downto 8);
|
||||
data_out <= data_out(7 downto 0) & X"00";
|
||||
|
||||
elsif (i2c_busy_out = '0') then
|
||||
bct_rd <= (others => '0');
|
||||
data_out <= data_out_i;
|
||||
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
|
||||
if (bct_wr = x"03") then
|
||||
reg_tmp275 <= data_in;
|
||||
--ptr_tmp275 <= ptr;
|
||||
end if;
|
||||
|
||||
end if;
|
||||
|
||||
|
||||
end process;
|
||||
|
||||
ptr_tmp275_i <= to_integer(unsigned(ptr_tmp275));
|
||||
|
||||
TMP275_WRITE_P : process(clk,rst_n)
|
||||
begin
|
||||
if (rst_n='0') then
|
||||
temp_i <= (others => '0');
|
||||
conf_tmp275 <= (others => '0');
|
||||
Tlow_tmp275 <= (others => '0');
|
||||
Thigh_tmp275 <= (others =>'0');
|
||||
|
||||
elsif (clk'event and clk='1') then
|
||||
case ptr_tmp275_i is
|
||||
when TemperatureRegisterAddress => temp_i <= reg_temp; -- This register is written by the serial interface
|
||||
when ConfigRegisterAddress => conf_tmp275 <= reg_tmp275(15 downto 8) & "00000000"; -- R/W Configuration register
|
||||
when HysteresisRegisterAddressLow => Tlow_tmp275 <= reg_tmp275; -- R/W Tlow register
|
||||
when HysteresisRegisterAddressHigh => Thigh_tmp275 <= reg_tmp275; -- R/W T high register
|
||||
when others => NULL;
|
||||
end case;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
TMP275_READ_P : process(clk,rst_n)
|
||||
begin
|
||||
if rst_n='0' then
|
||||
data_out_i <= (others => '0');
|
||||
elsif (clk'event and clk='1') then
|
||||
case ptr_tmp275_i is
|
||||
when TemperatureRegisterAddress => data_out_i <= temp_i; --Temperature Regisyer R only, default
|
||||
when ConfigRegisterAddress => data_out_i <= conf_tmp275; -- R/W Configuration register
|
||||
when HysteresisRegisterAddressLow => data_out_i <= Tlow_tmp275; -- R/W Tlow register
|
||||
when HysteresisRegisterAddressHigh => data_out_i <= Thigh_tmp275; -- R/W T high register
|
||||
when others => NULL;
|
||||
end case;
|
||||
|
||||
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
--status_tmp275 <= temp_i;
|
||||
|
||||
end architecture;
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief PEI D3000 head data processor
|
||||
--!
|
||||
--! @details See
|
||||
--! https://congis.atlassian.net/wiki/spaces/HMBSED3000/pages/153157992473/PEI+D3000+Design+Documentation
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li lvds_clk_in : LVDS clock, nominally 350MHz (PEI interface)
|
||||
--!
|
||||
--! @b Interfaces:
|
||||
--! rx_data : Deserialised LVDS to head
|
||||
--! rx_clk : Deserialised LVDS clk
|
||||
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li Single clock only
|
||||
--!
|
||||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Dave Steele
|
||||
--! @copyright (c) 2020 Global Inkjet Systems
|
||||
--! @date 2022-08-02
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pkg_functions_pei.all;
|
||||
|
||||
entity head_data_proc is
|
||||
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;
|
||||
latch_pulse : in std_logic; -- indicates signature is valid and a latch has occurred
|
||||
|
||||
--decoded outputs
|
||||
signature : out std_logic_vector (31 downto 0)
|
||||
|
||||
|
||||
);
|
||||
end entity head_data_proc;
|
||||
|
||||
architecture struct of head_data_proc is
|
||||
|
||||
component head_datain
|
||||
port
|
||||
(
|
||||
datain : in std_logic_vector (7 DOWNTO 0);
|
||||
aclr : in std_logic;
|
||||
inclock : in std_logic ;
|
||||
dataout_h : out std_logic_vector (7 DOWNTO 0);
|
||||
dataout_l : out std_logic_vector (7 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
|
||||
type array_t is array (1 downto 0) of std_logic_vector (7 downto 0);
|
||||
signal data_sign : std_logic_vector (7 downto 0);
|
||||
signal sigLatched : std_logic_vector (31 downto 0);
|
||||
signal sig : std_logic_vector (31 downto 0);
|
||||
signal latch_pulse_int : std_logic_vector (1 downto 0);
|
||||
signal reset_sig : std_logic;
|
||||
signal rx_data_h_int : array_t;
|
||||
signal rx_data_l_int : array_t;
|
||||
signal pulse_sync_neg : 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
|
||||
|
||||
|
||||
cdc_data_p : process(rx_clk)
|
||||
|
||||
begin
|
||||
if falling_edge(rx_clk) then --clocking of falling edge to use all clock period. Data l and h changes on rising edge
|
||||
|
||||
rx_data_h_int(0) <= rx_data; -- delays left from a previous version
|
||||
rx_data_h_int(1) <= rx_data_h_int(0);
|
||||
pulse_sync_neg <= not pulse_sync_neg;
|
||||
|
||||
end if;
|
||||
|
||||
if (rst_n ='0' or reset_sig ='1') then
|
||||
rx_data_h_int <= (others => (others =>'0'));
|
||||
pulse_sync_neg <='0';
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
cdc_head_clk: process(clk_sys) -- printhead clock is more than 5 time slower than clk_sys
|
||||
begin
|
||||
if rising_edge(clk_sys) then
|
||||
|
||||
pulse_sync_sys_d1 <= pulse_sync_neg;
|
||||
pulse_sync_sys_d2 <= pulse_sync_sys_d1;
|
||||
|
||||
latch_pulse_int(0) <= latch_pulse;
|
||||
latch_pulse_int(1) <= latch_pulse_int(0);
|
||||
|
||||
data_pulse <='0';
|
||||
if ((pulse_sync_sys_d1 xor pulse_sync_sys_d2)='1') then
|
||||
data_sign <= rx_data_h_int(0);
|
||||
data_pulse <='1';
|
||||
end if;
|
||||
|
||||
reset_sig <='0';
|
||||
if (latch_pulse_int(0)='0' and latch_pulse_int(1) ='1') then
|
||||
reset_sig <='1';
|
||||
end if;
|
||||
|
||||
if (rst_n= '0' or cmd_reset = '1') then
|
||||
data_sign <= (others => '0');
|
||||
reset_sig <='0';
|
||||
end if;
|
||||
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
SIGNATURE_P : process(all)
|
||||
variable fb :std_logic;
|
||||
begin
|
||||
if (clk_sys'event and clk_sys = '1') then
|
||||
if (reset_sig = '1') then
|
||||
sigLatched <= sig;
|
||||
sig <= (others => '0');
|
||||
fb := '0';
|
||||
elsif (data_pulse = '1' ) then
|
||||
fb := sig(30) xor sig(7);
|
||||
sig <= (sig(30 downto 0) & fb) xor (x"000000" & data_sign); --32 bit a zero has been padded to the left
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if (rst_n = '0' or cmd_reset ='1') then
|
||||
sigLatched <= (others => '0');
|
||||
sig <= (others => '0');
|
||||
fb := '0';
|
||||
end if;
|
||||
end process;
|
||||
|
||||
signature <= sigLatched;
|
||||
end architecture struct;
|
||||
|
|
@ -1,264 +0,0 @@
|
|||
/*
|
||||
|
||||
Module description
|
||||
|
||||
Control block of mcp4631 (digital potentiometer)
|
||||
|
||||
|
||||
@author Dave Rodriguez
|
||||
@copyright (c) 2020 Global Inkjet Systems
|
||||
@date 2023-01-04
|
||||
|
||||
-- The MCP4631 uses the I2C protocol to control its functionality. It has a small set of register that set the position of the wiper and a satus registers to report configuration and state
|
||||
|
||||
|
||||
*/
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pei_register_pkg.all;
|
||||
|
||||
--add_out has been elminated. The I2C interface decodes write and read frame
|
||||
entity mcp4631 is
|
||||
|
||||
GENERIC(
|
||||
--Paramaters for the debugger
|
||||
ADDRESS_MCP4631 : integer range 0 to 255 :=0
|
||||
);
|
||||
|
||||
PORT(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
sda_out : out std_logic;
|
||||
start_w_i2c : in std_logic;
|
||||
start_r_i2c : in std_logic;
|
||||
i2c_master_rd_dv : out std_logic;
|
||||
i2c_mcp4631_busy : out std_logic;
|
||||
i2c_address : in std_logic_vector(7 downto 0);
|
||||
wr_nbytes : in std_logic_vector(15 downto 0);
|
||||
reg_mcp4631_in : in std_logic_vector(15 downto 0);
|
||||
reg_mcp4631_out : out std_logic_vector(15 downto 0)
|
||||
|
||||
);
|
||||
end entity mcp4631;
|
||||
|
||||
architecture struct of mcp4631 is
|
||||
|
||||
component simple_i2c_masterPEI
|
||||
generic ( CLOCK_DIVIDER : std_logic_vector(9 downto 0));
|
||||
port (
|
||||
clk : IN std_logic;
|
||||
scl_in : IN std_logic;
|
||||
scl_out : OUT std_logic;
|
||||
sda_in : IN std_logic;
|
||||
sda_out : OUT std_logic;
|
||||
cmd_wr_cnt_in : IN std_logic_vector(7 downto 0);
|
||||
cmd_rd_cnt_in : IN std_logic_vector(7 downto 0);
|
||||
wr_data_in : IN std_logic_vector(7 downto 0);
|
||||
wr_dv_in : IN std_logic;
|
||||
rdy_for_data_out : OUT std_logic;
|
||||
rdy_for_cmd_out : OUT std_logic;
|
||||
dv_out : OUT std_logic;
|
||||
rd_data_out : OUT std_logic_vector(7 downto 0);
|
||||
error : OUT std_logic
|
||||
|
||||
);
|
||||
end component;
|
||||
|
||||
type i2c_state_machine is (IDLE, FRAME_DATA_W, FRAME_DATA_R, WAIT_STOP);
|
||||
signal I2c_master_sate : i2c_state_machine;
|
||||
signal sda_d1, sda_d2 : std_logic;
|
||||
signal i2c_stop : std_logic;
|
||||
signal wr_i2c_mcp4631 : std_logic;
|
||||
signal tx_dv : std_logic;
|
||||
signal dv_out : std_logic;
|
||||
signal rd_cmd : std_logic;
|
||||
signal i2c_error : std_logic;
|
||||
signal frame_cnt_w : std_logic_vector(7 downto 0);
|
||||
signal frame_cnt_r : std_logic_vector(7 downto 0);
|
||||
signal wr_data_in : std_logic_vector(7 downto 0);
|
||||
signal rd_i2c_data : std_logic_vector(7 downto 0);
|
||||
signal count_frame : std_logic_vector(7 downto 0);
|
||||
signal reg_mcp4631_int : std_logic_vector(15 downto 0);
|
||||
|
||||
|
||||
|
||||
|
||||
begin
|
||||
|
||||
--ADD generic I2C address
|
||||
frame_cnt_w <= wr_nbytes(7 downto 0);
|
||||
i2c_masterPEI_inst : simple_i2c_masterPEI
|
||||
generic map
|
||||
(
|
||||
-- CLK_FREQ_HZ => CLK_FREQ_MHZ * 1000000,
|
||||
--BUS_FREQ_HZ => I2C_FREQ_KHZ * 1000
|
||||
CLOCK_DIVIDER => std_logic_vector(to_unsigned(500,10))
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
--rst_n => rst_n,
|
||||
scl_in => scl_in,
|
||||
scl_out => scl_out,
|
||||
sda_in => sda_in,
|
||||
sda_out => sda_out,
|
||||
cmd_wr_cnt_in => frame_cnt_w, -- write frameAddress+command+data. std_logic_vector(to_unsigned(3,8))
|
||||
cmd_rd_cnt_in => frame_cnt_r, -- the read frame is fixed to i2caddress+2xdataframe.
|
||||
wr_data_in => wr_data_in, -- data to be written.
|
||||
wr_dv_in => wr_i2c_mcp4631, -- change state from Idle to Start.
|
||||
rdy_for_data_out => tx_dv, -- It goes high during the SLV_ACK, indicates the end of the transaction.
|
||||
rdy_for_cmd_out => rd_cmd, -- Flag showing I2C is idle state. Master is in Idle state when this flag is high.
|
||||
dv_out => dv_out, -- rd_dv ready data valid.
|
||||
rd_data_out => rd_i2c_data, -- data out.
|
||||
error => i2c_error -- i2c error.
|
||||
);
|
||||
|
||||
--Address_mcp4631<= ADDRESS_MCP4631; --8 bit as 0 (change to "1" for read)
|
||||
|
||||
|
||||
|
||||
I2C_process: process(clk, rst_n)
|
||||
|
||||
begin
|
||||
if (rst_n='0' or i2c_error='1') then
|
||||
|
||||
wr_data_in <= (others => '0');
|
||||
I2c_master_sate <= IDLE;
|
||||
wr_i2c_mcp4631 <='0';
|
||||
count_frame <= (others => '0');
|
||||
i2c_master_rd_dv <= '0';
|
||||
i2c_mcp4631_busy <= '0';
|
||||
reg_mcp4631_out <= (others => '0');
|
||||
reg_mcp4631_int <= (others => '0');
|
||||
--frame_cnt_w <= (others => '0');
|
||||
|
||||
elsif (clk'event and clk='1') then
|
||||
|
||||
case I2c_master_sate is
|
||||
|
||||
when IDLE =>
|
||||
reg_mcp4631_out <= (others => '0');
|
||||
count_frame <= (others => '0');
|
||||
i2c_mcp4631_busy <= '0';
|
||||
i2c_master_rd_dv <= '0';
|
||||
|
||||
if (start_w_i2c = '1' and rd_cmd = '1') then
|
||||
I2c_master_sate <= FRAME_DATA_W;
|
||||
wr_data_in <= i2c_address;
|
||||
wr_i2c_mcp4631 <='1';
|
||||
reg_mcp4631_int <= reg_mcp4631_in;
|
||||
--frame_cnt_w <= std_logic_vector(to_unsigned(3,8)); --Maybe 4 Address+Command+(2*DataFrame)
|
||||
i2c_mcp4631_busy <= '1';
|
||||
elsif (start_r_i2c = '1' and rd_cmd = '1') then
|
||||
I2c_master_sate <= FRAME_DATA_R;
|
||||
wr_data_in <= i2c_address(7 downto 1) & '1';
|
||||
wr_i2c_mcp4631 <='1';
|
||||
frame_cnt_r <= std_logic_vector(to_unsigned(3,8)); --Maybe 4 Address+Command+(2*DataFrame)
|
||||
i2c_mcp4631_busy <= '1';
|
||||
else
|
||||
I2c_master_sate <= IDLE;
|
||||
wr_i2c_mcp4631 <='0';
|
||||
end if;
|
||||
|
||||
when FRAME_DATA_W => --ONLY 2 data frames. The STOP condition should stop
|
||||
|
||||
wr_i2c_mcp4631 <= '0';
|
||||
|
||||
if (i2c_stop = '1'and dv_out='0') then
|
||||
I2c_master_sate <= IDLE;
|
||||
else
|
||||
I2c_master_sate <= FRAME_DATA_W;
|
||||
end if;
|
||||
|
||||
if (tx_dv='1') then
|
||||
count_frame <= std_logic_vector(unsigned(count_frame)+1);
|
||||
if ( unsigned(count_frame) = unsigned(frame_cnt_w) ) then
|
||||
I2c_master_sate <= WAIT_STOP;
|
||||
else
|
||||
I2c_master_sate <= FRAME_DATA_W;
|
||||
reg_mcp4631_int(15 downto 8) <= reg_mcp4631_int(7 downto 0);
|
||||
wr_data_in <= reg_mcp4631_int(15 downto 8); --MSB first
|
||||
end if;
|
||||
end if;
|
||||
|
||||
when FRAME_DATA_R =>
|
||||
wr_i2c_mcp4631 <='0';
|
||||
i2c_mcp4631_busy <= '1';
|
||||
|
||||
if (i2c_stop = '1' and dv_out='0')then
|
||||
I2c_master_sate <= IDLE;
|
||||
--else
|
||||
--I2c_master_sate <= FRAME_DATA_R;
|
||||
end if;
|
||||
if (dv_out='1') then
|
||||
reg_mcp4631_out(7 downto 0) <= rd_i2c_data; --MSB first
|
||||
reg_mcp4631_out(15 downto 8) <= reg_mcp4631_out(7 downto 0);
|
||||
count_frame <= std_logic_vector(unsigned(count_frame)+1);
|
||||
if (unsigned(count_frame) = 1) then
|
||||
I2c_master_sate <= WAIT_STOP;
|
||||
i2c_master_rd_dv <='1';
|
||||
else
|
||||
I2c_master_sate <= FRAME_DATA_R;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
|
||||
when WAIT_STOP =>
|
||||
wr_i2c_mcp4631 <= '0';
|
||||
i2c_mcp4631_busy <= '1';
|
||||
if (i2c_stop = '1') then
|
||||
I2c_master_sate <= IDLE;
|
||||
reg_mcp4631_int <= (others => '0');
|
||||
else
|
||||
I2c_master_sate <= WAIT_STOP;
|
||||
end if;
|
||||
|
||||
|
||||
when others =>
|
||||
wr_i2c_mcp4631 <= '0';
|
||||
i2c_master_rd_dv <='0';
|
||||
i2c_mcp4631_busy <= '0';
|
||||
|
||||
end case;
|
||||
end if;
|
||||
|
||||
|
||||
end process;
|
||||
|
||||
|
||||
i2c_stop_p: process(clk, rst_n)--detects stop condition
|
||||
|
||||
begin
|
||||
if (rst_n = '0') then
|
||||
|
||||
i2c_stop <= '0';
|
||||
|
||||
elsif (clk'event and clk='1') then
|
||||
|
||||
sda_d1 <= sda_out;
|
||||
sda_d2 <= sda_d1;
|
||||
|
||||
i2c_stop <= '0';
|
||||
if (sda_d2 = '0' and sda_d1 = '1' and scl_out='1') then
|
||||
i2c_stop <= '1';
|
||||
end if;
|
||||
|
||||
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
--add re-start condition
|
||||
|
||||
|
||||
|
||||
end architecture struct;
|
||||
|
|
@ -1,941 +0,0 @@
|
|||
//----------------------------------------------------------------------------
|
||||
// Module Description
|
||||
//
|
||||
// This is a simple debug serial port, providing terminal access to an internal bus.
|
||||
// The port does not require a FIFO, as long as the UART Baud rate is significantly slower than the system clock (10:1 should be sufficient)
|
||||
// A full-duplex link is assumed.
|
||||
//
|
||||
// Supported commands are :
|
||||
// R 0xAA
|
||||
// W 0xAA 0xDDDDDDDD
|
||||
//
|
||||
// The serial port automatically inserts whitespaces, carriage returns, and "0x", so the text entered to perform a write
|
||||
// is "WAADDDDDDDD"
|
||||
//
|
||||
// Address and data width are determined at instantiaton through parameters. Valid range is 1 to 32
|
||||
//
|
||||
// Interface:
|
||||
// To UART
|
||||
// rx_dv shall be valid for 1 clock pulse
|
||||
// rx_data shall be valid when dv is high
|
||||
// tx_dv is valid for 1 clock pulse
|
||||
// tx_data is valid when tx_dv is high.
|
||||
// tx_dv shall not be asserted unless tx_rdy is asserted.
|
||||
// tx_busy is not used (this is a subset of tx_rdy).
|
||||
//
|
||||
// To System Bus
|
||||
// wr_en is asserted for 1 clock cycle
|
||||
// wr_data, add, src_id_out are valid when wr_en is asserted.
|
||||
// rd_en is asserted for 1 clock cycle (this allows interfacing to systems that support posted reads).
|
||||
// After rd_en is asserted, the unit waits for rd_dv to be valid. A timeout should probably be added to prevent hangs by reads to non-existent addresses.
|
||||
// src_id is provided in the interface to allow posted reads to be received out-of-order and be correctly routed.
|
||||
// Posted reads (and src_id) are not implemented in this version.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
// Revision Date Author Notes
|
||||
//
|
||||
// 01 22-02-2009 Gordon Leather First written
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
`resetall
|
||||
`timescale 1ns/1ps
|
||||
module pei_debug_serial_port_1 #(
|
||||
parameter ADDRESS_WIDTH = 8,
|
||||
parameter DATA_WIDTH = 32
|
||||
)(
|
||||
input wire clk,
|
||||
input wire tx_rdy_in,
|
||||
input wire tx_busy_in,
|
||||
output wire tx_en_out,
|
||||
output wire tx_dv_out,
|
||||
output wire [7:0] tx_data_out,
|
||||
input wire rx_err_in,
|
||||
input wire rx_dv_in,
|
||||
input wire [7:0] rx_data_in,
|
||||
output wire rx_en_out,
|
||||
output wire [ADDRESS_WIDTH-1:0] add_out,
|
||||
output wire [DATA_WIDTH-1:0] wr_data_out,
|
||||
output wire [5:0] src_id_out,
|
||||
output wire wr_en_out,
|
||||
output wire rd_en_out,
|
||||
input wire [DATA_WIDTH-1:0] rd_data_in, //Data fetch by FPGA after an a read request
|
||||
input wire [5:0] src_id_in,
|
||||
input wire rd_dv_in,
|
||||
input wire rd_32b_in
|
||||
);
|
||||
|
||||
// Address and Data character counts
|
||||
localparam ADDRESS_CHARS = ((ADDRESS_WIDTH + 3) / 4); // Ensure character count is a full nibble
|
||||
localparam DATA_CHARS = ((DATA_WIDTH + 3) / 4); // Ensure character count is a full nibble
|
||||
|
||||
|
||||
// ASCII definitions
|
||||
localparam ASCII_TAB = 8'h09;
|
||||
localparam ASCII_CR = 8'h0d;
|
||||
localparam ASCII_LF = 8'h0a;
|
||||
localparam ASCII_SPACE = 8'h20;
|
||||
localparam ASCII_DASH = 8'h2d;
|
||||
localparam ASCII_DOT = 8'h2e;
|
||||
localparam ASCII_0 = 8'h30;
|
||||
localparam ASCII_1 = 8'h31;
|
||||
localparam ASCII_2 = 8'h32;
|
||||
localparam ASCII_3 = 8'h33;
|
||||
localparam ASCII_4 = 8'h34;
|
||||
localparam ASCII_5 = 8'h35;
|
||||
localparam ASCII_6 = 8'h36;
|
||||
localparam ASCII_7 = 8'h37;
|
||||
localparam ASCII_8 = 8'h38;
|
||||
localparam ASCII_9 = 8'h39;
|
||||
localparam ASCII_GT = 8'h3e;
|
||||
localparam ASCII_A = 8'h41;
|
||||
localparam ASCII_B = 8'h42;
|
||||
localparam ASCII_C = 8'h43;
|
||||
localparam ASCII_D = 8'h44;
|
||||
localparam ASCII_E = 8'h45;
|
||||
localparam ASCII_F = 8'h46;
|
||||
localparam ASCII_G = 8'h47;
|
||||
localparam ASCII_H = 8'h48;
|
||||
localparam ASCII_I = 8'h49;
|
||||
localparam ASCII_J = 8'h4a;
|
||||
localparam ASCII_K = 8'h4b;
|
||||
localparam ASCII_L = 8'h4c;
|
||||
localparam ASCII_M = 8'h4d;
|
||||
localparam ASCII_N = 8'h4e;
|
||||
localparam ASCII_O = 8'h4f;
|
||||
localparam ASCII_P = 8'h50;
|
||||
localparam ASCII_Q = 8'h51;
|
||||
localparam ASCII_R = 8'h52;
|
||||
localparam ASCII_S = 8'h53;
|
||||
localparam ASCII_T = 8'h54;
|
||||
localparam ASCII_U = 8'h55;
|
||||
localparam ASCII_V = 8'h56;
|
||||
localparam ASCII_W = 8'h57;
|
||||
localparam ASCII_X = 8'h58;
|
||||
localparam ASCII_Y = 8'h59;
|
||||
localparam ASCII_Z = 8'h5a;
|
||||
localparam ASCII_a = 8'h61;
|
||||
localparam ASCII_b = 8'h62;
|
||||
localparam ASCII_c = 8'h63;
|
||||
localparam ASCII_d = 8'h64;
|
||||
localparam ASCII_e = 8'h65;
|
||||
localparam ASCII_f = 8'h66;
|
||||
localparam ASCII_g = 8'h67;
|
||||
localparam ASCII_h = 8'h68;
|
||||
localparam ASCII_i = 8'h69;
|
||||
localparam ASCII_j = 8'h6a;
|
||||
localparam ASCII_k = 8'h6b;
|
||||
localparam ASCII_l = 8'h6c;
|
||||
localparam ASCII_m = 8'h6d;
|
||||
localparam ASCII_n = 8'h6e;
|
||||
localparam ASCII_o = 8'h6f;
|
||||
localparam ASCII_p = 8'h70;
|
||||
localparam ASCII_q = 8'h71;
|
||||
localparam ASCII_r = 8'h72;
|
||||
localparam ASCII_s = 8'h73;
|
||||
localparam ASCII_t = 8'h74;
|
||||
localparam ASCII_u = 8'h75;
|
||||
localparam ASCII_v = 8'h76;
|
||||
localparam ASCII_w = 8'h77;
|
||||
localparam ASCII_x = 8'h78;
|
||||
localparam ASCII_y = 8'h79;
|
||||
localparam ASCII_z = 8'h7a;
|
||||
|
||||
|
||||
// String counts
|
||||
localparam WELCOME_LAST_CHAR = 17;
|
||||
localparam PROMPT_LAST_CHAR = 1;
|
||||
localparam ERR_LAST_CHAR = 7;
|
||||
localparam PRE_DATA_LAST_CHAR = 4;
|
||||
|
||||
// Timeouts
|
||||
localparam TIMEOUT_10MS = 20'd960000;
|
||||
|
||||
|
||||
// State machine states
|
||||
localparam RESET = 6'd0;
|
||||
localparam ERROR = 6'd1;
|
||||
localparam PROMPT = 6'd2;
|
||||
localparam IDLE = 6'd3;
|
||||
localparam PRE_DATA = 6'd4;
|
||||
localparam GET_ADD_7 = 6'd5;
|
||||
localparam GET_ADD_6 = 6'd6;
|
||||
localparam GET_ADD_5 = 6'd7;
|
||||
localparam GET_ADD_4 = 6'd8;
|
||||
localparam GET_ADD_3 = 6'd9;
|
||||
localparam GET_ADD_2 = 6'd10;
|
||||
localparam GET_ADD_1 = 6'd11;
|
||||
localparam GET_ADD_0 = 6'd12; // GET ADD States must be sequential, descending from GET_ADD_7
|
||||
localparam GET_DATA_7 = 6'd13;
|
||||
localparam GET_DATA_6 = 6'd14;
|
||||
localparam GET_DATA_5 = 6'd15;
|
||||
localparam GET_DATA_4 = 6'd16;
|
||||
localparam GET_DATA_3 = 6'd17;
|
||||
localparam GET_DATA_2 = 6'd18;
|
||||
localparam GET_DATA_1 = 6'd19;
|
||||
localparam GET_DATA_0 = 6'd20; // GET DATA States must be sequential, descending from GET_DATA_7
|
||||
localparam WRITE = 6'd21;
|
||||
localparam WRITE_1 = 6'd22;
|
||||
localparam READ = 6'd23;
|
||||
localparam READ_1 = 6'd24;
|
||||
localparam SEND_ADD_7 = 6'd25;
|
||||
localparam SEND_ADD_6 = 6'd26;
|
||||
localparam SEND_ADD_5 = 6'd27;
|
||||
localparam SEND_ADD_4 = 6'd28;
|
||||
localparam SEND_ADD_3 = 6'd29;
|
||||
localparam SEND_ADD_2 = 6'd30;
|
||||
localparam SEND_ADD_1 = 6'd31;
|
||||
localparam SEND_ADD_0 = 6'd32; // SEND ADD States must be sequential, descending from GET_ADD_7
|
||||
localparam SEND_DATA_7 = 6'd33;
|
||||
localparam SEND_DATA_6 = 6'd34;
|
||||
localparam SEND_DATA_5 = 6'd35;
|
||||
localparam SEND_DATA_4 = 6'd36;
|
||||
localparam SEND_DATA_3 = 6'd37;
|
||||
localparam SEND_DATA_2 = 6'd38;
|
||||
localparam SEND_DATA_1 = 6'd39;
|
||||
localparam SEND_DATA_0 = 6'd40; // SEND DATA States must be sequential, descending from GET_DATA_7
|
||||
|
||||
// Derived states, based on Address and Data size
|
||||
localparam GET_ADD = (GET_ADD_7 + 8 - ADDRESS_CHARS );
|
||||
localparam GET_DATA = (GET_DATA_7 + 8 - DATA_CHARS );
|
||||
localparam SEND_ADD = (SEND_ADD_7 + 8 - ADDRESS_CHARS );
|
||||
localparam SEND_DATA = (SEND_DATA_7 + 8 - DATA_CHARS );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Internal signals
|
||||
reg [31:0] address = 32'd0;
|
||||
reg [31:0] data = 32'd0;
|
||||
reg [31:0] data_new = 32'd0;
|
||||
reg data_rdy = 1'b0;
|
||||
|
||||
reg mode_rnw = 1'b0;
|
||||
reg rd_en = 1'b0;
|
||||
reg wr_en = 1'b0;
|
||||
|
||||
reg [5:0] state = RESET;
|
||||
reg [5:0] next_state = RESET;
|
||||
|
||||
reg [7:0] welcome_char; // Not assigned a startup value as combinatorial
|
||||
reg [7:0] prompt_char; // Not assigned a startup value as combinatorial
|
||||
reg [7:0] err_char; // Not assigned a startup value as combinatorial
|
||||
reg [7:0] pre_data_char; // Not assigned a startup value as combinatorial
|
||||
reg [7:0] Append;
|
||||
reg [7:0] idx = 8'd0;
|
||||
|
||||
reg [7:0] tx_data = 0;
|
||||
reg tx_dv = 1'b0;
|
||||
reg rx_en = 1'b1;
|
||||
|
||||
wire char_A_F;
|
||||
wire char_a_f;
|
||||
wire char_0_9;
|
||||
wire char_hex;
|
||||
|
||||
wire [7:0] hex_A_F;
|
||||
wire [7:0] hex_a_f;
|
||||
wire [7:0] hex_0_9;
|
||||
|
||||
// Rx "FIFO" Signals
|
||||
wire [8:0] rx_fifo_data;
|
||||
reg [8:0] rx_fifo_q = 9'd0;
|
||||
reg rx_fifo_empty_int = 1'b1;
|
||||
wire rx_fifo_empty;
|
||||
reg rx_fifo_rd_ack;
|
||||
wire [7:0] rx_data_byte;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Output assignments
|
||||
assign tx_data_out = tx_data;
|
||||
assign tx_dv_out = tx_dv;
|
||||
assign tx_en_out = 1'b1; // Permanently enable transmitter - no good for RS-485 link
|
||||
assign rx_en_out = rx_en; // Permanently enable receiver
|
||||
|
||||
assign add_out = address[ADDRESS_WIDTH-1 : 0];
|
||||
assign wr_data_out = data_new[DATA_WIDTH-1 : 0];
|
||||
assign wr_en_out = wr_en;
|
||||
assign rd_en_out = rd_en;
|
||||
|
||||
assign src_id_out = 6'd0; // This is used to identify returns from posted reads. Not implemented in this instance.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Main state machine
|
||||
always @(posedge clk)
|
||||
begin
|
||||
case (state)
|
||||
RESET :
|
||||
begin
|
||||
if (state==RESET)
|
||||
begin
|
||||
state <= IDLE; // Change implemented by DR to move FSM away from idle for simulation
|
||||
rx_en <= 1'b1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
tx_dv <= tx_rdy_in;
|
||||
tx_data <= welcome_char;
|
||||
rx_fifo_rd_ack <= 1'b0;
|
||||
|
||||
if (tx_rdy_in)
|
||||
begin
|
||||
if (idx == WELCOME_LAST_CHAR) idx <= 8'd0;
|
||||
else idx <= idx + 8'd1;
|
||||
|
||||
if (idx == WELCOME_LAST_CHAR) state <= PROMPT;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERROR :
|
||||
begin
|
||||
|
||||
tx_dv <= tx_rdy_in;
|
||||
tx_data <= err_char;
|
||||
rx_fifo_rd_ack <= 1'b0;
|
||||
|
||||
if (tx_rdy_in)
|
||||
begin
|
||||
if (idx == ERR_LAST_CHAR) idx <= 8'd0;
|
||||
else idx <= idx + 8'd1;
|
||||
|
||||
if (idx == ERR_LAST_CHAR) state <= PROMPT;
|
||||
end
|
||||
end
|
||||
|
||||
PROMPT :
|
||||
begin
|
||||
|
||||
tx_dv <= tx_rdy_in;
|
||||
tx_data <= Append;
|
||||
rx_fifo_rd_ack <= 1'b0;
|
||||
|
||||
if (tx_rdy_in)
|
||||
begin
|
||||
if (idx == PROMPT_LAST_CHAR) idx <= 8'd0;
|
||||
else idx <= idx + 8'd1;
|
||||
|
||||
if (idx == PROMPT_LAST_CHAR) state <= IDLE;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
IDLE :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
rx_en <= 1'b1;
|
||||
// Set idx to send shortened string for Read and Writes
|
||||
if ( (rx_data_byte == ASCII_R) | (rx_data_byte == ASCII_r)
|
||||
| (rx_data_byte == ASCII_W) | (rx_data_byte == ASCII_w)) idx <= 8'd0; // updated by DR it was set to idx <= 2
|
||||
else begin
|
||||
idx <= 8'd0;
|
||||
state <= IDLE; //modified by DR
|
||||
end
|
||||
|
||||
// Select next state and mode
|
||||
|
||||
// Requires data before changing state
|
||||
if(rx_dv_in || data_rdy) //rx_en is zero when returns from READ or WRITE states. There data
|
||||
begin
|
||||
data_rdy <= 1'b0;
|
||||
address <= 32'd0; // reset address and data
|
||||
data <= 32'd0;
|
||||
if (((rx_data_byte == ASCII_W) | (rx_data_byte == ASCII_w)) |( (rx_data_byte == ASCII_R) | (rx_data_byte == ASCII_r) )) //state <= PRE_DATA; modified by DR
|
||||
begin
|
||||
mode_rnw <= ((rx_data_byte == ASCII_R) | (rx_data_byte == ASCII_r));
|
||||
state <= GET_ADD;
|
||||
|
||||
end
|
||||
else state <= ERROR;
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
PRE_DATA :
|
||||
begin
|
||||
|
||||
tx_dv <= tx_rdy_in;
|
||||
tx_data <= pre_data_char;
|
||||
rx_fifo_rd_ack <= 1'b0;
|
||||
|
||||
state <= next_state; // moified by DR
|
||||
end
|
||||
|
||||
GET_ADD_7 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[31:28] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[31:28] <= hex_a_f[3:0];
|
||||
else address[31:28] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_6;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_6 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[27:24] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[27:24] <= hex_a_f[3:0];
|
||||
else address[27:24] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_5;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_5 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[23:20] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[23:20] <= hex_a_f[3:0];
|
||||
else address[23:20] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_4;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_4 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[19:16] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[19:16] <= hex_a_f[3:0];
|
||||
else address[19:16] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_3;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_3 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[15:12] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[15:12] <= hex_a_f[3:0];
|
||||
else address[15:12] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_2;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_2 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[11:8] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[11:8] <= hex_a_f[3:0];
|
||||
else address[11:8] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_1;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_1 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[7:4] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[7:4] <= hex_a_f[3:0];
|
||||
else address[7:4] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_ADD_0;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_ADD_0 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) address[3:0] <= hex_A_F[3:0];
|
||||
else if (char_a_f) address[3:0] <= hex_a_f[3:0];
|
||||
else address[3:0] <= hex_0_9[3:0];
|
||||
if (mode_rnw) state <= READ;
|
||||
else if (char_hex) state <= GET_DATA; //state <= PRE_DATA; modified by DR
|
||||
else state <= ERROR;
|
||||
|
||||
if (char_hex & ~mode_rnw) idx <= 8'd0; // Don't print extra tabs unless in read mode
|
||||
else idx <= 8'd0;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_7 :
|
||||
begin
|
||||
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[31:28] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[31:28] <= hex_a_f[3:0];
|
||||
else data[31:28] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_6;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_6 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[27:24] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[27:24] <= hex_a_f[3:0];
|
||||
else data[27:24] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_5;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_5 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[23:20] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[23:20] <= hex_a_f[3:0];
|
||||
else data[23:20] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_4;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_4 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[19:16] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[19:16] <= hex_a_f[3:0];
|
||||
else data[19:16] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_3;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_3 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[15:12] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[15:12] <= hex_a_f[3:0];
|
||||
else data[15:12] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_2;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_2 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[11:8] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[11:8] <= hex_a_f[3:0];
|
||||
else data[11:8] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_1;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_1 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
if (char_A_F) data[7:4] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[7:4] <= hex_a_f[3:0];
|
||||
else data[7:4] <= hex_0_9[3:0];
|
||||
|
||||
if (char_hex) state <= GET_DATA_0;
|
||||
else state <= ERROR;
|
||||
end
|
||||
end
|
||||
|
||||
GET_DATA_0 :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
if(rx_dv_in)
|
||||
begin
|
||||
rx_en <= 1'b0;
|
||||
data_rdy <= 1'b0;
|
||||
if (char_A_F) data[3:0] <= hex_A_F[3:0];
|
||||
else if (char_a_f) data[3:0] <= hex_a_f[3:0];
|
||||
else data[3:0] <= hex_0_9[3:0];
|
||||
if (char_hex)
|
||||
begin
|
||||
state <= WRITE; //state <= PRE_DATA; Modified by DR
|
||||
|
||||
|
||||
end
|
||||
else state <= ERROR;
|
||||
|
||||
next_state <= WRITE;
|
||||
|
||||
if (char_hex) idx <= 8'd0; // Don't print extra tabs from here
|
||||
else idx <= 8'd0;
|
||||
end
|
||||
end
|
||||
|
||||
WRITE :
|
||||
begin
|
||||
tx_dv <= 1'b0;
|
||||
rx_en <= 1'b0;
|
||||
wr_en <= 1'b1;
|
||||
state <= WRITE_1;
|
||||
data_new <= data;
|
||||
|
||||
end
|
||||
|
||||
WRITE_1 :
|
||||
begin
|
||||
rx_en <= 1'b0;
|
||||
wr_en <= 1'b0;
|
||||
state <= IDLE;
|
||||
if(rx_dv_in) data_rdy <= 1'b1;
|
||||
end
|
||||
|
||||
READ :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
rx_fifo_rd_ack <= 1'b0;
|
||||
tx_dv <= 1'b0;
|
||||
rd_en <= 1'b1;
|
||||
state <= READ_1;
|
||||
end
|
||||
|
||||
READ_1 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
rd_en <= 1'b0;
|
||||
data <= rd_data_in;
|
||||
if (rd_32b_in)
|
||||
state <= SEND_DATA_7;
|
||||
else
|
||||
state <= SEND_DATA_3;
|
||||
end
|
||||
end
|
||||
|
||||
SEND_ADD_7 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (address[31:28] > 4'd9) tx_data <= {4'd0,address[31:28]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[31:28]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_6;
|
||||
end
|
||||
|
||||
SEND_ADD_6 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (address[27:24] > 4'd9) tx_data <= {4'd0,address[27:24]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[27:24]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_5;
|
||||
end
|
||||
|
||||
SEND_ADD_5 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (address[23:20] > 4'd9) tx_data <= {4'd0,address[23:20]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[23:20]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_4;
|
||||
end
|
||||
|
||||
SEND_ADD_4 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (address[19:16] > 4'd9) tx_data <= {4'd0,address[19:16]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[19:16]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_3;
|
||||
end
|
||||
|
||||
SEND_ADD_3 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (address[15:12] > 4'd9) tx_data <= {4'd0,address[15:12]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[15:12]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_2;
|
||||
end
|
||||
|
||||
SEND_ADD_2 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (address[11:8] > 4'd9) tx_data <= {4'd0,address[11:8]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[11:8]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_1;
|
||||
end
|
||||
|
||||
SEND_ADD_1 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (address[7:4] > 4'd9) tx_data <= {4'd0,address[7:4]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[7:4]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_ADD_0;
|
||||
end
|
||||
|
||||
SEND_ADD_0 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (address[3:0] > 4'd9) tx_data <= {4'd0,address[3:0]} + 8'h37;
|
||||
else tx_data <= {4'd0,address[3:0]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA;
|
||||
idx <= 0; // Don't print extra tabs
|
||||
end
|
||||
|
||||
SEND_DATA_7 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[31:28] > 4'd9) tx_data <= {4'd0,data[31:28]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[31:28]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_6;
|
||||
end
|
||||
|
||||
SEND_DATA_6 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[27:24] > 4'd9) tx_data <= {4'd0,data[27:24]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[27:24]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_5;
|
||||
end
|
||||
|
||||
SEND_DATA_5 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[23:20] > 4'd9) tx_data <= {4'd0,data[23:20]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[23:20]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_4;
|
||||
end
|
||||
|
||||
SEND_DATA_4 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[19:16] > 4'd9) tx_data <= {4'd0,data[19:16]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[19:16]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_3;
|
||||
end
|
||||
|
||||
SEND_DATA_3 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
if (data[15:12] > 4'd9) tx_data <= {4'd0,data[15:12]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[15:12]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_2;
|
||||
end
|
||||
|
||||
SEND_DATA_2 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[11:8] > 4'd9) tx_data <= {4'd0,data[11:8]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[11:8]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_1;
|
||||
end
|
||||
|
||||
SEND_DATA_1 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[7:4] > 4'd9) tx_data <= {4'd0,data[7:4]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[7:4]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= SEND_DATA_0;
|
||||
end
|
||||
|
||||
SEND_DATA_0 :
|
||||
begin
|
||||
rx_en <=1'b0;
|
||||
tx_dv <= tx_rdy_in;
|
||||
|
||||
if (data[3:0] > 4'd9) tx_data <= {4'd0,data[3:0]} + 8'h37;
|
||||
else tx_data <= {4'd0,data[3:0]} + ASCII_0;
|
||||
|
||||
if (tx_rdy_in) state <= PROMPT;
|
||||
end
|
||||
|
||||
default :
|
||||
begin
|
||||
rx_fifo_rd_ack <= 1'b0;
|
||||
tx_dv <= 1'b0;
|
||||
wr_en <= 1'b0;
|
||||
rd_en <= 1'b0;
|
||||
idx <= 8'd0;
|
||||
state <= RESET;
|
||||
rx_en <= 1'b1;
|
||||
data_rdy <= 1'b0;
|
||||
end
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
assign char_A_F = ((rx_data_byte >= 8'h41) & (rx_data_byte <= 8'h46));
|
||||
assign char_a_f = ((rx_data_byte >= 8'h61) & (rx_data_byte <= 8'h66));
|
||||
assign char_0_9 = ((rx_data_byte >= 8'h30) & (rx_data_byte <= 8'h39));
|
||||
assign char_hex = char_0_9 | char_A_F | char_a_f;
|
||||
|
||||
assign hex_A_F = rx_data_byte - 8'h37;
|
||||
assign hex_a_f = rx_data_byte - 8'h57;
|
||||
assign hex_0_9 = rx_data_byte - ASCII_0;
|
||||
|
||||
|
||||
|
||||
// Generate message "Debug Terminal"
|
||||
always @(*) begin
|
||||
case(idx)
|
||||
8'd0 : welcome_char = ASCII_LF;
|
||||
8'd1 : welcome_char = ASCII_LF;
|
||||
8'd2 : welcome_char = ASCII_LF;
|
||||
8'd3 : welcome_char = ASCII_CR;
|
||||
8'd4 : welcome_char = ASCII_D;
|
||||
8'd5 : welcome_char = ASCII_e;
|
||||
8'd6 : welcome_char = ASCII_b;
|
||||
8'd7 : welcome_char = ASCII_u;
|
||||
8'd8 : welcome_char = ASCII_g;
|
||||
8'd9 : welcome_char = ASCII_SPACE;
|
||||
8'd10 : welcome_char = ASCII_T;
|
||||
8'd11 : welcome_char = ASCII_e;
|
||||
8'd12 : welcome_char = ASCII_r;
|
||||
8'd13 : welcome_char = ASCII_m;
|
||||
8'd14 : welcome_char = ASCII_i;
|
||||
8'd15 : welcome_char = ASCII_n;
|
||||
8'd16 : welcome_char = ASCII_a;
|
||||
default : welcome_char = ASCII_l;
|
||||
endcase
|
||||
end
|
||||
|
||||
// Generate message "\n->"
|
||||
always @(*) begin
|
||||
case (idx)
|
||||
8'd0 : prompt_char = ASCII_LF;
|
||||
8'd1 : prompt_char = ASCII_CR;
|
||||
8'd2 : prompt_char = ASCII_DASH;
|
||||
default : prompt_char = ASCII_GT;
|
||||
endcase
|
||||
end
|
||||
|
||||
// Generate message " BAD CMD"
|
||||
always @(*) begin
|
||||
case(idx)
|
||||
8'd0 : err_char = ASCII_TAB;
|
||||
8'd1 : err_char = ASCII_B;
|
||||
8'd2 : err_char = ASCII_A;
|
||||
8'd3 : err_char = ASCII_D;
|
||||
8'd4 : err_char = ASCII_SPACE;
|
||||
8'd5 : err_char = ASCII_C;
|
||||
8'd6 : err_char = ASCII_M;
|
||||
default : err_char = ASCII_D;
|
||||
endcase
|
||||
end
|
||||
|
||||
// Generate message " 0x"
|
||||
always @(*) begin
|
||||
case (idx)
|
||||
8'd0 : pre_data_char = ASCII_TAB;
|
||||
8'd1 : pre_data_char = ASCII_TAB;
|
||||
8'd2 : pre_data_char = ASCII_TAB;
|
||||
8'd3 : pre_data_char = ASCII_0;
|
||||
default : pre_data_char = ASCII_x;
|
||||
endcase
|
||||
end
|
||||
|
||||
// Generate <CR/LF>
|
||||
always @(*) begin
|
||||
case (idx)
|
||||
8'd0 : Append = ASCII_CR;
|
||||
default : Append = ASCII_LF;
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
// Instantiate FIFO to buffer RX data from UART.
|
||||
assign rx_fifo_data = {rx_err_in, rx_data_in};
|
||||
assign rx_data_byte = rx_data_in;
|
||||
assign rx_fifo_empty = (rx_fifo_empty_int | rx_fifo_rd_ack); // Gate with rd_ack to prevent double reads
|
||||
|
||||
// For the debug link, a dummy FIFO is implemented, on the basis that even posted reads will return quicker than a new character arriving.
|
||||
// Also, the user is expected to wait for the read to return before issuing further commands.
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (rx_dv_in) rx_fifo_q <= rx_fifo_data;
|
||||
|
||||
if (rx_dv_in) rx_fifo_empty_int <= 1'b0;
|
||||
else if (rx_fifo_rd_ack) rx_fifo_empty_int <= 1'b1;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
--This version uses the uart decoder design with FIFO: pei_decoder_uart_0
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
|
||||
|
||||
entity pei_debug_uart_1 is
|
||||
|
||||
generic(
|
||||
--Paramaters for the debugger
|
||||
ADDRESS_WIDTH : integer range 1 to 32 := 8;
|
||||
DATA_WIDTH : integer range 1 to 32 :=32;
|
||||
--Parameters for the uart serdes
|
||||
BAUD_RATE : integer range 9600 to 115200 := 115200;
|
||||
TEST_MODE : boolean := false
|
||||
);
|
||||
|
||||
PORT(
|
||||
|
||||
clk : IN STD_LOGIC;
|
||||
--external pei connector
|
||||
dbg_ser_out : OUT STD_LOGIC;
|
||||
dbg_ser_in : IN STD_LOGIC;
|
||||
--write block. Data from printhead and stm8
|
||||
add_out : OUT STD_LOGIC_VECTOR (ADDRESS_WIDTH-1 DOWNTO 0); -- Address signal
|
||||
wr_data_out : OUT STD_LOGIC_VECTOR (DATA_WIDTH-1 DOWNTO 0); --write data
|
||||
--src_id_out : OUT STD_LOGIC_VECTOR (5 DOWNTO 0); // This is used to identify returns from posted reads. Not implemented in this instance.
|
||||
wr_en_out : OUT STD_LOGIC; -- write control signal
|
||||
--read block--
|
||||
rd_data_in : IN STD_LOGIC_VECTOR (DATA_WIDTH-1 DOWNTO 0); --data from fpga
|
||||
--src_id_in : IN STD_LOGIC_VECTOR (5 DOWNTO 0); // This is used to identify returns from posted reads. Not implemented in this instance.
|
||||
rd_en_out : OUT STD_LOGIC; -- read request signal
|
||||
rd_dv_in : IN STD_LOGIC; -- read data valid signal
|
||||
rd_32b_in : IN STD_LOGIC -- read data is 32b not 16b
|
||||
);
|
||||
end entity pei_debug_uart_1;
|
||||
|
||||
architecture struct of pei_debug_uart_1 is
|
||||
|
||||
function calc_oversample_rate (TEST_MODE : boolean) return integer is
|
||||
begin
|
||||
if TEST_MODE then
|
||||
return 5;
|
||||
else
|
||||
return 16;
|
||||
end if;
|
||||
end function calc_oversample_rate;
|
||||
|
||||
function calc_clock_divider (BAUD_RATE : integer; TEST_MODE : boolean) return integer is
|
||||
begin
|
||||
if TEST_MODE then
|
||||
return 6;--32;
|
||||
else
|
||||
return (100000000/BAUD_RATE)/16; -- 54 for 115200 (16 is oversample rate)
|
||||
end if;
|
||||
end function calc_clock_divider;
|
||||
|
||||
constant OVERSAMPLE_RATE : integer := calc_oversample_rate(TEST_MODE);
|
||||
constant ENABLE_CLOCK_DIVIDER : integer := calc_clock_divider(BAUD_RATE, TEST_MODE);
|
||||
|
||||
|
||||
component pei_debug_serial_port_1
|
||||
generic(
|
||||
ADDRESS_WIDTH : integer range 1 to 31 := 8;
|
||||
DATA_WIDTH : integer range 1 to 32 :=32
|
||||
);
|
||||
PORT (
|
||||
clk : IN STD_LOGIC;
|
||||
tx_rdy_in : IN STD_LOGIC;
|
||||
tx_busy_in : IN STD_LOGIC;
|
||||
tx_en_out : OUT STD_LOGIC; --perm. ON
|
||||
tx_dv_out : OUT STD_LOGIC;
|
||||
tx_data_out : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rx_err_in : IN STD_LOGIC;
|
||||
rx_dv_in : IN STD_LOGIC;
|
||||
rx_data_in : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
rx_en_out : OUT STD_LOGIC; --perm ON
|
||||
add_out : OUT STD_LOGIC_VECTOR (ADDRESS_WIDTH-1 DOWNTO 0);
|
||||
wr_data_out : OUT STD_LOGIC_VECTOR (DATA_WIDTH-1 DOWNTO 0);
|
||||
src_id_out : OUT STD_LOGIC_VECTOR (5 DOWNTO 0);
|
||||
wr_en_out : OUT STD_LOGIC;
|
||||
rd_en_out : OUT STD_LOGIC;
|
||||
rd_data_in : IN STD_LOGIC_VECTOR (DATA_WIDTH-1 DOWNTO 0);
|
||||
src_id_in : IN STD_LOGIC_VECTOR (5 DOWNTO 0);
|
||||
rd_dv_in : IN STD_LOGIC;
|
||||
rd_32b_in : IN STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
||||
-- the block unbuffered_uart deserialises the data stream coming from the connector
|
||||
|
||||
component pei_decoder_uart_1
|
||||
generic(
|
||||
OVERSAMPLE_RATE : integer range 1 to 16 :=3;
|
||||
ENABLE_CLOCK_DIVIDER : integer range 1 to 63 :=10
|
||||
);
|
||||
PORT(
|
||||
|
||||
clk : IN STD_LOGIC;
|
||||
uart_de_out : OUT STD_LOGIC; -- copy of uart_tx_en_in
|
||||
uart_rx_data_out : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
uart_rx_dv_out : OUT STD_LOGIC;
|
||||
uart_rx_en_in : IN STD_LOGIC;
|
||||
uart_rx_in : IN STD_LOGIC;
|
||||
uart_rx_error_out : OUT STD_LOGIC;
|
||||
uart_tx_data_in : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
|
||||
uart_tx_dv_in : IN STD_LOGIC;
|
||||
uart_tx_en_in : IN STD_LOGIC;
|
||||
uart_tx_out : OUT STD_LOGIC;
|
||||
uart_tx_rdy_out : OUT STD_LOGIC;
|
||||
uart_tx_busy_out : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
||||
signal s_tx_rdy_out, s_tx_busy_out, s_tx_dv_in, s_rx_error_out : std_logic; -- PEI
|
||||
signal s_de_out,s_rx_en, s_rx_dv_out, s_tx_to_decoder : std_logic;
|
||||
signal s_tx_data_in, s_rx_data_out : std_logic_vector (7 downto 0);
|
||||
|
||||
|
||||
--mapping pei_unbuffered_uart_0
|
||||
|
||||
begin
|
||||
|
||||
--Instantiate uart blocks
|
||||
|
||||
decoder_uart_inst: pei_decoder_uart_1
|
||||
|
||||
generic map (
|
||||
OVERSAMPLE_RATE => OVERSAMPLE_RATE,
|
||||
ENABLE_CLOCK_DIVIDER => ENABLE_CLOCK_DIVIDER
|
||||
)
|
||||
port map (
|
||||
|
||||
-- system clock
|
||||
|
||||
clk => clk,
|
||||
--I/O pints
|
||||
|
||||
uart_tx_out => dbg_ser_out, -- connected to the RxD pin of the J4 connector
|
||||
uart_rx_in => dbg_ser_in, -- connected to the TxD pin of the J4 connector
|
||||
|
||||
-- connection to the uart decoder.
|
||||
|
||||
uart_tx_rdy_out => s_tx_rdy_out, -- Control signal. Tells the decoder that deser is ready to transmit
|
||||
uart_tx_busy_out => s_tx_busy_out, -- Control signal. Tell the decoder that serialiaser is busy transmitting
|
||||
uart_tx_dv_in => s_tx_dv_in, -- Control signal. The decoder signals to deser that there is valid data to be transmitted
|
||||
uart_tx_data_in => s_tx_data_in, -- data from decoder to transmit
|
||||
|
||||
|
||||
uart_rx_dv_out => s_rx_dv_out,
|
||||
|
||||
uart_rx_en_in => s_rx_en,
|
||||
uart_de_out => open, -- this signal shows that there is a transmission
|
||||
uart_rx_error_out => s_rx_error_out,
|
||||
uart_tx_en_in => s_tx_to_decoder,
|
||||
uart_rx_data_out => s_rx_data_out
|
||||
|
||||
|
||||
);
|
||||
|
||||
debug_serial_port_inst : pei_debug_serial_port_1
|
||||
|
||||
port map (
|
||||
clk => clk,
|
||||
tx_rdy_in => s_tx_rdy_out, -- control signal from external deser
|
||||
tx_busy_in => s_tx_busy_out, -- no connected
|
||||
tx_en_out => s_tx_to_decoder, -- it is always on
|
||||
tx_dv_out => s_tx_dv_in, --validate data
|
||||
tx_data_out => s_tx_data_in,
|
||||
rx_err_in => s_rx_error_out, -- error from deser
|
||||
rx_dv_in => s_rx_dv_out ,
|
||||
rx_data_in => s_rx_data_out,
|
||||
rx_en_out => s_rx_en,
|
||||
add_out => add_out, -- address from ftdi to fpga
|
||||
wr_data_out => wr_data_out, -- data from ftdi to fpga
|
||||
src_id_out => open, -- not used in this version
|
||||
wr_en_out => wr_en_out, -- write enable controlled by decoder
|
||||
rd_en_out => rd_en_out, -- read enable controlled by
|
||||
rd_data_in => rd_data_in, --data from fpga to ftdi
|
||||
src_id_in => (others =>'0'), -- not used in this version
|
||||
rd_dv_in => rd_dv_in, -- Enable transmission from FPGA to ftdi chip
|
||||
rd_32b_in => rd_32b_in
|
||||
);
|
||||
|
||||
|
||||
end architecture struct;
|
||||
|
|
@ -1,320 +0,0 @@
|
|||
//----------------------------------------------------------------------------
|
||||
// Module Description
|
||||
//
|
||||
// This is a simple UART, capable of full duplex operation.
|
||||
// Data format is fixed as 8N1, LSB first.
|
||||
// It is intended to be used with a FIFO if necessary.
|
||||
// Timings are set by parameters at instantiation.
|
||||
//
|
||||
// Interface:
|
||||
// rx_dv is valid for 1 clock pulse
|
||||
// rx_data_out is valid when dv is high
|
||||
// tx_dv shall be valid for 1 clock pulse, after which tx_rdy is de-asserted.
|
||||
// tx_data shall be valid when tx_dv is high.
|
||||
// If tx_dv is asserted while tx_rdy is de-asserted, tx_dv is ignored.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
// Revision Date Author Notes
|
||||
//
|
||||
// 01 22-02-2009 Gordon Leather First written
|
||||
// 02 04-10-2023 David Rodriguez Added buffer to sync requests with the rest of the design
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
`resetall
|
||||
`timescale 1ns/1ps
|
||||
module pei_decoder_uart_1 #(
|
||||
parameter OVERSAMPLE_RATE = 5'd16,
|
||||
parameter ENABLE_CLOCK_DIVIDER = 6'd52
|
||||
)
|
||||
(
|
||||
// Port Declarations
|
||||
input wire clk,
|
||||
output wire uart_de_out,
|
||||
output wire [7:0] uart_rx_data_out,
|
||||
output wire uart_rx_dv_out,
|
||||
input wire uart_rx_en_in,
|
||||
input wire uart_rx_in,
|
||||
output wire uart_rx_error_out,
|
||||
input wire [7:0] uart_tx_data_in,
|
||||
input wire uart_tx_dv_in,
|
||||
input wire uart_tx_en_in,
|
||||
output wire uart_tx_out,
|
||||
output wire uart_tx_rdy_out,
|
||||
output wire uart_tx_busy_out
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Parameters
|
||||
// Internal Declarations
|
||||
localparam DATA_BITS = 4'd8;
|
||||
localparam EDGE_DETECT_POSITION = OVERSAMPLE_RATE/2;
|
||||
localparam PACKET_WIDTH = 16'd7;
|
||||
localparam FIFO_DEPTH = 16'd255;
|
||||
localparam PTR_MSB = 16'd8;
|
||||
localparam ADDR_MSB = 16'd3;
|
||||
|
||||
// RX State machine constants
|
||||
localparam RX_IDLE = 3'd0;
|
||||
localparam RX_GET_START = 3'd1;
|
||||
localparam RX_GET_DATA = 3'd2;
|
||||
localparam RX_GET_STOP = 3'd3;
|
||||
localparam RX_GET_STOP_1 = 3'd4;
|
||||
|
||||
// TX State machine constants
|
||||
localparam TX_IDLE = 2'b0;
|
||||
|
||||
|
||||
|
||||
// Internal Declarations
|
||||
reg [OVERSAMPLE_RATE-1:0] rx_sr = 0;
|
||||
reg [5:0] en_cnt = 6'd0;
|
||||
reg [4:0] rx_bit_tmr = (OVERSAMPLE_RATE-5'd1);
|
||||
reg [4:0] tx_bit_tmr = (OVERSAMPLE_RATE-5'd1);
|
||||
reg rx_en_int = 1'b1;
|
||||
wire [7:0] fifo_data;
|
||||
wire clk_en;
|
||||
wire rx_neg_edge;
|
||||
wire rx_bit_valid;
|
||||
reg [2:0] rx_state = RX_IDLE;
|
||||
reg [3:0] rx_bit_cnt = DATA_BITS - 4'd1;
|
||||
reg rx_receiving = 1'b0;
|
||||
reg rx_done = 1'b0;
|
||||
|
||||
|
||||
reg rdreq_fifo = 1'b0;
|
||||
reg wrreq_fifo = 1'b0;
|
||||
|
||||
|
||||
reg rx_error = 1'b0;
|
||||
reg [7:0] rx_data = 8'd0;
|
||||
|
||||
wire fifo_full;
|
||||
wire fifo_emp;
|
||||
wire tx_new_word;
|
||||
wire tx_next_bit;
|
||||
wire tx_last_bit;
|
||||
wire tx_done;
|
||||
//reg [7:0] fifo_data;
|
||||
reg [3:0] tx_bit_cnt = DATA_BITS + 4'd2;
|
||||
reg tx_ignore_idle = 1'b0;
|
||||
|
||||
reg [9:0] tx_data = 10'h3ff; // Extra bits allow easy addition of start bit to data.
|
||||
reg tx_rdy = 1'b1;
|
||||
reg tx_busy = 1'b0;
|
||||
reg rx_dv_out = 1'b0;
|
||||
reg rdreq_fifo_d1 = 1'b1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Output assignments
|
||||
//assign uart_rx_data_out = rx_data;
|
||||
assign uart_rx_data_out = fifo_data;
|
||||
assign uart_rx_dv_out = rx_dv_out;
|
||||
assign uart_rx_error_out = rx_error;
|
||||
|
||||
assign uart_tx_rdy_out = tx_rdy & ~uart_tx_dv_in & uart_tx_en_in; // Combinatorial output, often required for RDY interface to FIFOs
|
||||
assign uart_tx_out = tx_data[0];
|
||||
assign uart_de_out = uart_tx_en_in;
|
||||
|
||||
assign uart_tx_busy_out = tx_busy;
|
||||
|
||||
//fifo_v20 external module
|
||||
|
||||
fifo_v20 u1 (.clock(clk),.data(rx_data),.rdreq(rdreq_fifo),.sclr(),.wrreq(rx_done),
|
||||
.almost_empty(), .almost_full(), .empty(fifo_emp), .full(fifo_full), .q(fifo_data),.usedw());
|
||||
//----------------------------------------------------------------------------
|
||||
// Common Functions
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Clock enable generation
|
||||
assign clk_en = (en_cnt == (ENABLE_CLOCK_DIVIDER-1));
|
||||
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (clk_en) en_cnt <= 6'd0;
|
||||
else en_cnt <= en_cnt + 6'd1;
|
||||
end
|
||||
//----------------------------------------------------------------------------
|
||||
// END Common Functions
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// UART Transmitter
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (uart_tx_en_in)
|
||||
begin
|
||||
if (tx_new_word) tx_ignore_idle <= ~tx_busy;
|
||||
else if (tx_next_bit) tx_ignore_idle <= 1'b0;
|
||||
|
||||
if (tx_new_word) tx_data <= {uart_tx_data_in, 1'b0, 1'b1}; // Data, Start bit, Idle bit. Ignore writes when busy,
|
||||
else if (tx_next_bit) tx_data <= {1'b1, tx_data[9:1]}; // Shift data along. Shifting '1's in gives us the stop bit.
|
||||
|
||||
if (~tx_busy | tx_next_bit) tx_bit_tmr <= (OVERSAMPLE_RATE-5'd1);
|
||||
else if (clk_en) tx_bit_tmr <= tx_bit_tmr - 5'd1;
|
||||
|
||||
if (tx_new_word) tx_bit_cnt <= DATA_BITS + 4'd2;
|
||||
else if (tx_next_bit) tx_bit_cnt <= tx_bit_cnt - 4'd1;
|
||||
|
||||
if (tx_new_word) tx_busy <= 1'b1; // This takes priority, to allow continuous transmission
|
||||
else if (tx_done) tx_busy <= 1'b0;
|
||||
|
||||
if (tx_new_word) tx_rdy <= 1'b0;
|
||||
else if (~tx_busy | tx_last_bit) tx_rdy <= 1'b1; // Ready for new data as soon as the last bit has been transmitted, or when not busy.
|
||||
end
|
||||
else
|
||||
begin
|
||||
tx_bit_tmr <= (OVERSAMPLE_RATE-5'd1);
|
||||
tx_bit_cnt <= DATA_BITS + 4'd2;
|
||||
tx_data <= 10'h3ff;
|
||||
tx_busy <= 1'b0;
|
||||
tx_rdy <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
assign tx_new_word = uart_tx_dv_in & tx_rdy; // Ignore writes when not ready
|
||||
assign tx_next_bit = clk_en & ((tx_busy & (tx_bit_tmr == 0)) | tx_ignore_idle);
|
||||
assign tx_last_bit = tx_next_bit & (tx_bit_cnt == 1);
|
||||
assign tx_done = tx_next_bit & (tx_bit_cnt == 0);
|
||||
//----------------------------------------------------------------------------
|
||||
// END UART Transmitter
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// UART Receiver
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Rx edge detect and bit timer
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (clk_en)
|
||||
begin
|
||||
if (rx_en_int) rx_sr <= {rx_sr[OVERSAMPLE_RATE-2:0], uart_rx_in}; // Oversample Rx input
|
||||
else rx_sr <= 0; // Reset required to avoid false triggers on restart
|
||||
|
||||
if (rx_receiving && (rx_bit_tmr>0)) rx_bit_tmr <= rx_bit_tmr - 5'd1; // Timer for sampling bits
|
||||
else rx_bit_tmr <= (OVERSAMPLE_RATE - 5'd1);
|
||||
end
|
||||
end
|
||||
|
||||
assign rx_neg_edge = (rx_sr[EDGE_DETECT_POSITION] & ~rx_sr[EDGE_DETECT_POSITION-1]);
|
||||
|
||||
assign rx_bit_valid = (rx_bit_tmr == 0);
|
||||
|
||||
|
||||
|
||||
|
||||
// Rx State machine
|
||||
// This state machine only supports 8N1 data format
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (clk_en)
|
||||
begin
|
||||
if (rx_en_int)
|
||||
begin
|
||||
case (rx_state)
|
||||
RX_GET_START : if (rx_neg_edge)
|
||||
begin
|
||||
rx_bit_cnt <= DATA_BITS- 4'd1; // Ensure correct number of bits are counted
|
||||
rx_receiving <= 1'b1;
|
||||
rx_state <= RX_GET_DATA; // State transition
|
||||
end
|
||||
|
||||
|
||||
RX_GET_DATA : if (rx_bit_valid)
|
||||
begin
|
||||
rx_data <= {uart_rx_in, rx_data[7:1]}; // Register Data
|
||||
rx_bit_cnt <= rx_bit_cnt - 4'd1; // and decrement bit counter
|
||||
|
||||
if (rx_bit_cnt == 0) rx_state <= RX_GET_STOP; // Change state on last bit
|
||||
end
|
||||
|
||||
|
||||
RX_GET_STOP : if (rx_bit_valid)
|
||||
begin
|
||||
rx_error <= ~uart_rx_in; // Stop bit should be a '1'
|
||||
rx_state <= RX_GET_STOP_1; // State transition
|
||||
end
|
||||
|
||||
|
||||
RX_GET_STOP_1 : if (rx_bit_tmr == (OVERSAMPLE_RATE/2)) // Delay to ensure Stop bit is fully received
|
||||
begin // This is necessary to prevent turnaround time problems
|
||||
rx_done <= 1'b1;
|
||||
rx_receiving <= 1'b0;
|
||||
rx_state <= RX_IDLE; // State transition
|
||||
end
|
||||
|
||||
|
||||
default : begin
|
||||
rx_receiving <= 1'b0;
|
||||
rx_done <= 1'b0;
|
||||
rx_error <= 1'b0;
|
||||
|
||||
if (rx_en_int) rx_state <= RX_GET_START; // State transition
|
||||
end
|
||||
endcase
|
||||
end
|
||||
else
|
||||
begin
|
||||
rx_state <= RX_IDLE;
|
||||
rx_done <= 1'b0;
|
||||
end
|
||||
end
|
||||
else
|
||||
begin
|
||||
rx_done <= 1'b0; // Required so only one pulse given.
|
||||
end
|
||||
end
|
||||
|
||||
/////////////////////RXFIFO////////////
|
||||
//wrreq is mapped to rx_done
|
||||
// rdreq is high when the fifo is not empty
|
||||
// fifo_data has to change with rx_dv flag signal
|
||||
|
||||
|
||||
|
||||
always @(negedge clk) //redreq changes within the same clock cycle as fifo_emp changes to 1
|
||||
begin
|
||||
rdreq_fifo_d1 <= rdreq_fifo;
|
||||
|
||||
rdreq_fifo <= 1'b0;
|
||||
wrreq_fifo <= 1'b0;
|
||||
|
||||
|
||||
if (fifo_emp == 1'b0 && uart_rx_en_in == 1'b1 && rdreq_fifo ==1'b0) rdreq_fifo <= 1'b1;
|
||||
|
||||
if (fifo_full == 1'b0 && rx_done == 1'b1) wrreq_fifo <= 1'b1;
|
||||
end
|
||||
|
||||
always @ (posedge clk)
|
||||
begin
|
||||
rx_dv_out <= 1'b0;
|
||||
//fifo_data <= fifo_data_int;
|
||||
if (rdreq_fifo_d1 == 1'b1 && rdreq_fifo ==1'b0) rx_dv_out <= 1'b1;
|
||||
|
||||
end
|
||||
//----------------------------------------------------------------------------
|
||||
// END UART Receiver
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,754 +0,0 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief PEI FPGA top level
|
||||
--!
|
||||
--! @details See
|
||||
--! https://congis.atlassian.net/wiki/spaces/HMBSED3000/pages/153157992473/PEI+D3000+Design+Documentation
|
||||
--! https://congis.atlassian.net/wiki/spaces/HMBSED3000/pages/153168281734/PEI-SE-D3000+EL+document
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li clk25_in : nominally 25MHz
|
||||
--! @li lvds_clk_in : LVDS clock, nominally 350MHz (PEI interface)
|
||||
--!
|
||||
--! @b Interfaces:
|
||||
--! lvds_d_in : Signals from D3000 to head
|
||||
--! dac_out : DAC data and DAC SPI signals
|
||||
--! nled_* : Debug LED outputs
|
||||
--! v_pg : Power good input signals
|
||||
--! v_en : Power enable output signals
|
||||
--! heater_en : Heater enable outputsignal
|
||||
--! scl_fpga,sda_fpga : I2C slave interface
|
||||
|
||||
--! D_in[0:3] : Printhead data
|
||||
--! D_clk : Sync_clk
|
||||
--! ID[0..1] : Data mode
|
||||
--! LVDSOE : Logic signal to enable desarialiser
|
||||
--! A[0..1] : Address data
|
||||
--!
|
||||
--! scl_fpga,sda_fpga : I2C slave interface
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li The LVDS out clock and internal system clock are asynchronous.
|
||||
--! Signals should not cross domains in this design.
|
||||
--!
|
||||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Dave Steele
|
||||
--! @copyright (c) 2020 Global Inkjet Systems
|
||||
--! @date 2021-04-21
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pei_register_pkg.all;
|
||||
|
||||
entity pei_fpga_top is
|
||||
generic (
|
||||
DEVICE_FAMILY : string := "Cyclone 10 LP";
|
||||
ADDRESS_WIDTH : integer range 1 to 32 := 8;
|
||||
DATA_WIDTH : integer range 1 to 32 := 32;
|
||||
TEST_MODE : boolean := false
|
||||
);
|
||||
port (
|
||||
|
||||
clk25_in : in std_logic; --board clock
|
||||
|
||||
|
||||
|
||||
|
||||
dbg_ser_out : out std_logic;
|
||||
dbg_ser_in : in std_logic;
|
||||
|
||||
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;
|
||||
nled_r : out std_logic;
|
||||
|
||||
sda_fpga : inout std_logic;
|
||||
scl_fpga : inout std_logic;
|
||||
|
||||
stm8_alert_in : in std_logic_vector(1 downto 0);
|
||||
alert_out : out std_logic;
|
||||
temp_alert_in : in std_logic;
|
||||
|
||||
shutdn : out std_logic;
|
||||
v_en : out std_logic_vector(3 downto 0);
|
||||
|
||||
wf_sel : out std_logic_vector(2 downto 0);
|
||||
|
||||
cfg_ncs : out std_logic;
|
||||
cfg_wdata : out std_logic;
|
||||
|
||||
hd_scl_fpga : inout std_logic;
|
||||
hd_sda_fpga : inout std_logic;
|
||||
--xhot_n : out std_logic;
|
||||
lvdsoe : in std_logic;
|
||||
debug_out : out std_logic_vector(5 downto 1)
|
||||
);
|
||||
end entity pei_fpga_top;
|
||||
|
||||
architecture struct of pei_fpga_top is
|
||||
constant FPGA_VERSION : std_logic_vector(15 downto 0):= x"007A"; -- increment this every time you make a significant change
|
||||
|
||||
component io_buf_i2c
|
||||
PORT
|
||||
(
|
||||
datain : in std_logic_vector (0 DOWNTO 0);
|
||||
oe : in std_logic_vector (0 DOWNTO 0);
|
||||
dataio : inout std_logic_vector (0 DOWNTO 0);
|
||||
dataout : out STD_LOGIC_VECTOR (0 DOWNTO 0)
|
||||
);
|
||||
end component;
|
||||
|
||||
component simple_i2c_slave
|
||||
port
|
||||
(
|
||||
clk : in std_logic;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
sda_out : out std_logic;
|
||||
i2c_busy_out : out std_logic;
|
||||
add_out : out std_logic_vector(15 downto 0);
|
||||
wr_data_out : out std_logic_vector( 7 downto 0);
|
||||
wr_en_out : out std_logic;
|
||||
rd_en_out : out std_logic;
|
||||
rd_data_in : in std_logic_vector( 7 downto 0);
|
||||
rd_dv_in : in std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
component i2c_slv_simple_eprom
|
||||
generic ( DEVICE_ADDRESS : integer :=0);
|
||||
port
|
||||
(
|
||||
clk : in std_logic;
|
||||
lvdsoe : in std_logic;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
sda_out : out std_logic;
|
||||
i2c_busy_out : out std_logic;
|
||||
add_out : out std_logic_vector(15 downto 0);
|
||||
wr_data_out : out std_logic_vector(7 downto 0);
|
||||
wr_en_out : out std_logic;
|
||||
rd_en_out : out std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
|
||||
component pll_25in_100out_pei
|
||||
PORT
|
||||
(
|
||||
inclk0 : IN STD_LOGIC := '0';
|
||||
c0 : OUT STD_LOGIC ;
|
||||
locked : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
||||
component pei_debug_uart_1
|
||||
|
||||
generic(
|
||||
--Paramaters for the debugger
|
||||
ADDRESS_WIDTH : integer range 1 to 32 := 8;
|
||||
DATA_WIDTH : integer range 1 to 32 :=32;
|
||||
--Parameters for the uart serdes
|
||||
BAUD_RATE : integer range 9600 to 115200 := 115200;
|
||||
TEST_MODE : boolean := false
|
||||
);
|
||||
PORT(
|
||||
|
||||
clk : IN STD_LOGIC;
|
||||
--external pei connector
|
||||
dbg_ser_out : OUT STD_LOGIC;
|
||||
dbg_ser_in : IN STD_LOGIC;
|
||||
--write block. Data from printhead and stm8
|
||||
add_out : OUT STD_LOGIC_VECTOR (ADDRESS_WIDTH-1 DOWNTO 0); -- Address signal
|
||||
wr_data_out : OUT STD_LOGIC_VECTOR (DATA_WIDTH-1 DOWNTO 0); --write data
|
||||
--src_id_out : OUT STD_LOGIC_VECTOR (5 DOWNTO 0); // This is used to identify returns from posted reads. Not implemented in this instance.
|
||||
wr_en_out : OUT STD_LOGIC; -- write control signal
|
||||
--read block--
|
||||
rd_data_in : IN STD_LOGIC_VECTOR (DATA_WIDTH-1 DOWNTO 0); --data from fpga
|
||||
--src_id_in : IN STD_LOGIC_VECTOR (5 DOWNTO 0); // This is used to identify returns from posted reads. Not implemented in this instance.
|
||||
rd_en_out : OUT STD_LOGIC; -- read request signal
|
||||
rd_dv_in : IN STD_LOGIC; -- read data valid signal
|
||||
rd_32b_in : IN STD_LOGIC -- read data is 32b not 16b
|
||||
);
|
||||
end component pei_debug_uart_1;
|
||||
|
||||
type array_t is array (natural range <>) of std_logic_vector;
|
||||
signal amp_trip : std_logic_vector(5 downto 0); -- GJL DBG - dummy implementation - amp_trip is replaced with an stm8 alert monitor
|
||||
|
||||
-- System clocks
|
||||
signal clk100 : std_logic := '0';
|
||||
|
||||
signal rst_n : std_logic := '0';
|
||||
signal count : std_logic_vector(9 downto 0) := (others => '0');
|
||||
|
||||
-- PEI / PHE signals
|
||||
--signal pei_dout; : std_logic_vector(15 downto 0) := (others => '0');
|
||||
signal pei_din : std_logic_vector( 3 downto 0) := (others => '0');
|
||||
signal test_hdr : std_logic_vector(63 downto 0) := (others => '0');
|
||||
|
||||
-- Head signals
|
||||
signal xhot_int_n : std_logic;
|
||||
|
||||
-- I2C signals
|
||||
signal flagi2c : std_logic;
|
||||
signal scl_in : std_logic;
|
||||
signal scl_out : std_logic;
|
||||
signal scl_sl_out : std_logic;
|
||||
signal sda_in : std_logic;
|
||||
signal sda_out : std_logic;
|
||||
signal sda_sl_out : std_logic;
|
||||
|
||||
signal local_readdata : std_logic_vector(31 downto 0);
|
||||
signal local_read : std_logic;
|
||||
signal local_write : std_logic;
|
||||
signal rd_dv : std_logic;
|
||||
|
||||
signal hd_scl_in : std_logic;
|
||||
signal hd_scl_out : std_logic;
|
||||
signal hd_scl_out_eprom : std_logic;
|
||||
signal hd_sda_in : std_logic;
|
||||
signal hd_sda_out : std_logic;
|
||||
signal hd_sda_out_eprom : std_logic;
|
||||
|
||||
|
||||
signal ena_100us : std_logic;
|
||||
signal ena_100ms : std_logic;
|
||||
signal debug_scl, debug_sda : std_logic;
|
||||
|
||||
signal lvds_locked : std_logic;
|
||||
|
||||
signal data_lvds_clk : std_logic_vector(11 downto 0);
|
||||
signal data_valid_lvds_clk : std_logic;
|
||||
signal lvds_uart_data_out_valid : std_logic;
|
||||
signal lvds_uart_data_out : std_logic_vector(7 downto 0);
|
||||
signal start_of_data_lvds_clk : std_logic;
|
||||
signal reg_add : std_logic_vector(ADDRESS_WIDTH-1 downto 0);
|
||||
signal reg_data : std_logic_vector(DATA_WIDTH-1 downto 0);
|
||||
|
||||
--data signals
|
||||
signal lvds_rx_clk : std_logic;
|
||||
|
||||
--uart block
|
||||
signal add_uart : std_logic_vector(ADDRESS_WIDTH-1 downto 0);
|
||||
signal add_uart_i : integer;
|
||||
signal wr_data_uart : std_logic_vector(DATA_WIDTH-1 downto 0);
|
||||
signal rd_data_uart : std_logic_vector(DATA_WIDTH-1 downto 0);
|
||||
signal wr_en_uart : std_logic;
|
||||
signal rd_req_uart : std_logic;
|
||||
signal oe : std_logic;
|
||||
signal rd_dv_uart : std_logic;
|
||||
signal rd_32b_uart : std_logic; -- when low, send back 16 bit data, when high - 32b
|
||||
signal Byte_transfer : std_logic;
|
||||
|
||||
-------------- test signals -----
|
||||
signal latch,nchg,led_n : std_logic;
|
||||
signal eprom_busy : std_logic;
|
||||
signal latch_pulse_rx_clk : std_logic;
|
||||
signal latch_pulse_rx_clk_d1 : std_logic;
|
||||
signal latch_pulse_rx_clk_d2 : std_logic;
|
||||
signal sig_rx_clk : std_logic_vector(31 downto 0);
|
||||
signal latch_pulse : std_logic;
|
||||
signal latch_count : std_logic_vector(31 downto 0);
|
||||
signal signature : std_logic_vector(31 downto 0);
|
||||
signal cmd_reset : std_logic;
|
||||
signal reg_thermistor : std_logic_vector(15 downto 0) := x"1900";
|
||||
signal eprom_addr : std_logic_vector(15 downto 0);
|
||||
signal eprom_wr_data : std_logic_vector(31 downto 0);
|
||||
signal counter_led : std_logic_vector(31 downto 0);
|
||||
signal pulse_length : std_logic_vector(31 downto 0) := x"0c0002ff";
|
||||
signal conf_tmp275 : std_logic_vector(15 downto 0);
|
||||
--signal overdriveReg : std_logic_vector(15 downto 0);
|
||||
signal Thigh_tmp275 : std_logic_vector(15 downto 0) := x"04B0";
|
||||
signal Tlow_tmp275 : std_logic_vector(15 downto 0) := x"0000";
|
||||
signal chA, chB, chC : std_logic;
|
||||
signal sp_table_comA : std_logic_vector(15 downto 0);
|
||||
signal sp_table_comB : std_logic_vector(15 downto 0);
|
||||
signal sp_table_comC : std_logic_vector(15 downto 0);
|
||||
|
||||
---mcp4631------------------------------------------------------------------
|
||||
signal reg_mcp4631_in : std_logic_vector(15 downto 0) := x"0000";
|
||||
signal reg_mcp4631_out : std_logic_vector(15 downto 0) := x"0000";
|
||||
signal data_frame_i2c : std_logic_vector(15 downto 0) := x"0000";
|
||||
signal data_fifo_in : std_logic_vector(16 downto 0) := '0' & x"0000";
|
||||
signal data_frame_i2c_long : std_logic_vector(16 downto 0) := '0' & x"0000";
|
||||
signal wr_nbytes : std_logic_vector(15 downto 0) := x"0001";
|
||||
signal i2c_address : std_logic_vector(7 downto 0) := x"20";
|
||||
signal read_fifo : std_logic;
|
||||
signal i2c_m_dv : std_logic;
|
||||
signal wr_fifo_empty : std_logic;
|
||||
signal wr_fifo_empty_next : std_logic;
|
||||
signal wr_full_fifo : std_logic;
|
||||
signal wr_full_next : std_logic;
|
||||
signal wr_i2c_fifo_dv : std_logic;
|
||||
signal i2c_mcp4631_busy : std_logic;
|
||||
signal wr_fifo : std_logic;
|
||||
signal start_r_mcp4631 : std_logic;
|
||||
signal start_w_mcp4631 : std_logic;
|
||||
signal scl_ms_out : std_logic;
|
||||
signal sda_ms_out : std_logic;
|
||||
signal wr_uart, rd_uart : std_logic;
|
||||
signal rd_uart_d1 : std_logic;
|
||||
signal rx_i2c_flag : std_logic;
|
||||
|
||||
|
||||
begin
|
||||
------------------------------------------------------------------------------
|
||||
-- I/O Assignments
|
||||
------------------------------------------------------------------------------
|
||||
alert_out <= stm8_alert_in(1) or stm8_alert_in(0); -- **** DCS needs proper combine logic
|
||||
|
||||
shutdn <= temp_alert_in;
|
||||
--debug_out <= "00" & lvds_locked & rst_n & '0';
|
||||
cfg_ncs <= 'Z'; -- Deselect serial flash
|
||||
cfg_wdata <= 'Z';
|
||||
|
||||
-- test header assignments
|
||||
--dac_out(39 downto 0) <= test_hdr(39 downto 0);
|
||||
--dac_out(79 downto 60) <= test_hdr(59 downto 40);
|
||||
--v_en(3 downto 0) <= test_hdr(63 downto 60);
|
||||
v_en(3 downto 0) <= (others => 'Z');
|
||||
|
||||
---------------------------------
|
||||
|
||||
nled_y <= 'Z';
|
||||
nled_r <= 'Z';
|
||||
|
||||
|
||||
GEN_PLL : if TEST_MODE = false generate
|
||||
|
||||
pll_25in_100out_inst : pll_25in_100out_pei
|
||||
port map (
|
||||
inclk0 => clk25_in,
|
||||
c0 => clk100,
|
||||
locked => rst_n
|
||||
);
|
||||
|
||||
end generate;
|
||||
|
||||
-- In test mode, wire the input clock straight through to the system clock
|
||||
-- The test bench should then provide the input at 200MHz
|
||||
|
||||
GEN_TEST_PLL : if TEST_MODE = true generate
|
||||
|
||||
TEST_CLK100_PROC : process (clk25_in)
|
||||
begin
|
||||
if rising_edge(clk25_in) then
|
||||
clk100 <= not clk100;
|
||||
count <= std_logic_vector(unsigned(count) + 1);
|
||||
if (rst_n = '0' and unsigned(count) > 100) then
|
||||
rst_n <= '1';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end generate;
|
||||
|
||||
|
||||
head_proc_inst: entity work.head_data_proc
|
||||
port map (
|
||||
|
||||
rx_data => head_data,
|
||||
rx_clk => c_clk(0),
|
||||
clk_sys => clk100,
|
||||
rst_n => rst_n,
|
||||
cmd_reset => cmd_reset,
|
||||
--decoded outputs
|
||||
signature => sig_rx_clk,
|
||||
latch_pulse => head_lat(0)
|
||||
);
|
||||
signature <= sig_rx_clk;
|
||||
--Debugging. Added by DRM 25/08
|
||||
--debug_out(4)<= latch_pulse_rx_clk;
|
||||
debug_out <= (1=>head_lat(0), 2=>'1', 3=>'1', 5=>'1', 4=> '1');
|
||||
|
||||
|
||||
--sync_pulse_sv_inst: entity work.sync_pulse
|
||||
--port map (clk_in => lvds_rx_clk, rst_n => rst_n, pulse_in => latch_pulse_rx_clk, clk_out => clk100, pulse_out => latch_pulse);
|
||||
|
||||
latch_int: process (clk100,rst_n,cmd_reset)
|
||||
begin
|
||||
if (clk100'event and clk100 = '1') then
|
||||
--clock domain cross-over
|
||||
latch_pulse_rx_clk_d1 <= head_lat(0);
|
||||
latch_pulse_rx_clk_d2 <= latch_pulse_rx_clk_d1;
|
||||
if (latch_pulse_rx_clk_d2 = '0' and latch_pulse_rx_clk_d1 = '1') then
|
||||
latch_count <= std_logic_vector(unsigned(latch_count)+1);
|
||||
end if;
|
||||
end if;
|
||||
if (cmd_reset = '1' or rst_n='0') then
|
||||
latch_count <= (others => '0');
|
||||
end if;
|
||||
end process;
|
||||
|
||||
--Ring buffer
|
||||
write_fifo_inst: entity work.ring_buffer
|
||||
|
||||
generic map ( RAM_WIDTH => 17, RAM_DEPTH => 30)
|
||||
|
||||
port map (
|
||||
clk => clk100,
|
||||
rst_n => rst_n,
|
||||
|
||||
-- Write port
|
||||
wr_en => wr_fifo,
|
||||
wr_data => data_fifo_in,
|
||||
|
||||
-- Read port
|
||||
rd_en => read_fifo, --i2c is ready to read fifo
|
||||
rd_valid => wr_i2c_fifo_dv, --
|
||||
rd_data => data_frame_i2c_long, --16bit data frame + 1bit comand
|
||||
|
||||
-- Flags
|
||||
empty => wr_fifo_empty,
|
||||
empty_next => wr_fifo_empty_next,
|
||||
full => wr_full_fifo,
|
||||
full_next => wr_full_next,
|
||||
-- The number of elements in the FIFO
|
||||
fill_count => open
|
||||
);
|
||||
|
||||
proc_mcp4631_i2c:process(clk100)
|
||||
|
||||
-- the top bit of data_fifo_in, 17, indicated if the mcp4631 has to change to a write of read command.
|
||||
-- Edge detection to avoid problem of wr_aurt and rd_uart having a width of more than one clock
|
||||
|
||||
begin
|
||||
if rising_edge(clk100) then
|
||||
|
||||
rd_uart_d1 <= rd_uart;
|
||||
if ( wr_fifo_empty = '1' or wr_i2c_fifo_dv ='1' or i2c_mcp4631_busy = '1') then
|
||||
read_fifo <= '0'; --no data, or fifo is going to be empty in the next cycle
|
||||
elsif (( wr_fifo_empty = '0' and i2c_mcp4631_busy ='0' and start_w_mcp4631 = '0' and start_r_mcp4631 = '0')) then
|
||||
read_fifo <= '1'; --fifo is not empty
|
||||
else
|
||||
read_fifo <= '0';
|
||||
end if;
|
||||
|
||||
|
||||
--17th bith indicates if the command is read or write
|
||||
|
||||
wr_fifo <= '0';
|
||||
if ((wr_uart='1')or (rd_uart='1' and rd_uart_d1='0')) then
|
||||
wr_fifo <= '1';
|
||||
end if;
|
||||
|
||||
data_fifo_in <='0' & x"0000";
|
||||
if (wr_uart ='1') then
|
||||
data_fifo_in <= ('0' & reg_mcp4631_in);
|
||||
end if;
|
||||
|
||||
if (rd_uart = '1' and rd_uart_d1 ='0') then
|
||||
data_fifo_in <= ('1' & x"FFFF");
|
||||
end if;
|
||||
|
||||
start_w_mcp4631 <= '0';
|
||||
if (data_frame_i2c_long(16)='0' and wr_i2c_fifo_dv ='1') then
|
||||
start_w_mcp4631 <= '1';
|
||||
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 process;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate FPGA I2C
|
||||
------------------------------------------------------------------------------
|
||||
scl_out <= scl_ms_out;
|
||||
sda_out <= sda_ms_out;
|
||||
|
||||
-- Instantiate I2C I/O cells
|
||||
i2c_scl_io_inst : io_buf_i2c
|
||||
port map (
|
||||
datain(0) => scl_out,
|
||||
oe(0) => not scl_out,
|
||||
dataio(0) => scl_fpga,
|
||||
dataout(0) => scl_in
|
||||
);
|
||||
|
||||
i2c_sda_io_inst : io_buf_i2c
|
||||
port map (
|
||||
datain(0) => sda_out,
|
||||
oe(0) => not sda_out,
|
||||
dataio(0) => sda_fpga,
|
||||
dataout(0) => sda_in
|
||||
);
|
||||
|
||||
mcp4631_inst: entity work.mcp4631
|
||||
|
||||
--generic map(ADDRESS_MCP4631 => 16#58#) --0101100+w/r 6bit plus write and read.
|
||||
port map(
|
||||
clk => clk100,
|
||||
rst_n => rst_n,
|
||||
reg_mcp4631_in => data_frame_i2c, --data read from fifo
|
||||
reg_mcp4631_out => reg_mcp4631_out,
|
||||
scl_in => scl_in,
|
||||
scl_out => scl_ms_out,
|
||||
sda_in => sda_in,
|
||||
sda_out => sda_ms_out,
|
||||
wr_nbytes => wr_nbytes,
|
||||
i2c_address => i2c_address,
|
||||
start_w_i2c => start_w_mcp4631, -- reads from fifo
|
||||
start_r_i2c => start_r_mcp4631,
|
||||
i2c_master_rd_dv => i2c_m_dv,
|
||||
i2c_mcp4631_busy => i2c_mcp4631_busy -- flags end of write transaction
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------
|
||||
-- printhead eprom. It is connected to the HMB I2C
|
||||
----------------------------------------------------
|
||||
i2c_slv_simple_eprom_inst : i2c_slv_simple_eprom
|
||||
generic map ( DEVICE_ADDRESS => 16#13# )
|
||||
port map
|
||||
(
|
||||
clk => clk100,
|
||||
lvdsoe => lvdsoe,
|
||||
scl_in => hd_scl_in,
|
||||
scl_out => hd_scl_out_eprom,
|
||||
sda_in => hd_sda_in,
|
||||
sda_out => hd_sda_out_eprom,
|
||||
i2c_busy_out => eprom_busy,
|
||||
add_out => open,
|
||||
wr_data_out => open,
|
||||
wr_en_out => open,
|
||||
rd_en_out => open
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate Head I2C
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
hd_scl_out <= hd_scl_out_eprom;
|
||||
hd_sda_out <= hd_sda_out_eprom;
|
||||
|
||||
debug_scl <= '0' when (hd_scl_out_eprom = '0' or hd_scl_in = '0') else '1';
|
||||
debug_sda <= '0' when (hd_sda_out_eprom = '0' or hd_sda_in = '0') else '1';
|
||||
|
||||
|
||||
-- Instantiate I2C I/O cells
|
||||
hd_i2c_scl_io_inst : io_buf_i2c
|
||||
port map (
|
||||
datain(0) => hd_scl_out,
|
||||
oe(0) => not hd_scl_out,
|
||||
dataio(0) => hd_scl_fpga,
|
||||
dataout(0) => hd_scl_in
|
||||
);
|
||||
|
||||
hd_i2c_sda_io_inst : io_buf_i2c
|
||||
port map (
|
||||
datain(0) => hd_sda_out,
|
||||
oe(0) => not hd_sda_out,
|
||||
dataio(0) => hd_sda_fpga,
|
||||
dataout(0) => hd_sda_in
|
||||
);
|
||||
|
||||
--I2C temperature sensor process
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- uart interface
|
||||
------------------------------------------------------------------------------
|
||||
uart_inst: entity work.pei_debug_uart_0
|
||||
generic map (
|
||||
--Paramaters for the debugger
|
||||
ADDRESS_WIDTH => 8,
|
||||
DATA_WIDTH => 32,
|
||||
BAUD_RATE => 115200,
|
||||
TEST_MODE => TEST_MODE
|
||||
)
|
||||
port map (
|
||||
clk => clk100,
|
||||
dbg_ser_out => dbg_ser_out,
|
||||
dbg_ser_in => dbg_ser_in,
|
||||
-- write block
|
||||
add_out => add_uart,
|
||||
wr_data_out => wr_data_uart,
|
||||
wr_en_out => wr_en_uart,
|
||||
--read block
|
||||
rd_data_in => rd_data_uart,
|
||||
rd_en_out => rd_req_uart,
|
||||
rd_dv_in => rd_dv_uart,
|
||||
rd_32b_in => rd_32b_uart
|
||||
);
|
||||
add_uart_i <= to_integer(unsigned(add_uart));
|
||||
|
||||
WRITE_REG_PROC : process (clk100, rst_n)
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
cmd_reset <= '0';
|
||||
wf_sel <= (others => '0');
|
||||
eprom_addr <= (others => '0');
|
||||
eprom_wr_data <= (others => '0');
|
||||
wr_uart <= '0';
|
||||
elsif rising_edge(clk100) then
|
||||
cmd_reset <= '0'; -- self clear
|
||||
wr_uart <= '0';
|
||||
if wr_en_uart = '1' then
|
||||
|
||||
case add_uart_i is
|
||||
when ADDR_RESET => cmd_reset <= wr_data_uart(0);
|
||||
when ADDR_WAVEFORM_SEL => wf_sel <= wr_data_uart(wf_sel'range);
|
||||
when ADDR_THERMISTOR => reg_thermistor <= wr_data_uart(reg_thermistor'range);
|
||||
when ADDR_GP_OUT => pulse_length <= wr_data_uart(pulse_length'range); -- create dedicated register later for the green led
|
||||
when ADDR_EPROM_ADDR => eprom_addr <= wr_data_uart(eprom_addr'range);
|
||||
when ADDR_EPROM_WR_DATA => eprom_wr_data <= wr_data_uart(eprom_wr_data'range);
|
||||
when ADDR_STM8_W_NBYTES => wr_nbytes <= wr_data_uart(wr_nbytes'range);
|
||||
when ADDR_MCP4631 => reg_mcp4631_in <= wr_data_uart(reg_mcp4631_in'range);
|
||||
wr_uart <= '1';
|
||||
when I2C_ADDR_STM8 => i2c_address <= wr_data_uart(7 downto 0);
|
||||
when others => NULL;
|
||||
end case;
|
||||
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
READ_REG_PROC : process (clk100, rst_n)
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
rd_data_uart <= (others => '0');
|
||||
rd_32b_uart <= '0';
|
||||
rd_dv_uart <= '0';
|
||||
rd_uart <='0';
|
||||
elsif rising_edge(clk100) then
|
||||
rd_data_uart <= (others => '0');
|
||||
rd_uart <='0';
|
||||
rd_32b_uart <= '0'; -- default to 16 bit read back
|
||||
rd_dv_uart <= '0';
|
||||
rd_uart <= '0';
|
||||
|
||||
if rd_req_uart = '1' then --it las two clock. Modify to make 1 clk width
|
||||
|
||||
case add_uart_i is
|
||||
when ADDR_ID => rd_data_uart(D3000_PEI_ID'range) <= D3000_PEI_ID; rd_32b_uart <= '1'; -- D3000_PEI_ID is 32 bit
|
||||
when ADDR_VERSION => rd_data_uart(FPGA_VERSION'range) <= FPGA_VERSION;
|
||||
when ADDR_STATUS => null;
|
||||
when ADDR_WAVEFORM_SEL => rd_data_uart(wf_sel'range) <= wf_sel;
|
||||
when ADDR_LATCH_COUNT => rd_data_uart(latch_count'range) <= latch_count;
|
||||
when ADDR_DATA_SIGNATURE => rd_data_uart(signature'range) <= signature; rd_32b_uart <= '1'; -- signature is 32 bit
|
||||
when ADDR_GP_OUT => rd_data_uart(pulse_length'range) <= pulse_length; rd_32b_uart <= '1';
|
||||
when ADDR_THERMISTOR => rd_data_uart(reg_thermistor'range) <= reg_thermistor;
|
||||
when ADDR_REG_LMP275 => rd_data_uart(conf_tmp275'range) <= conf_tmp275;
|
||||
when ADDR_THIGH_LMP275 => rd_data_uart(Thigh_tmp275'range) <= Thigh_tmp275;
|
||||
when ADDR_TLOW_LMP275 => rd_data_uart(Tlow_tmp275'range) <= Tlow_tmp275;
|
||||
when ADDR_STM8_W_NBYTES => rd_data_uart(wr_nbytes'range) <= wr_nbytes;
|
||||
|
||||
-- the registers below are related to D3000
|
||||
when ADDR_SP_COMA => rd_data_uart(sp_table_comA'range) <= sp_table_comA;
|
||||
when ADDR_SP_COMB => rd_data_uart(sp_table_comB'range) <= sp_table_comB;
|
||||
when ADDR_SP_COMC => rd_data_uart(sp_table_comC'range) <= sp_table_comC;
|
||||
|
||||
when ADDR_MCP4631 => rd_uart <= '1';
|
||||
when ADDR_EPROM_ADDR => rd_data_uart(eprom_addr'range) <= eprom_addr;
|
||||
when ADDR_EPROM_RD_DATA => rd_data_uart(eprom_wr_data'range) <= eprom_wr_data;
|
||||
when I2C_ADDR_STM8 => rd_data_uart(15 downto 0) <= x"00" & i2c_address;
|
||||
|
||||
when others => NULL;
|
||||
end case;
|
||||
|
||||
|
||||
if (rd_dv_uart='0' and start_r_mcp4631='1' and add_uart_i=ADDR_MCP4631) then -- The read I2C transaction has not started yet
|
||||
rx_i2c_flag <= '1';
|
||||
end if;
|
||||
|
||||
if (i2c_m_dv='1' and add_uart_i=ADDR_MCP4631 and i2c_mcp4631_busy='1' and rx_i2c_flag ='1') then
|
||||
rd_dv_uart <= '1';
|
||||
rd_data_uart(reg_mcp4631_out'range) <= reg_mcp4631_out;
|
||||
rx_i2c_flag <= '0';
|
||||
elsif (i2c_m_dv='0' and add_uart_i=ADDR_MCP4631 and i2c_mcp4631_busy='1' and rx_i2c_flag ='1') then
|
||||
rd_dv_uart <= '0';
|
||||
rx_i2c_flag <= '1';
|
||||
elsif (i2c_mcp4631_busy = '0' and add_uart_i=ADDR_MCP4631 and rx_i2c_flag ='1' ) then
|
||||
rd_dv_uart <= '1';
|
||||
rd_data_uart(reg_mcp4631_in'range) <= x"ABCD"; --The I2C transaction failed
|
||||
rx_i2c_flag <= '0';
|
||||
elsif (add_uart_i=ADDR_MCP4631 and rx_i2c_flag ='0' ) then -- wait for start_r_mcp4631 to change to 1
|
||||
rd_dv_uart <= '0';
|
||||
else
|
||||
rd_dv_uart <= '1';
|
||||
rx_i2c_flag <= '0';
|
||||
end if;
|
||||
|
||||
-- rd_dv_uart <= '1'; -- always return something to stop hang up
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate PID
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate Power Control
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Instantiate wave sequencers
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- LED205 Pulse
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
LED_PROC: process(clk100,rst_n) --counter register 31 bit enable
|
||||
|
||||
begin
|
||||
if (rst_n='0') then
|
||||
|
||||
led_n <='0';
|
||||
counter_led <=(others =>'0');
|
||||
|
||||
elsif(clk100'event and clk100='1') then
|
||||
|
||||
if counter_led = pulse_length then
|
||||
led_n <= not led_n;
|
||||
counter_led <= (others =>'0');
|
||||
else
|
||||
counter_led <= std_logic_vector(unsigned(counter_led)+1);
|
||||
|
||||
end if;
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
nled_g <= led_n;
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Shutdown
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
end architecture struct;
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
|
||||
|
||||
package pei_register_pkg is
|
||||
|
||||
-- System UART addresses
|
||||
constant ADDR_ID : integer := 0;
|
||||
constant ADDR_VERSION : integer := 1;
|
||||
constant ADDR_RESET : integer := 2;
|
||||
constant ADDR_STATUS : integer := 3;
|
||||
constant ADDR_WAVEFORM_SEL : integer := 4;
|
||||
constant ADDR_LATCH_COUNT : integer := 5;
|
||||
constant ADDR_DATA_SIGNATURE : integer := 6;
|
||||
constant ADDR_MCP4631 : integer := 7;
|
||||
constant ADDR_GP_OUT : integer := 8;
|
||||
constant ADDR_GP_IN : integer := 9;
|
||||
constant ADDR_REG_LMP275 : integer := 10;
|
||||
constant ADDR_THIGH_LMP275 : integer := 11;
|
||||
constant ADDR_TLOW_LMP275 : integer := 12;
|
||||
constant ADDR_STM8_W_NBYTES : integer := 14;
|
||||
constant I2C_ADDR_STM8 : integer := 15;
|
||||
constant ADDR_EPROM_ADDR : integer := 16;
|
||||
constant ADDR_EPROM_WR_DATA : integer := 17;
|
||||
constant ADDR_EPROM_RD_DATA : integer := 18;
|
||||
constant ADDR_SP_COMA : integer := 19;
|
||||
constant ADDR_SP_COMB : integer := 20;
|
||||
constant ADDR_SP_COMC : integer := 21;
|
||||
constant ADDR_THERMISTOR : integer := 22;
|
||||
constant D3000_PEI_ID : std_logic_vector(31 downto 0):= x"000F1024";
|
||||
|
||||
-- TMP275 addresses
|
||||
constant TemperatureRegisterAddress : integer := 0;
|
||||
constant ConfigRegisterAddress : integer := 1;
|
||||
constant HysteresisRegisterAddressLow : integer := 2;
|
||||
constant HysteresisRegisterAddressHigh : integer := 3;
|
||||
|
||||
end pei_register_pkg;
|
||||
|
||||
|
||||
|
||||
package body pei_register_pkg is
|
||||
|
||||
end pei_register_pkg;
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
c1_clk -> m15
|
||||
c2_clk -> m6
|
||||
c1_lat -> l15 -> dac_out36
|
||||
c2_lat -> r4 -> dac_out3
|
||||
d0 -> p8 -> dac_out10
|
||||
d1 -> r7 -> dac_out8
|
||||
d2 -> t7 -> dac_out7
|
||||
d3 -> r6 -> dac_out5
|
||||
d4 -> t6 -> dac_out6
|
||||
d5 -> t5 -> dac_out0
|
||||
d6 -> r5 -> dac_out1
|
||||
d7 -> t4 -> dac_out2
|
||||
two_col -> n9 -> dac_out34
|
||||
head_sda -> r14 -> dac_out29
|
||||
head_scl -> t15 -> dac_out28
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
|
||||
|
||||
package PKG_FUNCTIONS_PEI is
|
||||
|
||||
function LOG2(N : integer) return integer;
|
||||
function NUM_BITS(N : integer) return integer;
|
||||
function NUM_BITS_NON_ZERO(N : integer) return integer;
|
||||
function REMAPD3000VEC( VIN: std_logic_vector) return std_logic_vector;
|
||||
|
||||
|
||||
constant DI2T3 : integer := 1;
|
||||
constant DI4T4 : integer := 2;
|
||||
constant DE1 : integer := 3;
|
||||
constant DI1T4 : integer := 4;
|
||||
constant DI3T3 : integer := 5;
|
||||
constant DI1T2 : integer := 6;
|
||||
constant DI1T6 : integer := 7;
|
||||
constant DI2T2 : integer := 8;
|
||||
constant DI4T3 : integer := 9;
|
||||
constant DI4T2 : integer := 10;
|
||||
constant DI2T6 : integer := 11;
|
||||
constant DI3T2 : integer := 12;
|
||||
constant DI4T5 : integer := 13;
|
||||
constant DE2 : integer := 14;
|
||||
constant DI3T6 : integer := 15;
|
||||
constant DI3T1 : integer := 16;
|
||||
constant DI2T5 : integer := 17;
|
||||
constant DI1T1 : integer := 18;
|
||||
constant DI4T6 : integer := 19;
|
||||
constant DI4T1 : integer := 20;
|
||||
constant DI1T5 : integer := 21;
|
||||
constant DI2T1 : integer := 22;
|
||||
constant DI2T4 : integer := 23;
|
||||
constant DI3T5 : integer := 24;
|
||||
constant DI1T3 : integer := 26;
|
||||
constant DI3T4 : integer := 27;
|
||||
|
||||
constant commandvec : std_logic_vector(27 downto 0) :=(DI1T1 => '1', DI1T2 => '1', DI1T3 => '1', DI1T4 => '1', DI1T5 => '1', DI1T6 => '1', others =>'0');
|
||||
|
||||
|
||||
end PKG_FUNCTIONS_PEI;
|
||||
|
||||
|
||||
|
||||
package body PKG_FUNCTIONS_PEI is
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
--Returns the log to base 2 of an integer (for N=2^i where i is an integer)
|
||||
-------------------------------------------------------------------------------
|
||||
function LOG2(N : integer) return integer is
|
||||
begin
|
||||
if(N = 1) then
|
||||
return 0;
|
||||
elsif (N = 0) then
|
||||
--pragma translate_off
|
||||
report "Invalid input for LOG2 function" severity error;
|
||||
--pragma translate_on
|
||||
return 0;
|
||||
else
|
||||
return 1 + LOG2(N/2);
|
||||
end if;
|
||||
end LOG2;
|
||||
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
--Returns the width of the bit vector necessary to encode an integer
|
||||
-------------------------------------------------------------------------------
|
||||
function NUM_BITS(N : integer) return integer is
|
||||
begin
|
||||
if N < 0 then
|
||||
--pragma translate_off
|
||||
report "NUM_BITS function does not work for integers < 0" severity error;
|
||||
--pragma translate_on
|
||||
return 0;
|
||||
elsif N=0 then
|
||||
return 0;
|
||||
else
|
||||
return LOG2(N)+1;
|
||||
end if;
|
||||
end NUM_BITS;
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
--Calculate the number of bits required to hold an integer
|
||||
--Return 1 if the integer is 0 or 1
|
||||
--Zero is never returned
|
||||
function NUM_BITS_NON_ZERO(N : integer) return positive is
|
||||
begin
|
||||
if N=0 or N=1 then
|
||||
return 1;
|
||||
else
|
||||
return NUM_BITS(N);
|
||||
end if;
|
||||
end NUM_BITS_NON_ZERO;
|
||||
------------------------------------------------------------------------------
|
||||
--remap the desarialised output data from adjecent bit from same data line to bit sampled the same clock
|
||||
--D3000 data format is 4 data lines with a deser factor of 7
|
||||
-------------------------------------------------------------------------------
|
||||
function REMAPD3000VEC( VIN: std_logic_vector) return std_logic_vector is
|
||||
variable VOUT: std_logic_vector(VIN'length-1 downto 0);
|
||||
begin
|
||||
loop1: for i in 0 to 6 loop
|
||||
loop2: for j in 0 to 3 loop
|
||||
VOUT(4*i+j) := VIN(7*(3-j)+i);
|
||||
end loop;
|
||||
end loop;
|
||||
return VOUT;
|
||||
end REMAPD3000VEC;
|
||||
|
||||
|
||||
end PKG_FUNCTIONS_PEI;
|
||||
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
entity ring_buffer is
|
||||
generic (
|
||||
RAM_WIDTH : natural;
|
||||
RAM_DEPTH : natural
|
||||
);
|
||||
port (
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
-- Write port
|
||||
wr_en : in std_logic;
|
||||
wr_data : in std_logic_vector(RAM_WIDTH - 1 downto 0);
|
||||
|
||||
-- Read port
|
||||
rd_en : in std_logic;
|
||||
rd_valid : out std_logic;
|
||||
rd_data : out std_logic_vector(RAM_WIDTH - 1 downto 0);
|
||||
|
||||
-- Flags
|
||||
empty : out std_logic;
|
||||
empty_next : out std_logic;
|
||||
full : out std_logic;
|
||||
full_next : out std_logic;
|
||||
|
||||
-- The number of elements in the FIFO
|
||||
fill_count : out integer range RAM_DEPTH - 1 downto 0
|
||||
);
|
||||
end ring_buffer;
|
||||
|
||||
architecture rtl of ring_buffer is
|
||||
|
||||
signal wr_en_d1, rd_en_d1 :std_logic;
|
||||
type ram_type is array (0 to RAM_DEPTH - 1) of std_logic_vector(wr_data'range);
|
||||
signal ram : ram_type :=(others => (others =>'0'));
|
||||
|
||||
subtype index_type is integer range ram_type'range;
|
||||
signal ptr_wr : index_type; --pointer write
|
||||
signal ptr_rd : index_type; --pointer read
|
||||
|
||||
signal empty_i : std_logic;
|
||||
signal full_i : std_logic;
|
||||
signal wr_ram : std_logic;
|
||||
signal rd_ram : std_logic;
|
||||
signal fill_count_i : integer range RAM_DEPTH - 1 downto 0;
|
||||
|
||||
-- Increment and wrap
|
||||
procedure incr(signal index : inout index_type) is
|
||||
begin
|
||||
if index = index_type'high then
|
||||
index <= index_type'low;
|
||||
else
|
||||
index <= index + 1;
|
||||
end if;
|
||||
end procedure;
|
||||
|
||||
begin
|
||||
|
||||
-- Copy internal signals to output
|
||||
empty <= empty_i;
|
||||
full <= full_i;
|
||||
fill_count <= fill_count_i;
|
||||
|
||||
-- Set the flags
|
||||
empty_i <= '1' when fill_count_i = 0 else '0';
|
||||
empty_next <= '1' when fill_count_i <= 1 else '0';
|
||||
full_i <= '1' when fill_count_i >= RAM_DEPTH - 1 else '0';
|
||||
full_next <= '1' when fill_count_i >= RAM_DEPTH - 2 else '0';
|
||||
|
||||
-- Update the head pointer in write
|
||||
PROC_HEAD : process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
if rst_n = '0' then
|
||||
wr_ram <= '0';
|
||||
ptr_wr <=0;
|
||||
--ptr_wr_next <=0;
|
||||
else
|
||||
wr_ram <='0';
|
||||
if (wr_en='1'and full_i = '0') then
|
||||
incr(ptr_wr);
|
||||
--wr_data_int <= wr_data;
|
||||
end if;
|
||||
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- Update the tail pointer on read and pulse valid
|
||||
PROC_TAIL : process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
if rst_n = '0' then
|
||||
rd_valid <= '0';
|
||||
ptr_rd <= 0;
|
||||
else
|
||||
|
||||
if (rd_en= '1' and empty_i = '0' and rd_valid = '0') then --turn rd_valid into 1 pulse
|
||||
incr(ptr_rd);
|
||||
rd_valid <= '1';
|
||||
else
|
||||
rd_valid <= '0';
|
||||
end if;
|
||||
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- Write to and read from the RAM
|
||||
PROC_RAM : process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
ram(ptr_wr) <= wr_data;
|
||||
rd_data <= ram(ptr_rd);
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- Update the fill count
|
||||
PROC_COUNT : process(ptr_wr, ptr_rd)
|
||||
begin
|
||||
if ptr_wr < ptr_rd then
|
||||
fill_count_i <= ptr_wr - ptr_rd + RAM_DEPTH;
|
||||
else
|
||||
fill_count_i <= ptr_wr - ptr_rd;
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
proc_edge :process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
wr_en_d1 <= wr_en;
|
||||
rd_en_d1 <= rd_en;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end architecture;
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
0f
|
||||
30
|
||||
50
|
||||
32
|
||||
36
|
||||
30
|
||||
39
|
||||
ad
|
||||
ad
|
||||
ad
|
||||
30
|
||||
30
|
||||
ad
|
||||
30
|
||||
55
|
||||
4f
|
||||
44
|
||||
4e
|
||||
47
|
||||
4d
|
||||
4a
|
||||
0a
|
||||
ff // invalid
|
||||
ff // invalid
|
||||
ff // invalid
|
||||
ff // invalid
|
||||
ff // invalid
|
||||
|
|
@ -1,373 +0,0 @@
|
|||
//----------------------------------------------------------------------------
|
||||
// Module Description
|
||||
//
|
||||
// This is a simple I2C master, and does not support multi-master applications.
|
||||
// The Clock Divider is the ratio between the main clock input, and the required I2C clock.
|
||||
// The default build assumes a 400kHz I2C clock, and an input clock of 24MHz.
|
||||
// This gives a clock divider of 24000/400 = 60.
|
||||
//
|
||||
// The design is based around 4 clock phases : scl falling, sda change, scl rising, sda read,
|
||||
// the timing of these is derived from the clock divider
|
||||
//
|
||||
// Note SDA expects a tristate-able IO cell, emulating on OD output.
|
||||
// When SDA is low, output a zero, when high, I/O cell must go to tristate, otherwise reads will not work.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
// Revision Date Author Notes
|
||||
//
|
||||
// 1.0 14-8-2015 GJL First Written
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
`resetall
|
||||
`timescale 1ns/1ps
|
||||
module simple_i2c_masterPEI #(
|
||||
parameter CLOCK_DIVIDER = 10'd200 // Must be >= 4
|
||||
)
|
||||
(
|
||||
input wire clk,
|
||||
input wire scl_in,
|
||||
output wire scl_out,
|
||||
input wire sda_in,
|
||||
output wire sda_out,
|
||||
input wire [7:0] cmd_wr_cnt_in,
|
||||
input wire [7:0] cmd_rd_cnt_in,
|
||||
input wire [7:0] wr_data_in,
|
||||
input wire wr_dv_in,
|
||||
output wire rdy_for_data_out,
|
||||
output wire rdy_for_cmd_out,
|
||||
output wire dv_out,
|
||||
output wire [7:0] rd_data_out,
|
||||
output wire error
|
||||
);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Internal Declarations
|
||||
//----------------------------------------------------------------------------
|
||||
// Parameters
|
||||
// Timing
|
||||
localparam CLK_DIV_TC = CLOCK_DIVIDER - 10'd1;
|
||||
localparam SCL_FE_CNT = 10'd0; // SCL FE at 0d
|
||||
localparam SDA_WR_CNT = {2'b0, CLOCK_DIVIDER[9:2]}; // SDA Write at 90d
|
||||
localparam SCL_RE_CNT = {1'b0, CLOCK_DIVIDER[9:1]}; // SCL RE at 180d
|
||||
localparam SDA_RD_CNT = SCL_RE_CNT + SDA_WR_CNT; // SDA Read at 270d
|
||||
localparam IDLE_PULSE_CNT = SDA_RD_CNT;
|
||||
|
||||
// I2C State Machine States
|
||||
localparam IDLE = 4'd0;
|
||||
localparam START = 4'd1;
|
||||
localparam TX_BYTE = 4'd2;
|
||||
localparam SLV_ACK = 4'd3;
|
||||
localparam RX_BYTE = 4'd4;
|
||||
localparam MSTR_ACK = 4'd5;
|
||||
localparam STOP = 4'd7;
|
||||
|
||||
|
||||
|
||||
// Internal Signals
|
||||
// Clock generation
|
||||
reg [9:0] clk_en_cnt = 10'd0;
|
||||
reg [9:0] clk_enn_cnt = 10'd0;
|
||||
wire clk_en_tc;
|
||||
wire clk_enn_tc;
|
||||
wire scl_re;
|
||||
wire scl_fe;
|
||||
wire sda_wr;
|
||||
wire sda_rd;
|
||||
wire idle_pulse;
|
||||
|
||||
// I2C byte control
|
||||
reg [2:0] bit_cnt = 3'd0;
|
||||
reg in_byte = 1'b0;
|
||||
reg in_cmd = 1'b0;
|
||||
reg [7:0] wr_cnt = 8'd0;
|
||||
reg [7:0] rd_cnt = 8'd0;
|
||||
reg [7:0] wr_byte = 8'd0;
|
||||
reg [7:0] rd_byte = 8'd0;
|
||||
reg [3:0] next_state = START;
|
||||
reg [3:0] state = IDLE;
|
||||
reg next_scl_en = 1'b0;
|
||||
reg scl_en = 1'b0;
|
||||
reg sda = 1'b1;
|
||||
reg scl = 1'b1;
|
||||
reg err = 1'b0;
|
||||
reg sda_pr = 1'b1;
|
||||
reg [15:0] sda_mon = 16'b0;
|
||||
reg [15:0] scl_mon = 16'b0;
|
||||
reg [9:0] holdoff = 10'd0;
|
||||
reg [7:0] idle_cnt = 8'd255;
|
||||
reg dv_tx = 1'b0;
|
||||
reg shiftdone = 1'b0;
|
||||
reg endpulse = 1'b0;
|
||||
reg wr_status = 1'd0;
|
||||
wire scl_stall;
|
||||
wire wr_byte_pending;
|
||||
wire rd_byte_pending;
|
||||
wire rd_dv;
|
||||
|
||||
wire bus_idle;
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Output assignments
|
||||
//----------------------------------------------------------------------------
|
||||
assign scl_out = scl;
|
||||
assign sda_out = sda | err;
|
||||
assign dv_out = rd_dv;
|
||||
assign rd_data_out = rd_byte;
|
||||
assign rdy_for_data_out = dv_tx;//(~in_byte);
|
||||
assign rdy_for_cmd_out = (~in_cmd);
|
||||
assign error = err;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Clock generation
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if ((~in_byte) | clk_en_tc) clk_en_cnt <= 10'd0; // Don't generate clock enables unless in a byte
|
||||
else if (~scl_stall) clk_en_cnt <= clk_en_cnt + 1; // If SCL has stalled, pause the count
|
||||
|
||||
if (clk_enn_tc) clk_enn_cnt <= 10'd0;
|
||||
else if (clk_en_cnt == 10'd1)
|
||||
clk_enn_cnt <= 10'd2;
|
||||
else
|
||||
clk_enn_cnt <= clk_enn_cnt + 1;
|
||||
end
|
||||
|
||||
assign clk_en_tc = (clk_en_cnt == CLK_DIV_TC);
|
||||
assign clk_enn_tc = (clk_enn_cnt== CLK_DIV_TC);
|
||||
assign scl_fe = (clk_en_cnt == SCL_FE_CNT); //falling edge
|
||||
assign sda_wr = (clk_en_cnt == SDA_WR_CNT);
|
||||
assign scl_re = (clk_en_cnt == SCL_RE_CNT);
|
||||
assign sda_rd = (~scl_stall) & (clk_en_cnt == SDA_RD_CNT); // SCL Stall can only occur after SCL_FE, so only need to gate SDA RD against this.
|
||||
assign idle_pulse = (clk_enn_cnt == IDLE_PULSE_CNT);
|
||||
|
||||
|
||||
// SCL generation
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (scl_en)
|
||||
begin
|
||||
if (scl_re | state == IDLE | state == START) scl <= 1'b1; // line changed by DRM
|
||||
else if (scl_fe) scl <= 1'b0;
|
||||
end
|
||||
else scl<=1'b1; // when disable, leave scl open drain
|
||||
end
|
||||
|
||||
assign scl_stall = (scl==1'b1) & (scl_in==1'b0); // Used to detect slave holding clock low during interrupts etc.
|
||||
|
||||
assign bus_idle = (idle_cnt == 8'd0);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C state machine
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
// Byte Control
|
||||
assign wr_byte_pending = (|wr_cnt);
|
||||
assign rd_byte_pending = (|rd_cnt);
|
||||
assign rd_dv = (state == MSTR_ACK ) & sda_rd; // Generate read dv pulse
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C Master State Machine
|
||||
// All state transitions shall occur on sda_rd (fourth phase of the clock), to ensure timing is correct throughout.
|
||||
always @(posedge clk)
|
||||
begin
|
||||
case (state)
|
||||
IDLE : begin
|
||||
bit_cnt <= 3'd0;
|
||||
scl_en <= 1'd1;
|
||||
dv_tx <= 1'b0;
|
||||
shiftdone <= 1'd0;
|
||||
endpulse <= 1'd0;
|
||||
|
||||
//if (holdoff != 10'd0) I am moving the holdoff timing to the end of the frame
|
||||
//holdoff <= holdoff - 10'd1;
|
||||
|
||||
if (wr_dv_in == 1'b1) // SCL and in_byte must be disabled on entry to IDLE state.
|
||||
begin
|
||||
in_byte <= 1'b1;
|
||||
in_cmd <= 1'b1;
|
||||
err <= 1'b0;
|
||||
scl_en <= 1'b1;
|
||||
wr_cnt <= cmd_wr_cnt_in - 8'd1; // load number of words
|
||||
wr_byte <= wr_data_in;
|
||||
//next_state <= in_cmd ? TX_BYTE : START;
|
||||
//state <= START; // if wr_dv_in is high move to START
|
||||
state <= START;
|
||||
rd_cnt <= wr_data_in[0] ? cmd_rd_cnt_in : 8'd0; // At this point, it is always a new command
|
||||
wr_status <= wr_data_in[0];
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
START : begin
|
||||
dv_tx <= 1'b0;
|
||||
sda <= 1'b0;
|
||||
//if (sda_wr) sda <= 1'b0; // Drive SDA low while SCL is high (disabled), to generate START condition.
|
||||
|
||||
if (sda_wr)
|
||||
begin
|
||||
state <= TX_BYTE;
|
||||
//scl_en <= 1'b1; // Enable SCL after start bit is sent. This is done here, not just in
|
||||
//sda <= 1'b1; // release data line
|
||||
//in_byte <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
TX_BYTE : begin
|
||||
//in_byte <= 1'b1;
|
||||
dv_tx <= 1'b0;
|
||||
if (sda_wr & !shiftdone ) sda <= wr_byte[7]; // SDA sends data MSb first
|
||||
if (sda_wr & !shiftdone) wr_byte <= {wr_byte[6:0], 1'b0}; // Shift bits along each SCL rising edge
|
||||
if (sda_wr & !shiftdone) sda_pr <= wr_byte[7];
|
||||
if (sda_wr & !shiftdone) bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
if (sda_wr & (&bit_cnt)) // stop when 8bit shift data is completed/
|
||||
begin
|
||||
shiftdone = 1'b1;
|
||||
//state <= SLV_ACK;
|
||||
//bit_cnt <= 3'd0;
|
||||
//sda <= 1'b1;
|
||||
end
|
||||
|
||||
if (sda_rd & (|bit_cnt)) begin
|
||||
if ((sda_pr == 1'b1) && (sda_pr != sda_in)) begin
|
||||
err <= 1'b1;
|
||||
state <= STOP;
|
||||
holdoff <= 10'd100;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (scl_fe & shiftdone) // transaction at 8th falling edge. Wait for slave to clock 8th bit
|
||||
begin
|
||||
state <= SLV_ACK;
|
||||
dv_tx <= 1'b1;
|
||||
shiftdone <= 1'b0;
|
||||
bit_cnt <= 3'd0;
|
||||
sda <= 1'b1; // release sda
|
||||
end
|
||||
end
|
||||
SLV_ACK : begin
|
||||
|
||||
// This cycle corresponds to the 9th bit. It checks if the slave acknowledges the receive
|
||||
|
||||
dv_tx <= 1'b0;
|
||||
|
||||
if (scl_re)
|
||||
begin
|
||||
|
||||
if (sda_in == 1'b0)
|
||||
begin
|
||||
if (wr_byte_pending & ~wr_status)
|
||||
begin
|
||||
state <= TX_BYTE;
|
||||
wr_cnt <= wr_cnt - 8'd1;
|
||||
wr_byte <= wr_data_in;
|
||||
end
|
||||
else if (wr_status)
|
||||
begin
|
||||
state <= SLV_ACK; // wait for a sda_rd event to change state to RX_BYTE
|
||||
rd_cnt <= rd_cnt -8'd1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
state <= STOP;
|
||||
holdoff <= 10'd10;
|
||||
sda <=1'b0; //prepapre sda line to generate stop condition
|
||||
end
|
||||
|
||||
end
|
||||
else if (sda_in==1'b1)
|
||||
begin
|
||||
state <= STOP;
|
||||
holdoff <= 10'd10;
|
||||
end
|
||||
end
|
||||
|
||||
if(sda_rd & wr_status) state <= RX_BYTE;
|
||||
|
||||
end
|
||||
|
||||
|
||||
RX_BYTE : begin
|
||||
|
||||
if (scl_fe) sda <= 1'b1; //ensure sda is release at the end of the pulse after ACK and slv_ack
|
||||
if (sda_rd)
|
||||
begin
|
||||
rd_byte <= {rd_byte[6:0], sda_in}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1;
|
||||
if (bit_cnt == 3'd7)
|
||||
begin
|
||||
state <= MSTR_ACK; // If last bit, go to Master Acknowledge state
|
||||
rd_cnt <= rd_cnt - 8'd1; // If last bit, decrement the read count
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
MSTR_ACK : begin
|
||||
wr_status <= 1'd0;
|
||||
if (sda_wr) sda <= rd_byte_pending ? 1'b0 : 1'b1; //Generate NACK or ACK depending if it the last byte
|
||||
if (sda_rd) state <= rd_byte_pending ? RX_BYTE : STOP; // If read bytes pending, get the next one, else generate STOP.
|
||||
end
|
||||
|
||||
|
||||
STOP : begin
|
||||
// Disable SCL after rising edge and SDA stable position
|
||||
if (sda_rd & endpulse)
|
||||
begin
|
||||
state <= IDLE;
|
||||
sda <= 1'b1; // generate stop condition
|
||||
idle_cnt <= 8'd32;
|
||||
in_cmd <= 1'b0;
|
||||
in_byte <= 1'b0;
|
||||
endpulse <= 1'b0;
|
||||
wr_status <= 1'd0;
|
||||
end
|
||||
if(scl_fe) endpulse <= 1'b1;
|
||||
if(scl_fe) sda <= 1'b0; // prepare stop condition after an NACK
|
||||
end
|
||||
|
||||
|
||||
|
||||
default : begin // If we end up here, force a STOP condition.
|
||||
dv_tx <= 1'b0;
|
||||
scl_en <= 1'b1; // Enable SCL for clock
|
||||
in_byte <= 1'b1; // Fake in_byte, to block new writes and allow clock to run
|
||||
state <= STOP;
|
||||
endpulse <= 1'b0;
|
||||
wr_status <= 1'd0;
|
||||
end
|
||||
|
||||
endcase
|
||||
end
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,273 +0,0 @@
|
|||
//----------------------------------------------------------------------------
|
||||
// Module Description
|
||||
//
|
||||
// This is a simple I2C slave, with device address fixed at instantiation.
|
||||
// Data format is 2-Byte Address, 1-Byte data on writes. For reads a 2-byte
|
||||
// address write is sent, followed by a 1-byte read.
|
||||
//
|
||||
// When SDA is low, output a zero, when high, I/O cell must go to tristate, otherwise reads will not work.
|
||||
//
|
||||
// Input clock must be at least 12x higher than I2C SCL frequency, i.e. >1.2MHz for 100kHz, >4.8MHz for 400kHz.
|
||||
//----------------------------------------------------------------------------
|
||||
// Revision Date Author Notes
|
||||
//
|
||||
// 1.0 14-8-2015 GJL First Written
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
`resetall
|
||||
`timescale 1ns/1ps
|
||||
module simple_i2c_slave
|
||||
(
|
||||
input wire clk,
|
||||
input wire scl_in,
|
||||
output wire scl_out,
|
||||
input wire sda_in,
|
||||
output wire sda_out,
|
||||
output wire i2c_busy_out,
|
||||
output wire [15:0] add_out,
|
||||
output wire [7:0] wr_data_out,
|
||||
output wire wr_en_out,
|
||||
output wire rd_en_out,
|
||||
input wire [7:0] rd_data_in,
|
||||
input wire rd_dv_in
|
||||
);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Internal Declarations
|
||||
//----------------------------------------------------------------------------
|
||||
// Parameters
|
||||
parameter DEVICE_ADDRESS = 7'h4b; // 7 bit Device Address
|
||||
parameter WR_SIZE = 2'd2;
|
||||
|
||||
// Timing
|
||||
|
||||
// I2C State Machine States
|
||||
localparam IDLE = 3'd0;
|
||||
localparam RX_BYTE = 3'd1;
|
||||
localparam SLV_ACK = 3'd2;
|
||||
localparam ACK_HOLD = 3'd3;
|
||||
localparam TX_BYTE = 3'd4;
|
||||
|
||||
|
||||
// Internal Signals
|
||||
reg [2:0] scl_sr = 3'b111;
|
||||
reg [2:0] sda_sr = 3'b111;
|
||||
|
||||
wire scl_re;
|
||||
wire scl_fe;
|
||||
wire scl_hi;
|
||||
wire sda_re;
|
||||
wire sda_fe;
|
||||
wire start;
|
||||
wire stop;
|
||||
|
||||
reg [2:0] bit_cnt = 3'd0;
|
||||
reg [1:0] byte_cnt = 2'd0;
|
||||
reg sda = 1'b1;
|
||||
reg scl = 1'b1;
|
||||
reg read_pending = 1'b0;
|
||||
reg rnw = 1'b0;
|
||||
|
||||
reg [2:0] next_state = RX_BYTE;
|
||||
reg [2:0] state = IDLE;
|
||||
|
||||
reg [15:0] add = 16'd0;
|
||||
reg [7:0] wr_data = 8'd0;
|
||||
reg wr_en = 1'b0;
|
||||
reg i2c_busy = 1'b0;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Output assignments
|
||||
//----------------------------------------------------------------------------
|
||||
assign scl_out = scl;
|
||||
assign sda_out = sda;
|
||||
assign i2c_busy_out = i2c_busy;
|
||||
assign add_out = add;
|
||||
assign wr_data_out = wr_data;
|
||||
assign wr_en_out = wr_en;
|
||||
assign rd_en_out = read_pending;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Input detection
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
scl_sr <= {scl_sr[1:0], scl_in};
|
||||
sda_sr <= {sda_sr[1:0], sda_in};
|
||||
end
|
||||
|
||||
assign scl_re = (scl_sr[2:1] == 2'b01);
|
||||
assign scl_fe = (scl_sr[2:1] == 2'b10);
|
||||
assign scl_hi = (scl_sr[2:1] == 2'b11);
|
||||
|
||||
assign sda_re = (sda_sr[2:1] == 2'b01);
|
||||
assign sda_fe = (sda_sr[2:1] == 2'b10);
|
||||
|
||||
assign start = sda_fe & scl_hi;
|
||||
assign stop = sda_re & scl_hi;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C state machine
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
reg [7:0] rd_byte = 8'd0;
|
||||
reg [7:0] rd_data = 8'd0;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C Slave State Machine
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
case (state)
|
||||
IDLE:
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
read_pending <= 1'b0;
|
||||
i2c_busy <= 1'b0;
|
||||
|
||||
if (start)
|
||||
begin
|
||||
state <= RX_BYTE;
|
||||
end
|
||||
end
|
||||
|
||||
RX_BYTE :
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_re)
|
||||
begin
|
||||
rd_byte <= {rd_byte[6:0], sda_in}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (&bit_cnt)
|
||||
begin
|
||||
state <= SLV_ACK; // If last bit, go to Slave Acknowledge state
|
||||
end
|
||||
end
|
||||
|
||||
SLV_ACK:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_fe)
|
||||
begin
|
||||
byte_cnt <= byte_cnt + 2'd1; // Increment the byte count
|
||||
|
||||
if ((byte_cnt == 2'd0) & (rd_byte[7:1] == DEVICE_ADDRESS))
|
||||
i2c_busy <= 1'b1; // Assert so I/O control passes this through
|
||||
|
||||
if ((byte_cnt == 2'd0) & (rd_byte[7:1] != DEVICE_ADDRESS))
|
||||
state <= IDLE; // If not for us, ignore
|
||||
else
|
||||
state <= ACK_HOLD; // Otherwise respond
|
||||
|
||||
if (rd_byte[0] & (byte_cnt == 2'd0))
|
||||
next_state <= TX_BYTE;
|
||||
else if (byte_cnt == 3'd3)
|
||||
next_state <= IDLE;
|
||||
else
|
||||
next_state <= RX_BYTE;
|
||||
|
||||
if (byte_cnt == 2'd0)
|
||||
rnw <= rd_byte[0];
|
||||
|
||||
if (~rnw)
|
||||
begin
|
||||
|
||||
if (byte_cnt == 2'd1)
|
||||
add[15:8] <= rd_byte;
|
||||
|
||||
if (byte_cnt == 2'd2)
|
||||
add[7:0] <= rd_byte;
|
||||
|
||||
if (byte_cnt == 2'd3)
|
||||
wr_data <= rd_byte;
|
||||
end
|
||||
|
||||
|
||||
wr_en <= ((~rnw) & (byte_cnt == WR_SIZE)); // Assert write strobe if last byte of a write command
|
||||
read_pending <= rd_byte[0] & (byte_cnt == 2'd0);
|
||||
|
||||
if (byte_cnt == 8'd0)
|
||||
sda <= (rd_byte[7:1] != DEVICE_ADDRESS); // If receiving byte address, verify before asserting ACK
|
||||
else
|
||||
sda <= 1'b0; // Send ACK once line is clear
|
||||
end
|
||||
|
||||
ACK_HOLD:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
wr_en <= 1'b0; // Clear write enable
|
||||
end
|
||||
else
|
||||
begin
|
||||
wr_en <= 1'b0; // Clear write enable
|
||||
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
sda <= 1'b1; // On next falling edge, deassert SDA
|
||||
scl <= ~read_pending; // If we're waiting for a read, keep SCL low
|
||||
state <= next_state;
|
||||
end
|
||||
end
|
||||
|
||||
TX_BYTE:
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
scl <= ~read_pending; // Keep SCL low until read is complete
|
||||
sda <= rd_data[7];
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
rd_data <= {rd_data[6:0], 1'b0}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (&bit_cnt)
|
||||
state <= IDLE; // If last bit sent, go to idle condition
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
default :
|
||||
begin // If we end up here, go to IDLE
|
||||
bit_cnt <= 3'd0;
|
||||
byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
read_pending <= 1'b0;
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,382 +0,0 @@
|
|||
//----------------------------------------------------------------------------
|
||||
// Module Description
|
||||
//
|
||||
// This module mimics the behaviour of the D3000's EPROM
|
||||
// The EPROM uses a similar protocol to I2C but with a paraty check and dummy state
|
||||
// State
|
||||
// EPROM Protocol:
|
||||
// Frame #1: 1st byte (DeviceADDRESS[7:4]+DeviceCommand[3:0])+ 1bit PAR; Datasheet only refers to a read device command (DeviceCommand)
|
||||
// Frame #2: 2 byte Address: 1st byte+1-bit PAR+ 2nd byte+1-bit PAR
|
||||
//
|
||||
// When SDA is low, output a zero, when high, I/O cell must go to tristate, otherwise reads will not work.
|
||||
// I2C busy has been used as debug signal. It is set when the module is in TX mode.
|
||||
// Input clock must be at least 12x higher than I2C SCL frequency, i.e. >1.2MHz for 100kHz, >4.8MHz for 400kHz.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
// Revn Date Author Notes
|
||||
//
|
||||
// 2.0 26/04/2-23 DRM Modified
|
||||
//
|
||||
// This version contemplates reading from the slave
|
||||
// Modified the need of word count. This Sleve writes and reads 1byte frames untill Master generates an NACK/STOP/ STAR event
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
`resetall
|
||||
`timescale 1ns/1ps
|
||||
module i2c_slv_simple_eprom # (
|
||||
parameter DEVICE_ADDRESS // 7 bit Device Address
|
||||
)
|
||||
(
|
||||
input wire clk,
|
||||
input wire lvdsoe,
|
||||
input wire scl_in,
|
||||
output wire scl_out,
|
||||
input wire sda_in,
|
||||
output wire sda_out,
|
||||
output wire i2c_busy_out,
|
||||
output wire [15:0] add_out,
|
||||
output wire [7:0] wr_data_out,
|
||||
output wire wr_en_out,
|
||||
output wire rd_en_out
|
||||
//input wire [7:0] rd_data_in -- No needed DATA is in EEPROM
|
||||
//input wire rd_dv_in
|
||||
);
|
||||
|
||||
// ROM init file
|
||||
|
||||
initial
|
||||
begin
|
||||
$readmemh("rom_init.mem", rom);
|
||||
end
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Internal Declarations
|
||||
//----------------------------------------------------------------------------
|
||||
// Parameters
|
||||
|
||||
//parameter WR_SIZE = 2'd1;
|
||||
|
||||
// Timing
|
||||
// I2C State Machine States
|
||||
|
||||
localparam IDLE = 3'd0;
|
||||
localparam RX_BYTE = 3'd1;
|
||||
localparam PAR = 3'd2;
|
||||
localparam ACK_HOLD = 3'd3;
|
||||
localparam TX_BYTE = 3'd4;
|
||||
localparam DUMMY = 3'd5;
|
||||
localparam DATA_WIDTH = 5'd8;
|
||||
localparam ADDR_WIDTH = 5'd16;
|
||||
|
||||
|
||||
// Internal Signals
|
||||
reg [2:0] scl_sr = 3'b111;
|
||||
reg [2:0] sda_sr = 3'b111;
|
||||
|
||||
wire scl_re;
|
||||
wire scl_fe;
|
||||
wire scl_hi;
|
||||
wire sda_re;
|
||||
wire sda_fe;
|
||||
wire start;
|
||||
wire stop;
|
||||
wire [7:0] add_rom;
|
||||
|
||||
reg [2:0] bit_cnt = 3'd0;
|
||||
//reg [1:0] byte_cnt = 2'd0;
|
||||
reg sda = 1'b1;
|
||||
reg scl = 1'b1;
|
||||
|
||||
reg read_pending = 1'b0;
|
||||
//reg rnw = 1'b0;
|
||||
reg data_pkg = 1'b0;
|
||||
reg rd_dv_in = 1'b0;
|
||||
reg [2:0] next_state = RX_BYTE;
|
||||
reg par_bit = 1'b1;
|
||||
|
||||
reg [2:0] state = IDLE;
|
||||
|
||||
reg [15:0] add = 16'd0;
|
||||
reg [7:0] wr_data = 8'd0;
|
||||
reg wr_en = 1'b0;
|
||||
reg i2c_busy = 1'b0;
|
||||
reg frame_start = 1'b0;
|
||||
reg address_pkg = 1'b0;
|
||||
reg [2:0] address_frame = 3'd0;
|
||||
reg [7:0] data_frame = 8'd0;
|
||||
reg [DATA_WIDTH-1:0] rom [255:0];
|
||||
//reg [ADDR_WIDTH-1:0] add_rom;
|
||||
reg [DATA_WIDTH-1:0] q_a, rd_data_in;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Output assignments
|
||||
//----------------------------------------------------------------------------
|
||||
assign scl_out = scl;
|
||||
assign sda_out = sda;
|
||||
assign i2c_busy_out = i2c_busy;
|
||||
assign add_out = add;
|
||||
assign wr_data_out = wr_data;
|
||||
assign wr_en_out = wr_en;
|
||||
assign rd_en_out = (state == TX_BYTE);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Input detection
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
scl_sr <= {scl_sr[1:0], scl_in};
|
||||
sda_sr <= {sda_sr[1:0], sda_in};
|
||||
end
|
||||
|
||||
assign scl_re = (scl_sr[2:1] == 2'b01);
|
||||
assign scl_fe = (scl_sr[2:1] == 2'b10);
|
||||
assign scl_hi = (scl_sr[2:1] == 2'b11);
|
||||
|
||||
assign sda_re = (sda_sr[2:1] == 2'b01);
|
||||
assign sda_fe = (sda_sr[2:1] == 2'b10);
|
||||
|
||||
assign start = sda_fe & scl_hi & lvdsoe;
|
||||
assign stop = sda_re & scl_hi;
|
||||
|
||||
assign add_rom = (add == 16'hB121 ? 16'h000D : (add[7:0] + data_frame));
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C state machine
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
reg [7:0] rd_byte = 8'd0;
|
||||
reg [7:0] rd_data = 8'd0;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C Slave State Machine
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
case (state)
|
||||
IDLE:
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
//byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
read_pending <= 1'b0;
|
||||
i2c_busy <= 1'b0;
|
||||
frame_start <= 1'b0;
|
||||
wr_data <= 7'd0;
|
||||
rd_byte <= 8'd0;
|
||||
data_pkg <= 1'b0;
|
||||
add <= 16'd0;
|
||||
par_bit <= 1'b1;
|
||||
|
||||
if (start)
|
||||
begin
|
||||
state <= RX_BYTE;
|
||||
frame_start <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
RX_BYTE :
|
||||
begin
|
||||
wr_en <= 1'b0;
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_re)
|
||||
begin
|
||||
rd_byte <= {rd_byte[6:0], sda_in}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (&bit_cnt)
|
||||
begin
|
||||
state <= PAR;
|
||||
bit_cnt <= 3'd0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
PAR: // changed it to scl_re to account for the PAR bit
|
||||
begin
|
||||
|
||||
if (stop || start) // After a write frame. Master can start a new transaction by either stop or start event
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_re)
|
||||
begin
|
||||
if ((rd_byte[7:0] == DEVICE_ADDRESS) & (frame_start == 1'b1)) //PAR bit is not checked
|
||||
begin
|
||||
// Assert so I/O control passes
|
||||
i2c_busy <= 1'b0;
|
||||
frame_start <= 1'b0;
|
||||
address_pkg <= 1'b1;
|
||||
address_frame <= 3'd0;
|
||||
data_frame <= 8'd0;
|
||||
state <= RX_BYTE;
|
||||
add <= 16'd0;
|
||||
|
||||
//rnw <= rd_byte[0];
|
||||
end
|
||||
if ((rd_byte[7:0] != DEVICE_ADDRESS) & (frame_start==1'b1))
|
||||
state <= IDLE; // If not for us, ignore
|
||||
// Otherwise respon
|
||||
if (address_pkg)
|
||||
begin
|
||||
if (address_frame == 2'd1 )
|
||||
begin
|
||||
address_frame <= 2'd0;
|
||||
address_pkg <= 1'b0;
|
||||
data_pkg <= 1'b1;
|
||||
data_frame <= 8'd0;
|
||||
//add_rom <= 16'h0000;
|
||||
next_state <= ACK_HOLD;
|
||||
add <={add[7:0],rd_byte};
|
||||
end
|
||||
else
|
||||
begin
|
||||
address_frame <= address_frame + 2'd1;
|
||||
state <= RX_BYTE;
|
||||
add <={add[7:0],rd_byte};
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
if(scl_fe & data_pkg)
|
||||
begin
|
||||
state <= DUMMY;
|
||||
rd_data <= q_a;
|
||||
data_frame <= data_frame + 8'd1;
|
||||
par_bit <= 1'b1;
|
||||
sda <= 1'b1;
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
DUMMY:
|
||||
|
||||
begin
|
||||
|
||||
if(stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
state <= next_state;
|
||||
next_state <= TX_BYTE;
|
||||
sda <= 1'b0;
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
ACK_HOLD:
|
||||
begin
|
||||
if (stop || start)
|
||||
begin
|
||||
state <= IDLE;
|
||||
// Clear write enable
|
||||
end
|
||||
|
||||
|
||||
//data_pkg <= 1'b0;
|
||||
|
||||
if (data_pkg & frame_start == 1'b0) // If it is a write frame load register wr_data and generate a dv wr signal
|
||||
begin
|
||||
wr_data <= rd_byte;
|
||||
wr_en <= 1'b1; // Clear write enable
|
||||
end
|
||||
else wr_en <= 1'b0;
|
||||
|
||||
|
||||
|
||||
//if (rd_dv_in)
|
||||
//begin
|
||||
//read_pending <= 1'b0;
|
||||
//rd_data <= rd_data_in;
|
||||
//end
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
sda <= 1'b1; // On next falling edge, deassert SDA
|
||||
scl <= 1'b1; // If we're waiting for a read, keep SCL low
|
||||
state <= next_state;
|
||||
end
|
||||
else sda <= 1'b0;
|
||||
|
||||
end
|
||||
|
||||
TX_BYTE:
|
||||
begin
|
||||
if (stop || start)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
i2c_busy <= 1'b1;
|
||||
sda <= rd_data[7];
|
||||
scl <= 1'b1;
|
||||
if (scl_re & rd_data[7]) par_bit <= ~par_bit;
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
// Increment bit counter
|
||||
rd_data <= {rd_data[6:0], 1'b0};
|
||||
bit_cnt <= bit_cnt + 3'd1;
|
||||
|
||||
if (&bit_cnt) // Do not change sda in order to keep it fix
|
||||
begin
|
||||
state <= PAR;
|
||||
next_state <= TX_BYTE;
|
||||
bit_cnt <= 3'd0;
|
||||
par_bit <= 1'b1;
|
||||
if (par_bit) sda <= 1'b1;
|
||||
else sda <= 1'b0;
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
default:
|
||||
begin // If we end up here, go to IDLE
|
||||
bit_cnt <= 3'd0;
|
||||
//byte_cnt <= 2'd0;
|
||||
//sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
read_pending <= 1'b0;
|
||||
state <= IDLE;
|
||||
wr_en <= 1'b0;
|
||||
end
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
always @ (posedge clk)
|
||||
begin
|
||||
q_a <= rom[add_rom];
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,342 +0,0 @@
|
|||
//----------------------------------------------------------------------------
|
||||
// Module Description
|
||||
//
|
||||
// This is a simple I2C slave, with device address fixed at instantiation.
|
||||
// Data format is 2-Byte Address, 1-Byte data on writes.
|
||||
//
|
||||
//
|
||||
//
|
||||
// When SDA is low, output a zero, when high, I/O cell must go to tristate, otherwise reads will not work.
|
||||
//
|
||||
// Input clock must be at least 12x higher than I2C SCL frequency, i.e. >1.2MHz for 100kHz, >4.8MHz for 400kHz.
|
||||
//----------------------------------------------------------------------------
|
||||
// Revision Date Author Notes
|
||||
//
|
||||
// 1.0 14-8-2015 GJL First Written
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
// Revision Date Author Notes
|
||||
//
|
||||
// 2.0 20-9-2020 DRM Modified
|
||||
//
|
||||
// This version contemplates reading from the slave
|
||||
// Modified the need of word count. This Sleve writes and reads 1byte frames untill Master generates an NACK/STOP/ STAR event
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
`resetall
|
||||
`timescale 1ns/1ps
|
||||
module i2c_slv_simple_tmp275 # (
|
||||
parameter DEVICE_ADDRESS // 7 bit Device Address
|
||||
)
|
||||
(
|
||||
input wire clk,
|
||||
input wire scl_in,
|
||||
output wire scl_out,
|
||||
input wire sda_in,
|
||||
output wire sda_out,
|
||||
output wire i2c_busy_out,
|
||||
output wire [15:0] add_out,
|
||||
output wire [7:0] wr_data_out,
|
||||
output wire wr_en_out,
|
||||
output wire rd_en_out,
|
||||
input wire [7:0] rd_data_in,
|
||||
input wire rd_dv_in
|
||||
);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Internal Declarations
|
||||
//----------------------------------------------------------------------------
|
||||
// Parameters
|
||||
|
||||
//parameter WR_SIZE = 2'd1;
|
||||
|
||||
// Timing
|
||||
|
||||
// I2C State Machine States
|
||||
localparam IDLE = 3'd0;
|
||||
localparam RX_BYTE = 3'd1;
|
||||
localparam SLV_ACK = 3'd2;
|
||||
localparam ACK_HOLD = 3'd3;
|
||||
localparam TX_BYTE = 3'd4;
|
||||
localparam MAS_ACK = 3'd5;
|
||||
|
||||
|
||||
// Internal Signals
|
||||
reg [2:0] scl_sr = 3'b111;
|
||||
reg [2:0] sda_sr = 3'b111;
|
||||
|
||||
wire scl_re;
|
||||
wire scl_fe;
|
||||
wire scl_hi;
|
||||
wire sda_re;
|
||||
wire sda_fe;
|
||||
wire start;
|
||||
wire stop;
|
||||
|
||||
reg [2:0] bit_cnt = 3'd0;
|
||||
//reg [1:0] //byte_cnt = 2'd0;
|
||||
reg sda = 1'b1;
|
||||
reg scl = 1'b1;
|
||||
reg read_pending = 1'b0;
|
||||
//reg rnw = 1'b0;
|
||||
reg data_pkg = 1'b0;
|
||||
|
||||
reg [2:0] next_state = RX_BYTE;
|
||||
|
||||
reg [2:0] state = IDLE;
|
||||
|
||||
reg [15:0] add = 16'd0;
|
||||
reg [7:0] wr_data = 8'd0;
|
||||
reg wr_en = 1'b0;
|
||||
reg i2c_busy = 1'b0;
|
||||
reg frame_start = 1'b0;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Output assignments
|
||||
//----------------------------------------------------------------------------
|
||||
assign scl_out = scl;
|
||||
assign sda_out = sda;
|
||||
assign i2c_busy_out = i2c_busy;
|
||||
assign add_out = add;
|
||||
assign wr_data_out = wr_data;
|
||||
assign wr_en_out = wr_en;
|
||||
assign rd_en_out = read_pending;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Input detection
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
scl_sr <= {scl_sr[1:0], scl_in};
|
||||
sda_sr <= {sda_sr[1:0], sda_in};
|
||||
end
|
||||
|
||||
assign scl_re = (scl_sr[2:1] == 2'b01);
|
||||
assign scl_fe = (scl_sr[2:1] == 2'b10);
|
||||
assign scl_hi = (scl_sr[2:1] == 2'b11);
|
||||
|
||||
assign sda_re = (sda_sr[2:1] == 2'b01);
|
||||
assign sda_fe = (sda_sr[2:1] == 2'b10);
|
||||
|
||||
assign start = sda_fe & scl_hi;
|
||||
assign stop = sda_re & scl_hi;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C state machine
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
reg [7:0] rd_byte = 8'd0;
|
||||
reg [7:0] rd_data = 8'd0;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// I2C Slave State Machine
|
||||
//----------------------------------------------------------------------------
|
||||
always @(posedge clk)
|
||||
begin
|
||||
case (state)
|
||||
IDLE:
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
//byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
read_pending <= 1'b0;
|
||||
i2c_busy <= 1'b0;
|
||||
frame_start <= 1'b0;
|
||||
wr_data <= 7'd0;
|
||||
|
||||
if (start)
|
||||
begin
|
||||
state <= RX_BYTE;
|
||||
frame_start <=1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
RX_BYTE :
|
||||
begin
|
||||
wr_en <= 1'b0;
|
||||
if (stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_re)
|
||||
begin
|
||||
rd_byte <= {rd_byte[6:0], sda_in}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1; // Increment bit counter
|
||||
|
||||
if (&bit_cnt)
|
||||
begin
|
||||
state <= SLV_ACK; // If last bit, go to Slave Acknowledge state
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
SLV_ACK:
|
||||
begin
|
||||
if (stop || start) // After a write frame. Master can start a new transacion by either stop or start event
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
else if (scl_fe)
|
||||
begin
|
||||
|
||||
if ((rd_byte[7:1] == DEVICE_ADDRESS) & (frame_start==1'b1))
|
||||
begin
|
||||
i2c_busy <= 1'b1; // Assert so I/O control passes this through
|
||||
frame_start <= 1'b0;
|
||||
////rnw <= rd_byte[0];
|
||||
end
|
||||
if ((rd_byte[7:1] != DEVICE_ADDRESS) & (frame_start==1'b1) )
|
||||
state <= IDLE; // If not for us, ignore
|
||||
else
|
||||
state <= ACK_HOLD; // Otherwise respond
|
||||
|
||||
if (rd_byte[0] & frame_start == 1'b1) //Master Read signal
|
||||
begin
|
||||
next_state <= TX_BYTE;
|
||||
read_pending <= 1'b1;
|
||||
wr_en <= 1'b0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
next_state <= RX_BYTE;
|
||||
read_pending <= 1'b0;
|
||||
if (frame_start)
|
||||
data_pkg <= 1'b0;
|
||||
else
|
||||
data_pkg <= 1'b1;
|
||||
end
|
||||
|
||||
sda <= 1'b0; // Send ACK once line is clear
|
||||
end
|
||||
|
||||
end
|
||||
ACK_HOLD:
|
||||
begin
|
||||
if (stop || start)
|
||||
begin
|
||||
state <= IDLE;
|
||||
// Clear write enable
|
||||
end
|
||||
|
||||
|
||||
data_pkg <= 1'b0;
|
||||
|
||||
if (data_pkg & frame_start == 1'b0) // If it is a write frame load register wr_data and generate a dv wr signal
|
||||
begin
|
||||
wr_data <= rd_byte;
|
||||
wr_en <= 1'b1; // Clear write enable
|
||||
end
|
||||
else wr_en <= 1'b0;
|
||||
|
||||
|
||||
|
||||
if (rd_dv_in)
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
bit_cnt <= 3'd0;
|
||||
sda <= 1'b1; // On next falling edge, deassert SDA
|
||||
scl <= ~read_pending; // If we're waiting for a read, keep SCL low
|
||||
state <= next_state;
|
||||
end
|
||||
end
|
||||
|
||||
TX_BYTE:
|
||||
begin
|
||||
|
||||
|
||||
if (stop || start)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
if (rd_dv_in) //These part of the code contemplates clock streching
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
rd_data <= rd_data_in;
|
||||
end
|
||||
|
||||
// Keep SCL low until read is complete
|
||||
|
||||
|
||||
sda <= rd_data[7];
|
||||
scl <= ~read_pending;
|
||||
|
||||
|
||||
|
||||
if (scl_fe)
|
||||
begin
|
||||
// Increment bit counter
|
||||
rd_data <= {rd_data[6:0], 1'b0}; // Read in next bit
|
||||
bit_cnt <= bit_cnt + 3'd1;
|
||||
|
||||
if (&bit_cnt)
|
||||
begin
|
||||
state <= MAS_ACK;
|
||||
next_state <= ACK_HOLD;
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
MAS_ACK: // At this point a STOP/NACK or master ACK can happen.
|
||||
begin
|
||||
|
||||
|
||||
if(stop)
|
||||
begin
|
||||
state <= IDLE;
|
||||
end
|
||||
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
|
||||
if (scl_re & sda_in == 1'b0)
|
||||
begin
|
||||
read_pending <= 1'b1;
|
||||
state <= next_state;
|
||||
next_state <= TX_BYTE;
|
||||
end
|
||||
|
||||
if (scl_re & sda_in == 1'b1) //NACK
|
||||
begin
|
||||
read_pending <= 1'b0;
|
||||
state <= next_state;
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
default :
|
||||
begin // If we end up here, go to IDLE
|
||||
bit_cnt <= 3'd0;
|
||||
////byte_cnt <= 2'd0;
|
||||
sda <= 1'b1;
|
||||
scl <= 1'b1;
|
||||
read_pending <= 1'b0;
|
||||
state <= IDLE;
|
||||
wr_en <= 1'b0;
|
||||
end
|
||||
|
||||
|
||||
endcase
|
||||
end
|
||||
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,276 +0,0 @@
|
|||
/*
|
||||
|
||||
Module description
|
||||
|
||||
Control block of mcp4631 (digital potentiometer)
|
||||
|
||||
|
||||
@author David Rodriguez
|
||||
@copyright (c) 2020 Global Inkjet Systems
|
||||
@date 2023-01-04
|
||||
|
||||
|
||||
|
||||
*/
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pei_register_pkg.all;
|
||||
|
||||
--add_out has been elminated. The I2C interface decodes write and read frame
|
||||
entity stm8 is
|
||||
|
||||
/* GENERIC(
|
||||
--Paramaters for the debugger
|
||||
ADDRESS_STM8 : integer range 0 to 255 :=0
|
||||
); */
|
||||
|
||||
PORT(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
scl_in : in std_logic;
|
||||
scl_out : out std_logic;
|
||||
sda_in : in std_logic;
|
||||
sda_out : out std_logic;
|
||||
start_w_i2c : in std_logic;
|
||||
start_r_i2c : in std_logic;
|
||||
i2c_master_rd_dv : out std_logic;
|
||||
i2c_stm8_busy : out std_logic;
|
||||
wr_flag : out std_logic;
|
||||
rd_flag : out std_logic;
|
||||
i2c_address_stm8 : in std_logic_vector(7 downto 0);
|
||||
reg_stm8_in : in std_logic_vector(15 downto 0);
|
||||
wr_nbytes : in std_logic_vector(15 downto 0);
|
||||
reg_stm8_out : out std_logic_vector(15 downto 0)
|
||||
|
||||
);
|
||||
end entity stm8;
|
||||
|
||||
architecture struct of stm8 is
|
||||
|
||||
component simple_i2c_masterPEI
|
||||
generic ( CLOCK_DIVIDER : std_logic_vector(9 downto 0));
|
||||
port (
|
||||
clk : IN std_logic;
|
||||
scl_in : IN std_logic;
|
||||
scl_out : OUT std_logic;
|
||||
sda_in : IN std_logic;
|
||||
sda_out : OUT std_logic;
|
||||
cmd_wr_cnt_in : IN std_logic_vector(7 downto 0);
|
||||
cmd_rd_cnt_in : IN std_logic_vector(7 downto 0);
|
||||
wr_data_in : IN std_logic_vector(7 downto 0);
|
||||
wr_dv_in : IN std_logic;
|
||||
rdy_for_data_out : OUT std_logic;
|
||||
rdy_for_cmd_out : OUT std_logic;
|
||||
dv_out : OUT std_logic;
|
||||
rd_data_out : OUT std_logic_vector(7 downto 0);
|
||||
error : OUT std_logic
|
||||
|
||||
);
|
||||
end component;
|
||||
|
||||
type i2c_state_machine is (IDLE, FRAME_DATA_W, FRAME_DATA_R, WAIT_STOP);
|
||||
signal I2c_master_sate : i2c_state_machine;
|
||||
signal sda_d1, sda_d2 : std_logic;
|
||||
signal i2c_stop : std_logic;
|
||||
signal wr_i2c_stm8 : std_logic;
|
||||
signal tx_dv : std_logic;
|
||||
signal dv_out : std_logic;
|
||||
signal rd_cmd : std_logic;
|
||||
signal i2c_error : std_logic;
|
||||
signal frame_cnt_w : std_logic_vector(7 downto 0);
|
||||
signal frame_cnt_r : std_logic_vector(7 downto 0);
|
||||
signal wr_data_in : std_logic_vector(7 downto 0);
|
||||
signal rd_i2c_data : std_logic_vector(7 downto 0);
|
||||
signal count_frame : std_logic_vector(7 downto 0);
|
||||
signal reg_stm8_int : std_logic_vector(15 downto 0);
|
||||
signal rd_flag_int, wr_flag_int : std_logic;
|
||||
|
||||
|
||||
|
||||
|
||||
begin
|
||||
|
||||
--ADD generic I2C address
|
||||
rd_flag <= rd_flag_int;
|
||||
wr_flag <= wr_flag_int;
|
||||
|
||||
i2c_masterPEI_inst : simple_i2c_masterPEI
|
||||
generic map
|
||||
(
|
||||
-- CLK_FREQ_HZ => CLK_FREQ_MHZ * 1000000,
|
||||
--BUS_FREQ_HZ => I2C_FREQ_KHZ * 1000
|
||||
CLOCK_DIVIDER => std_logic_vector(to_unsigned(500,10))
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
--rst_n => rst_n,
|
||||
scl_in => scl_in,
|
||||
scl_out => scl_out,
|
||||
sda_in => sda_in,
|
||||
sda_out => sda_out,
|
||||
cmd_wr_cnt_in => frame_cnt_w, -- write frameAddress+command+data. std_logic_vector(to_unsigned(3,8))
|
||||
cmd_rd_cnt_in => frame_cnt_r, -- the read frame is fixed to i2caddress+2xdataframe.
|
||||
wr_data_in => wr_data_in, -- data to be written.
|
||||
wr_dv_in => wr_i2c_stm8, -- change state from Idle to Start.
|
||||
rdy_for_data_out => tx_dv, -- It goes high during the SLV_ACK, indicates the end of the transaction.
|
||||
rdy_for_cmd_out => rd_cmd, -- Flag showing I2C is idle state. Master is in Idle state when this flag is high.
|
||||
dv_out => dv_out, -- rd_dv ready data valid.
|
||||
rd_data_out => rd_i2c_data, -- data out.
|
||||
error => i2c_error -- i2c error.
|
||||
);
|
||||
|
||||
|
||||
-- the process below implement the stm8 protocol:
|
||||
-- write: ADDRESS[W]+OFFSET_CMD+DAT[0]...+DATA[n]
|
||||
-- read: Two transactions: 1st -> ADDRESS[W]+OFFSET_CMD; 2nd -> ADDRESS[R]+DATA[0]+DATA[1]
|
||||
|
||||
I2C_process: process(clk, rst_n)
|
||||
|
||||
begin
|
||||
if (rst_n='0' or i2c_error='1') then
|
||||
rd_flag_int <='0';
|
||||
wr_flag_int <='0';
|
||||
wr_data_in <= (others => '0');
|
||||
I2c_master_sate <= IDLE;
|
||||
wr_i2c_stm8 <= '0';
|
||||
count_frame <= (others => '0');
|
||||
i2c_master_rd_dv <= '0';
|
||||
i2c_stm8_busy <= '0';
|
||||
reg_stm8_out <= (others => '0');
|
||||
reg_stm8_int <= (others => '0');
|
||||
frame_cnt_w <= (others => '0');
|
||||
|
||||
elsif (clk'event and clk='1') then
|
||||
|
||||
case I2c_master_sate is
|
||||
|
||||
when IDLE =>
|
||||
rd_flag_int <='0';
|
||||
wr_flag_int <='0';
|
||||
count_frame <= (others => '0');
|
||||
i2c_stm8_busy <= '0';
|
||||
i2c_master_rd_dv <= '0';
|
||||
reg_stm8_out <= (others => '0');
|
||||
|
||||
if (start_w_i2c = '1' and rd_cmd = '1') then
|
||||
I2c_master_sate <= FRAME_DATA_W;
|
||||
--wr_data_in <= std_logic_vector(to_unsigned(ADDRESS_STM8,8));
|
||||
wr_data_in <= i2c_address_stm8;
|
||||
wr_i2c_stm8 <='1';
|
||||
reg_stm8_int <= reg_stm8_in;
|
||||
frame_cnt_w <= std_logic_vector(unsigned(wr_nbytes(7 downto 0))+1); --Number of write frames of 8-bit
|
||||
i2c_stm8_busy <= '1';
|
||||
elsif (start_r_i2c = '1' and rd_cmd = '1') then
|
||||
I2c_master_sate <= FRAME_DATA_R;
|
||||
--wr_data_in <= std_logic_vector(to_unsigned((ADDRESS_STM8+1),8)); -- turn bit0 into 1 for a read
|
||||
wr_data_in <=i2c_address_stm8(7 downto 1) & '1';
|
||||
wr_i2c_stm8 <='1';
|
||||
frame_cnt_r <= std_logic_vector(to_unsigned(3,8)); --Number of read frames of 8-bit
|
||||
i2c_stm8_busy <= '1';
|
||||
else
|
||||
I2c_master_sate <= IDLE;
|
||||
wr_i2c_stm8 <='0';
|
||||
end if;
|
||||
|
||||
when FRAME_DATA_W => --ONLY 2 data frames. The STOP condition should stop
|
||||
wr_flag_int <='1';
|
||||
wr_i2c_stm8 <= '0';
|
||||
|
||||
if (i2c_stop = '1'and dv_out='0') then
|
||||
I2c_master_sate <= IDLE;
|
||||
else
|
||||
I2c_master_sate <= FRAME_DATA_W;
|
||||
end if;
|
||||
|
||||
if (tx_dv='1') then
|
||||
|
||||
count_frame <= std_logic_vector(unsigned(count_frame)+1);
|
||||
if (unsigned(count_frame)= unsigned(wr_nbytes)) then
|
||||
I2c_master_sate <= WAIT_STOP;
|
||||
else
|
||||
I2c_master_sate <= FRAME_DATA_W;
|
||||
--reg_stm8_int(15 downto 8) <= reg_stm8_int(7 downto 0);
|
||||
wr_data_in <= reg_stm8_int (7 downto 0); --MSB first
|
||||
reg_stm8_int(7 downto 0) <= reg_stm8_int (15 downto 8);
|
||||
end if;
|
||||
end if;
|
||||
|
||||
when FRAME_DATA_R =>
|
||||
rd_flag_int <='1';
|
||||
wr_i2c_stm8 <='0';
|
||||
i2c_stm8_busy <= '1';
|
||||
|
||||
if (i2c_stop = '1' and dv_out='0')then
|
||||
I2c_master_sate <= IDLE;
|
||||
else
|
||||
I2c_master_sate <= FRAME_DATA_R;
|
||||
end if;
|
||||
if (dv_out='1') then
|
||||
count_frame <= std_logic_vector(unsigned(count_frame)+1);
|
||||
if (unsigned(count_frame) = 1) then -- the frame does not include the TX of the address
|
||||
I2c_master_sate <= WAIT_STOP;
|
||||
i2c_master_rd_dv <='1';
|
||||
end if;
|
||||
I2c_master_sate <= FRAME_DATA_R;
|
||||
reg_stm8_out(7 downto 0) <= rd_i2c_data; --MSB first
|
||||
reg_stm8_out(15 downto 8) <= reg_stm8_out(7 downto 0);
|
||||
--end if;
|
||||
|
||||
end if;
|
||||
|
||||
|
||||
when WAIT_STOP =>
|
||||
wr_i2c_stm8 <= '0';
|
||||
i2c_stm8_busy <= '1';
|
||||
if (i2c_stop = '1') then
|
||||
I2c_master_sate <= IDLE;
|
||||
reg_stm8_int <= (others => '0');
|
||||
else
|
||||
I2c_master_sate <= WAIT_STOP;
|
||||
end if;
|
||||
|
||||
|
||||
when others =>
|
||||
wr_i2c_stm8 <= '0';
|
||||
i2c_master_rd_dv <='0';
|
||||
i2c_stm8_busy <= '0';
|
||||
|
||||
end case;
|
||||
end if;
|
||||
|
||||
|
||||
end process;
|
||||
|
||||
|
||||
i2c_stop_p: process(clk, rst_n)--detects stop condition
|
||||
|
||||
begin
|
||||
if (rst_n = '0') then
|
||||
|
||||
i2c_stop <= '0';
|
||||
|
||||
elsif (clk'event and clk='1') then
|
||||
|
||||
sda_d1 <= sda_out;
|
||||
sda_d2 <= sda_d1;
|
||||
|
||||
i2c_stop <= '0';
|
||||
if (sda_d2 = '0' and sda_d1 = '1' and scl_out='1') then
|
||||
i2c_stop <= '1';
|
||||
end if;
|
||||
|
||||
|
||||
end if;
|
||||
|
||||
end process;
|
||||
|
||||
--add re-start condition
|
||||
|
||||
|
||||
|
||||
end architecture struct;
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
[{
|
||||
"ip_name" : "print_ctrl",
|
||||
"bus" : "csr",
|
||||
"addr_hi_bit" : "10",
|
||||
"addr_lo_bit" : "7",
|
||||
"addr_width" : "5",
|
||||
"addr_hi_bit" : "9",
|
||||
"addr_lo_bit" : "6",
|
||||
"description" : "This block is the print controller for the GMA SOM board soft IP",
|
||||
"notes" : "The print_ctrl block contains local registers for CPU access to status, and for CPU control and instigation of function, some of which is just for the purposes of test and debug. The CSR_PRINT_CTRL_SEQ_STATUS register has six fields of 4 bits each (for each of the four heads) with bits for the wave and print data sequence busy statuses, and for the data core empty statuses (i.e. no data in the pixel buffer). In addition, there are three error cases for over- and under-runs and double 'droppy' detetction. The CSR_PRINT_CTRL_CONTROL register provides the ability for the CPU to configure the print system. The CHAN_EN field is a master enable for the data core, and the BPP_MODE sets the bits-per-pixel, with valid values for GMA of 1, 2 or 3. The system supports both the GMA3305300 and the GMA9905300, and the DATA_WIDTH field setting configures the mode by specifying either 6 or 18 (for the GMA3305300 and the GMA9905300 respectively). The block is designed to be generic so all values from 1 to 18 are supported, but no product can yet utilise other values. Some test and debug features are provided in the registers, with the CPU_GL_MAP bit of the CSR_PRINT_CTRL_CONTROL register enabling the overriding of the GL map value of the logic, with the values set in the CSR_PRINT_CTRL_CPU_GL_MAP register. This register has four fields of 8 bits---one for each head. In addition, the CPU can instigate a wave sequence start by writing a 1 to the CSR_PRINT_CTRL_CPU_WAVE_SEQ_START register. The sequence start addresses are specified in the 4 registers CSR_PRINT_CTRL_CPU_WAVE_SEQ_ADDRx, where x is 0 to 3. The instigation of a start request to the data core can also be controlled from the CPU by writing a 1 to the CSR_PRINT_CTRL_CPU_DATA_START register. Required delays can be specified in the CSR_PRINT_CTRL_CPU_START_DLY register, with 4 fields of 8 bits---one for each head. The delay is limited to 8 bits, even though the delay queue has more (currently 10 bits), but the full range is not felt to be a test or debug requirement. Data can also be pushed into the pixel buffers from the CPU by setting the CPU_PX_SEL field of the CSR_PRINT_CTRL_CONTROL to select which buffer to update, and then writing to the CSR_PRINT_CTRL_CPU_PUSH_PX_BUF for each word. Note that it is important to have set the BPP mode to be used before attempting to write to the pixel buffer from the CPU as the correct unpacking of data is a function of this.",
|
||||
"sub_blocks" : {
|
||||
|
|
@ -15,27 +14,27 @@
|
|||
"print_unit:b" : {
|
||||
"instance" : "1",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x080"
|
||||
"offset" : "0x040"
|
||||
},
|
||||
"print_unit:c" : {
|
||||
"instance" : "2",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x100"
|
||||
"offset" : "0x080"
|
||||
},
|
||||
"print_unit:d" : {
|
||||
"instance" : "3",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x180"
|
||||
"offset" : "0x0c0"
|
||||
},
|
||||
"local" : {
|
||||
"instance" : "",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x200"
|
||||
"offset" : "0x100"
|
||||
},
|
||||
"print_streamer" : {
|
||||
"instance" : "",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x280"
|
||||
"offset" : "0x140"
|
||||
}
|
||||
},
|
||||
"registers" : {
|
||||
|
|
@ -55,7 +54,7 @@
|
|||
"bit_len" : "8",
|
||||
"reset" : "0x04",
|
||||
"description" : "Manufacturer number"
|
||||
|
||||
|
||||
},
|
||||
"reserved" : {
|
||||
"type" : "rsv",
|
||||
|
|
@ -64,7 +63,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"ip_ver" : {
|
||||
"address" : "1",
|
||||
"width" : "32",
|
||||
|
|
@ -81,7 +80,7 @@
|
|||
"bit_len" : "8",
|
||||
"reset" : "0x00",
|
||||
"description" : "Major number"
|
||||
|
||||
|
||||
},
|
||||
"reserved" : {
|
||||
"type" : "rsv",
|
||||
|
|
@ -127,7 +126,7 @@
|
|||
},
|
||||
"seq_status" : {
|
||||
"address" : "7",
|
||||
"width" : "32",
|
||||
"width" : "28",
|
||||
"description" : "Print unit sequencer statuses",
|
||||
"fields" : {
|
||||
"wave_seq_busy" : {
|
||||
|
|
@ -171,18 +170,12 @@
|
|||
"bit_len" : "4",
|
||||
"reset" : "0x00",
|
||||
"description" : "Print unit data core double 'droppy' error condition detected"
|
||||
},
|
||||
"overlap_error" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0x00",
|
||||
"description" : "Print unit data core merge overlap error condition detected"
|
||||
}
|
||||
}
|
||||
},
|
||||
"control" : {
|
||||
"address" : "8",
|
||||
"width" : "30",
|
||||
"width" : "29",
|
||||
"description" : "Data core control register",
|
||||
"fields" : {
|
||||
"chan_en" : {
|
||||
|
|
@ -244,12 +237,6 @@
|
|||
"reset" : "0",
|
||||
"description" : "Enable power-up/down from CPU for test"
|
||||
},
|
||||
"en_dual_data_path" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Enable PD inline merge dual data paths, if supported"
|
||||
},
|
||||
"cpu_adc_meas" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
|
|
@ -352,7 +339,7 @@
|
|||
"last" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0xf",
|
||||
"reset" : "0x0",
|
||||
"description" : "Sets a flag indicating CPU start pulse is the first in a (potentially) multi-wave sequence."
|
||||
}
|
||||
}
|
||||
|
|
@ -366,29 +353,10 @@
|
|||
},
|
||||
"cpu_fire_req" : {
|
||||
"address" : "13",
|
||||
"width" : "13",
|
||||
"description" : "Send a fire request with the written fire request data",
|
||||
"fields" : {
|
||||
"start_merge" : {
|
||||
"type" : "wp",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Mark fire request as a start_merge request"
|
||||
},
|
||||
"mask" : {
|
||||
"type" : "wp",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Mask fire requests to heads (1 = disable)"
|
||||
},
|
||||
"seq_addr" : {
|
||||
"type" : "wp",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0",
|
||||
"description" : "Address for Print Sequencer to Start At"
|
||||
}
|
||||
}
|
||||
|
||||
"width" : "8",
|
||||
"type" : "wp",
|
||||
"reset" : "0",
|
||||
"description" : "Send a fire request with the written fire request data"
|
||||
},
|
||||
"dac_0v_value" : {
|
||||
"address" : "14",
|
||||
|
|
@ -427,160 +395,9 @@
|
|||
"description" : "Data core BPP mode control for head0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cpu_start_seq" : {
|
||||
"address" : "16",
|
||||
"width" : "12",
|
||||
"description" : "Start print unit sequencers under CPU control",
|
||||
"fields" : {
|
||||
"go" : {
|
||||
"type" : "wp",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Go bits for individual print unit sequencers"
|
||||
},
|
||||
"address" : {
|
||||
"type" : "wp",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0",
|
||||
"description" : "Start address for sequence"
|
||||
}
|
||||
}
|
||||
},
|
||||
"diag_nonzero" : {
|
||||
"address" : "17",
|
||||
"width" : "32",
|
||||
"description" : "Diagnostic to detect printing ones",
|
||||
"fields" : {
|
||||
"head0" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "7",
|
||||
"reset" : "0",
|
||||
"description" : "Number of Non-Zero pixels. Holds at 127 max until cleared"
|
||||
},
|
||||
"head1" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "7",
|
||||
"reset" : "0",
|
||||
"description" : "Number of Non-Zero pixels. Holds at 127 max until cleared"
|
||||
},
|
||||
"head2" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "7",
|
||||
"reset" : "0",
|
||||
"description" : "Number of Non-Zero pixels. Holds at 127 max until cleared"
|
||||
},
|
||||
"head3" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "7",
|
||||
"reset" : "0",
|
||||
"description" : "Number of Non-Zero pixels. Holds at 127 max until cleared"
|
||||
},
|
||||
"clr" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Clear non zero bits"
|
||||
}
|
||||
}
|
||||
},
|
||||
"debug_wr_if_ctrl" : {
|
||||
"address" : "18",
|
||||
"width" : "6",
|
||||
"description" : "Memory write interface control",
|
||||
"fields": {
|
||||
"enable" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Enable Operation"
|
||||
},
|
||||
"clr" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Clear interface"
|
||||
},
|
||||
"update_addr" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Update DMA addresses"
|
||||
},
|
||||
"smpl_wr_addr" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Sample DMA write address"
|
||||
},
|
||||
"trig_underrun" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "When set, the event logger will stop when an underrun is detected. The triggered bit will be set"
|
||||
},
|
||||
"trig_dbl_drop" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "When set, the event logger will stop when a double drop is detected. The triggered bit will be set"
|
||||
}
|
||||
}
|
||||
},
|
||||
"debug_wr_if_base_addr" : {
|
||||
"address" : "19",
|
||||
"width" : "32",
|
||||
"type" : "w",
|
||||
"reset" : "0x20000000",
|
||||
"description" : "Byte address of DMA circular buffer base"
|
||||
},
|
||||
"debug_wr_if_end_addr" : {
|
||||
"address" : "20",
|
||||
"width" : "32",
|
||||
"type" : "w",
|
||||
"reset" : "0x2000ffff",
|
||||
"description" : "Byte address of DMA circular buffer end"
|
||||
},
|
||||
"debug_wr_if_status" : {
|
||||
"address" : "21",
|
||||
"width" : "3",
|
||||
"description" : "Memory write interface status",
|
||||
"fields": {
|
||||
"overflow" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Overfow error (sticky). Events lost due to FIFO overflow"
|
||||
},
|
||||
"write_busy" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Data is in transit to memory. Wait for this to be clear before reading near the write head"
|
||||
},
|
||||
"triggered" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "When 1, the event logging has stopped due to a trigger event occuring"
|
||||
}
|
||||
}
|
||||
},
|
||||
"debug_wr_if_wr_addr" : {
|
||||
"address" : "22",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Sampled byte address of next memory write"
|
||||
},
|
||||
"debug_wr_if_bytes_written" : {
|
||||
"address" : "23",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Number of bytes written since last clr. All 1's indicates greater than 4G"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"ip_name" : "print_ctrl",
|
||||
|
|
|
|||
|
|
@ -29,17 +29,16 @@
|
|||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Dave Steele
|
||||
--! @copyright (c) 2024 Global Inkjet Systems
|
||||
--! @date 2024-1-29
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2018 Global Inkjet Systems
|
||||
--! @date 2018-1-10
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
use work.sg1024_pkg.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
entity print_ctrl is
|
||||
generic(
|
||||
|
|
@ -49,14 +48,10 @@ entity print_ctrl is
|
|||
MAX_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_HEADS : natural range 1 to 16 := 4;
|
||||
MAX_OP_WIDTH : natural range 1 to 48 := 48;
|
||||
NUM_CHANS : natural range 1 to 8 := 2;
|
||||
SHIFT_DEPTH : integer range 1 to 1024 := 128;
|
||||
PCLK_CLK_RATIO : integer range 1 to 32 := 8;
|
||||
SLIM : boolean := true;
|
||||
DYNAMIC_COMBINE : boolean := true;
|
||||
NO_ZERO_GAP : boolean := true;
|
||||
STREAMER_LOGGER : boolean := true;
|
||||
EN_PEEK : boolean := false
|
||||
DYNAMIC_COMBINE : boolean := true
|
||||
);
|
||||
port(
|
||||
|
||||
|
|
@ -64,7 +59,7 @@ entity print_ctrl is
|
|||
clk_x2 : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
avs_csr_address : in std_logic_vector(10 downto 0);
|
||||
avs_csr_address : in std_logic_vector(9 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
|
|
@ -76,6 +71,13 @@ entity print_ctrl is
|
|||
avs_seq_read : in std_logic;
|
||||
avs_seq_readdata : out std_logic_vector(31 downto 0);
|
||||
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
avm_rx_burstcount : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address : in std_logic_vector(31 downto 0);
|
||||
avm_rx_read : in std_logic;
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic;
|
||||
|
||||
--AXI write address bus
|
||||
axm_awaddr : out std_logic_vector(31 downto 0);
|
||||
axm_awprot : out std_logic_vector(2 downto 0);
|
||||
|
|
@ -108,19 +110,9 @@ entity print_ctrl is
|
|||
axm_rvalid : in std_logic; --slave data valid
|
||||
axm_rready : out std_logic; --master ready to accept
|
||||
|
||||
-- Avalon Master burst write interface for FPGA configuration block
|
||||
avm_tx_waitrequest : in std_logic;
|
||||
avm_tx_burstcount : out std_logic_vector(11 downto 0) := (others => '0');
|
||||
avm_tx_address : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
avm_tx_write : out std_logic := '0';
|
||||
avm_tx_writedata : out std_logic_vector(63 downto 0) := (others => '0');
|
||||
avm_tx_last : out std_logic;
|
||||
|
||||
fire_req : in fpm_vec_t(0 to NUM_HEADS-1);
|
||||
fire_req_start_merge : in fpm_vec_t(0 to NUM_HEADS-1);
|
||||
fire_req : in std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
fire_data : in std_logic_vector(7 downto 0);
|
||||
|
||||
px_buf_ch_nactive : out std_logic_vector((NUM_HEADS*NUM_CHANS)-1 downto 0);
|
||||
stm8_trigger_rx : out std_logic;
|
||||
sig_seq_force_dacs_0v : in std_logic;
|
||||
|
||||
|
|
@ -138,17 +130,12 @@ entity print_ctrl is
|
|||
en_test_fp_logic : out std_logic;
|
||||
en_test_pwr_ctrl : out std_logic;
|
||||
|
||||
ps_wr : out std_logic;
|
||||
ps_wr_data : out std_logic_vector(31 downto 0);
|
||||
ps_rdy : in std_logic;
|
||||
|
||||
gma99 : out std_logic;
|
||||
|
||||
pof_rx_debug : in std_logic_vector(31 downto 0);
|
||||
|
||||
diag_peek_sel : in std_logic_vector( 3 downto 0);
|
||||
diag_peek_addr : in std_logic_vector(31 downto 0);
|
||||
diag_peek_data : out std_logic_vector(31 downto 0);
|
||||
diag_peek_rdptr : out std_logic_vector( 7 downto 0);
|
||||
diag_peek_wrptr : out std_logic_vector( 7 downto 0);
|
||||
diag_peek_wdata : in std_logic_vector(31 downto 0);
|
||||
diag_peek_wr : in std_logic;
|
||||
|
||||
diag_word_count_comb : out std_logic_vector(31 downto 0);
|
||||
|
||||
dbg_port : out std_logic_vector(7 downto 0)
|
||||
|
|
@ -167,13 +154,12 @@ architecture rtl of print_ctrl is
|
|||
type px_data_t is array (0 to MAX_HEADS - 1) of std_logic_vector(31 downto 0);
|
||||
type bpp_vec_t is array (0 to MAX_HEADS - 1) of std_logic_vector(3 downto 0);
|
||||
type diag_wc_vec_t is array (0 to MAX_HEADS - 1) of std_logic_vector(6 downto 0);
|
||||
type print_vec_t is array (natural range <>) of std_logic_vector;
|
||||
|
||||
|
||||
constant ZERO : std_logic_vector(47 downto 0) := 48x"0";
|
||||
|
||||
signal stm8_trigger_rx_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal wave_seq_busy : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_seq_busy : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
signal seq_dac_data : dac_vec_t;
|
||||
signal seq_dac_data_int : dac_vec_t;
|
||||
|
|
@ -206,105 +192,54 @@ architecture rtl of print_ctrl is
|
|||
signal underrun : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal overrun : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal dbl_drop : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal overlap_error : std_logic_vector(MAX_HEADS-1 downto 0);
|
||||
signal fp_drop : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal clear_buffer : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
signal cpu_gl_map_en : std_logic;
|
||||
signal cpu_gl_map_head : remap_t;
|
||||
signal cpu_start_dly_head : data_dly_t;
|
||||
signal cpu_data_start : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_data_start_first : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_data_start_last : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_adc_meas : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_gl_map_en : std_logic;
|
||||
signal cpu_gl_map_head : remap_t;
|
||||
signal cpu_start_dly_head : data_dly_t;
|
||||
signal cpu_data_start : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_data_start_first : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_data_start_last : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal cpu_adc_meas : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
signal cpu_px_sel : std_logic_vector( 1 downto 0);
|
||||
signal cpu_push_px_buf_pulse : std_logic;
|
||||
signal cpu_push_px_buf : std_logic_vector(31 downto 0);
|
||||
signal control_cpu_px_sel : std_logic_vector(1 downto 0);
|
||||
signal cpu_push_px_buf_pulse : std_logic;
|
||||
signal cpu_push_px_buf : std_logic_vector(31 downto 0);
|
||||
|
||||
signal cpu_fire_req_mask : std_logic_vector(MAX_HEADS-1 downto 0);
|
||||
signal cpu_fire_req_pulse : std_logic;
|
||||
signal cpu_fire_req_start_merge : std_logic;
|
||||
signal cpu_fire_req_data : std_logic_vector(7 downto 0);
|
||||
signal pixel_buf_wr_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal pixel_buf_wr_data_int : px_data_t;
|
||||
signal pixel_buf_rdy : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
signal cpu_start_seq_pulse : std_logic;
|
||||
signal cpu_start_seq_go : std_logic_vector( 3 downto 0);
|
||||
signal cpu_start_seq_address : std_logic_vector( 7 downto 0);
|
||||
|
||||
signal fire_req_in0 : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal fire_req_start_merge_in0 : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal fire_req_int : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal fire_req_start_merge_int : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal cpu_fire_req_start_merge_plse : std_logic;
|
||||
signal fire_req_data_int : std_logic_vector( 7 downto 0);
|
||||
signal print_seq_busy : std_logic_vector(MAX_HEADS-1 downto 0);
|
||||
signal pixel_buf_wr_int : std_logic_vector(NUM_CHANS*MAX_HEADS - 1 downto 0);
|
||||
signal pixel_buf_wr_data_int : print_vec_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal pixel_buf_rdy : std_logic_vector(NUM_CHANS*MAX_HEADS - 1 downto 0);
|
||||
signal pixel_buf_last_word : std_logic;
|
||||
|
||||
signal pixel_buf_wr : std_logic_vector(NUM_CHANS*MAX_HEADS - 1 downto 0);
|
||||
signal pixel_buf_wr : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal pixel_buf_wr_data : std_logic_vector(31 downto 0);
|
||||
|
||||
signal diag_word_count : print_vec_t(0 to MAX_HEADS-1)( 6 downto 0);
|
||||
signal diag_peek_data_int : print_vec_t(0 to MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_peek_rdptr_int : print_vec_t(0 to MAX_HEADS-1)( 7 downto 0);
|
||||
signal diag_peek_wrptr_int : print_vec_t(0 to MAX_HEADS-1)( 7 downto 0);
|
||||
signal cpu_fire_req_pulse : std_logic;
|
||||
signal cpu_fire_req : std_logic_vector(7 downto 0);
|
||||
signal fire_req_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal fire_req_data_int : std_logic_vector(7 downto 0);
|
||||
signal fire_req_edge : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal fire_req_dly : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
signal en_dual_data_path : std_logic;
|
||||
signal print_unit_dbg : std_logic_vector(15 downto 0);
|
||||
signal dest_port_wr : std_logic_vector(MAX_HEADS downto 0);
|
||||
signal dest_port_rdy : std_logic_vector(MAX_HEADS downto 0);
|
||||
signal ps_debug : std_logic_vector(19 downto 0);
|
||||
|
||||
signal print_unit_dbg : std_logic_vector(15 downto 0);
|
||||
signal dest_port_wr : std_logic_vector(MAX_HEADS downto 0);
|
||||
signal dest_port_rdy : std_logic_vector(MAX_HEADS downto 0);
|
||||
signal ps_debug : std_logic_vector(19 downto 0);
|
||||
signal dac_0v_value : std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
signal print_all_on_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_latch_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_clk_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_data_int : std_logic_vector(MAX_HEADS * MAX_OP_WIDTH - 1 downto 0);
|
||||
|
||||
signal dac_0v_value : std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
signal print_all_on_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_latch_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_clk_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal print_data_int : std_logic_vector(MAX_HEADS * MAX_OP_WIDTH - 1 downto 0);
|
||||
|
||||
signal combine_chans : std_logic;
|
||||
signal combine_chans_int : std_logic;
|
||||
signal all_on_emul : std_logic_vector(3 downto 0);
|
||||
|
||||
--diags
|
||||
signal diag_nonzero_head : diag_wc_vec_t;
|
||||
signal print_clk_int_d : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal diag_nonzero_clr : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal diag_nonzero_inc : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
signal debug_wr_if_ctrl_enable : std_logic;
|
||||
signal debug_wr_if_ctrl_clr : std_logic;
|
||||
signal debug_wr_if_ctrl_update_addr : std_logic;
|
||||
signal debug_wr_if_ctrl_trig_underrun: std_logic;
|
||||
signal debug_wr_if_ctrl_trig_dbl_drop: std_logic;
|
||||
signal debug_wr_if_base_addr : std_logic_vector(31 downto 0);
|
||||
signal debug_wr_if_end_addr : std_logic_vector(31 downto 0);
|
||||
signal debug_wr_if_bytes_written : std_logic_vector(31 downto 0);
|
||||
signal debug_wr_if_status_overflow : std_logic;
|
||||
signal debug_wr_if_status_triggered : std_logic;
|
||||
signal debug_wr_if_status_write_busy : std_logic;
|
||||
signal debug_wr_if_ctrl_smpl_wr_addr : std_logic;
|
||||
signal debug_wr_if_wr_addr : std_logic_vector(31 downto 0);
|
||||
signal diag_word_count : diag_wc_vec_t;
|
||||
|
||||
signal combine_chans : std_logic;
|
||||
signal combine_chans_int : std_logic;
|
||||
signal all_on_emul : std_logic_vector(3 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
process (all)
|
||||
begin
|
||||
for i in 0 to NUM_HEADS-1 loop
|
||||
fire_req_in0(i) <= fire_req(i)(0);
|
||||
fire_req_start_merge_in0(i) <= fire_req_start_merge(i)(0);
|
||||
end loop;
|
||||
end process;
|
||||
|
||||
fire_req_int <= (others => '1') when cpu_fire_req_pulse = '1' else fire_req_in0;
|
||||
fire_req_start_merge_int <= (others => '1') when cpu_fire_req_start_merge_plse = '1' else fire_req_start_merge_in0;
|
||||
fire_req_data_int <= fire_data when unsigned(fire_req_in0) /= 0 else cpu_fire_req_data;
|
||||
|
||||
cpu_fire_req_start_merge_plse <= cpu_fire_req_start_merge and cpu_fire_req_pulse;
|
||||
|
||||
GEN_TIE_OFF_REQD : if MAX_HEADS > NUM_HEADS generate
|
||||
GEN_TIE_OFF : for i in NUM_HEADS to MAX_HEADS - 1 generate
|
||||
avs_seq_readdata_int(i) <= (others => '0');
|
||||
|
|
@ -319,6 +254,18 @@ begin
|
|||
combine_chans_int <= combine_chans;
|
||||
end generate;
|
||||
|
||||
-- Convert input fire request to a pulse on the falling egde
|
||||
process(clk, rst_n) is
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
fire_req_dly(NUM_HEADS - 1 downto 0) <= (others => '0');
|
||||
elsif clk'event and clk = '1' then
|
||||
fire_req_dly(NUM_HEADS - 1 downto 0) <= fire_req;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- Pulse at falling edge
|
||||
fire_req_edge(NUM_HEADS - 1 downto 0) <= fire_req_dly(NUM_HEADS - 1 downto 0) and not fire_req;
|
||||
|
||||
-- STM8 trigger whenever any print unit outputs trigger
|
||||
stm8_trigger_rx <= '1' when to_integer(unsigned(stm8_trigger_rx_int)) /= 0 else '0';
|
||||
|
|
@ -331,8 +278,8 @@ begin
|
|||
-- Decode the CSR access for each print unit controller
|
||||
print_ctrl_csr_decode_inst : entity work.print_ctrl_csr_decode
|
||||
generic map(
|
||||
ADDR_DECODE_HI_BIT => 10,
|
||||
ADDR_DECODE_LO_BIT => 7
|
||||
ADDR_DECODE_HI_BIT => 9,
|
||||
ADDR_DECODE_LO_BIT => 6
|
||||
)
|
||||
port map(
|
||||
print_unit_0_write => avs_csr_write_int(0),
|
||||
|
|
@ -354,7 +301,7 @@ begin
|
|||
local_read => local_read,
|
||||
local_readdata => local_readdata,
|
||||
|
||||
avs_address => avs_csr_address(10 downto 7),
|
||||
avs_address => avs_csr_address(9 downto 6),
|
||||
avs_write => avs_csr_write,
|
||||
avs_read => avs_csr_read,
|
||||
avs_readdata => avs_csr_readdata
|
||||
|
|
@ -386,13 +333,10 @@ begin
|
|||
avs_readdata => avs_seq_readdata
|
||||
);
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- Local register block for print_ctrl
|
||||
-- -----------------------------------------------
|
||||
|
||||
print_ctrl_csr_regs_inst : entity work.print_ctrl_csr_regs
|
||||
generic map(
|
||||
ADDR_DECODE_WIDTH => 5
|
||||
ADDR_DECODE_WIDTH => 4
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
|
|
@ -407,13 +351,12 @@ begin
|
|||
control_chan_en => chan_en,
|
||||
control_data_width => print_data_width,
|
||||
control_cpu_gl_map => cpu_gl_map_en,
|
||||
control_cpu_px_sel => cpu_px_sel,
|
||||
control_cpu_px_sel => control_cpu_px_sel,
|
||||
control_head_data_map_rev => head_data_map_rev,
|
||||
control_fpm_select_pof_niso => fpm_select_pof_niso,
|
||||
control_en_test_fp_logic => en_test_fp_logic,
|
||||
control_en_test_pwr_ctrl => en_test_pwr_ctrl,
|
||||
control_clear_px_buf => clear_buffer,
|
||||
control_en_dual_data_path => en_dual_data_path,
|
||||
control_cpu_adc_meas => cpu_adc_meas(0),
|
||||
control_combine_chans => combine_chans,
|
||||
control_all_on_emul => all_on_emul,
|
||||
|
|
@ -441,97 +384,27 @@ begin
|
|||
cpu_push_px_buf_in => (others => '0'),
|
||||
|
||||
cpu_fire_req_pulse => cpu_fire_req_pulse,
|
||||
cpu_fire_req_start_merge => cpu_fire_req_start_merge,
|
||||
cpu_fire_req_start_merge_in => '0',
|
||||
cpu_fire_req_mask => cpu_fire_req_mask,
|
||||
cpu_fire_req_mask_in => (others => '0'),
|
||||
cpu_fire_req_seq_addr => cpu_fire_req_data,
|
||||
cpu_fire_req_seq_addr_in => (others => '0'),
|
||||
|
||||
cpu_start_seq_pulse => cpu_start_seq_pulse,
|
||||
cpu_start_seq_go => cpu_start_seq_go,
|
||||
cpu_start_seq_go_in => (others => '0'),
|
||||
cpu_start_seq_address => cpu_start_seq_address,
|
||||
cpu_start_seq_address_in => (others => '0'),
|
||||
|
||||
diag_nonzero_head0 => diag_nonzero_head(0),
|
||||
diag_nonzero_head1 => diag_nonzero_head(1),
|
||||
diag_nonzero_head2 => diag_nonzero_head(2),
|
||||
diag_nonzero_head3 => diag_nonzero_head(3),
|
||||
diag_nonzero_clr => diag_nonzero_clr,
|
||||
|
||||
debug_wr_if_ctrl_enable => debug_wr_if_ctrl_enable,
|
||||
debug_wr_if_ctrl_clr => debug_wr_if_ctrl_clr,
|
||||
debug_wr_if_ctrl_update_addr => debug_wr_if_ctrl_update_addr,
|
||||
debug_wr_if_ctrl_trig_underrun=> debug_wr_if_ctrl_trig_underrun,
|
||||
debug_wr_if_ctrl_trig_dbl_drop=> debug_wr_if_ctrl_trig_dbl_drop,
|
||||
|
||||
debug_wr_if_base_addr => debug_wr_if_base_addr,
|
||||
debug_wr_if_end_addr => debug_wr_if_end_addr,
|
||||
debug_wr_if_bytes_written => debug_wr_if_bytes_written,
|
||||
debug_wr_if_status_overflow => debug_wr_if_status_overflow,
|
||||
debug_wr_if_status_write_busy => debug_wr_if_status_write_busy,
|
||||
debug_wr_if_status_triggered => debug_wr_if_status_triggered,
|
||||
debug_wr_if_ctrl_smpl_wr_addr => debug_wr_if_ctrl_smpl_wr_addr,
|
||||
debug_wr_if_wr_addr => debug_wr_if_wr_addr,
|
||||
cpu_fire_req => cpu_fire_req,
|
||||
cpu_fire_req_in => (others => '0'),
|
||||
|
||||
seq_status_data_core_empty => empty,
|
||||
seq_status_data_core_overrun => overrun,
|
||||
seq_status_data_core_underrun => underrun,
|
||||
seq_status_data_core_fp_drop => fp_drop,
|
||||
seq_status_data_core_dbl_drop => dbl_drop,
|
||||
seq_status_overlap_error => overlap_error,
|
||||
|
||||
seq_status_wave_seq_busy => wave_seq_busy,
|
||||
seq_status_print_seq_busy => print_seq_busy,
|
||||
|
||||
dac_0v_value => dac_0v_value,
|
||||
|
||||
avs_address => avs_csr_address(4 downto 0),
|
||||
avs_address => avs_csr_address(3 downto 0),
|
||||
avs_write => local_write,
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => local_read,
|
||||
avs_readdata => local_readdata
|
||||
);
|
||||
|
||||
c_debug_wr_if : entity work.debug_wr_if
|
||||
port map (
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
-- Control and status
|
||||
enable => debug_wr_if_ctrl_enable,
|
||||
clr => debug_wr_if_ctrl_clr,
|
||||
trig_on_underrun => debug_wr_if_ctrl_trig_underrun,
|
||||
trig_on_dbl_drop => debug_wr_if_ctrl_trig_dbl_drop,
|
||||
|
||||
update_addr => debug_wr_if_ctrl_update_addr,
|
||||
new_base_addr_bytes => debug_wr_if_base_addr,
|
||||
new_end_addr_bytes => debug_wr_if_end_addr,
|
||||
bytes_written => debug_wr_if_bytes_written,
|
||||
overflow => debug_wr_if_status_overflow,
|
||||
wr_addr => debug_wr_if_wr_addr,
|
||||
triggered => debug_wr_if_status_triggered,
|
||||
write_busy => debug_wr_if_status_write_busy,
|
||||
|
||||
-- Data to monitor
|
||||
fire_pulse(0) => fire_req(0)(0),
|
||||
fire_pulse(1) => fire_req(1)(0),
|
||||
fire_pulse(2) => fire_req(2)(0),
|
||||
fire_pulse(3) => fire_req(3)(0),
|
||||
underrun => underrun,
|
||||
dbl_drop => dbl_drop,
|
||||
clear_buffer => clear_buffer,
|
||||
pof_rx_debug => pof_rx_debug,
|
||||
|
||||
-- Avalon Master burst write interface for FPGA configuration block
|
||||
avm_tx_write => avm_tx_write,
|
||||
avm_tx_waitrequest => avm_tx_waitrequest,
|
||||
avm_tx_burstcount => avm_tx_burstcount,
|
||||
avm_tx_address => avm_tx_address,
|
||||
avm_tx_writedata => avm_tx_writedata,
|
||||
avm_tx_last => avm_tx_last
|
||||
);
|
||||
|
||||
-- Flag GMA99 mode for cable mappings when programmed data width indicates >= 16 (GMA99 is 18, GMA33 is 6)
|
||||
gma99 <= print_data_width(4);
|
||||
|
|
@ -539,16 +412,14 @@ begin
|
|||
-- Only want a CPU instigated measurement to go to head 0 (they're ORed together anyway)
|
||||
cpu_adc_meas(NUM_HEADS - 1 downto 1) <= (others => '0');
|
||||
|
||||
fire_req_int <= "1111" when cpu_fire_req_pulse = '1' else fire_req_edge;
|
||||
fire_req_data_int <= fire_data when fire_req_edge /= "0000" else cpu_fire_req;
|
||||
|
||||
-- Instantiate 4 print_unit blocks; one for each head
|
||||
GEN_PRINT_UNIT_LOOP : for i in 0 to NUM_HEADS - 1 generate
|
||||
|
||||
pixel_buf_wr_int(i) <= '1' when cpu_push_px_buf_pulse = '1' and cpu_px_sel = std_logic_vector(to_unsigned(i, 2)) else pixel_buf_wr(i);
|
||||
pixel_buf_wr_data_int(i) <= cpu_push_px_buf when cpu_push_px_buf_pulse = '1' and cpu_px_sel = std_logic_vector(to_unsigned(i, 2)) else pixel_buf_wr_data;
|
||||
|
||||
pixel_buf_wr_int(i+MAX_HEADS) <= '1' when cpu_push_px_buf_pulse = '1' and cpu_px_sel = std_logic_vector(to_unsigned(i+MAX_HEADS, 2)) else pixel_buf_wr(i+MAX_HEADS);
|
||||
pixel_buf_wr_data_int(i+MAX_HEADS) <= cpu_push_px_buf when cpu_push_px_buf_pulse = '1' and cpu_px_sel = std_logic_vector(to_unsigned(i+MAX_HEADS, 2)) else pixel_buf_wr_data;
|
||||
|
||||
pixel_buf_wr_int(i) <= '1' when cpu_push_px_buf_pulse = '1' and control_cpu_px_sel = std_logic_vector(to_unsigned(i, 2)) else pixel_buf_wr(i);
|
||||
pixel_buf_wr_data_int(i) <= cpu_push_px_buf when cpu_push_px_buf_pulse = '1' and control_cpu_px_sel = std_logic_vector(to_unsigned(i, 2)) else pixel_buf_wr_data;
|
||||
|
||||
print_unit_inst : entity work.print_unit
|
||||
generic map(
|
||||
|
|
@ -557,102 +428,73 @@ begin
|
|||
DAC_DATA_WIDTH => 14,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH,
|
||||
SHIFT_DEPTH => SHIFT_DEPTH,
|
||||
PCLK_CLK_RATIO => PCLK_CLK_RATIO,
|
||||
NO_ZERO_GAP => NO_ZERO_GAP,
|
||||
EN_PEEK => EN_PEEK
|
||||
PCLK_CLK_RATIO => PCLK_CLK_RATIO
|
||||
)
|
||||
port map(
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
avs_csr_address => avs_csr_address(5 downto 0),
|
||||
avs_csr_write => avs_csr_write_int(i),
|
||||
avs_csr_writedata => avs_csr_writedata,
|
||||
avs_csr_read => avs_csr_read_int(i),
|
||||
avs_csr_readdata => avs_csr_readdata_int(i),
|
||||
avs_csr_address => avs_csr_address(5 downto 0),
|
||||
avs_csr_write => avs_csr_write_int(i),
|
||||
avs_csr_writedata => avs_csr_writedata,
|
||||
avs_csr_read => avs_csr_read_int(i),
|
||||
avs_csr_readdata => avs_csr_readdata_int(i),
|
||||
|
||||
avs_seq_address => avs_seq_address(9 downto 0),
|
||||
avs_seq_write => avs_seq_write_int(i),
|
||||
avs_seq_writedata => avs_seq_writedata,
|
||||
avs_seq_read => avs_seq_read_int(i),
|
||||
avs_seq_readdata => avs_seq_readdata_int(i),
|
||||
avs_seq_address => avs_seq_address(9 downto 0),
|
||||
avs_seq_write => avs_seq_write_int(i),
|
||||
avs_seq_writedata => avs_seq_writedata,
|
||||
avs_seq_read => avs_seq_read_int(i),
|
||||
avs_seq_readdata => avs_seq_readdata_int(i),
|
||||
|
||||
pixel_buf_wr => pixel_buf_wr_int(i),
|
||||
pixel_buf_wr_data => pixel_buf_wr_data_int(i),
|
||||
pixel_buf_rdy => pixel_buf_rdy(i),
|
||||
pixel_buf_last_word => pixel_buf_last_word,
|
||||
pixel_buf_wr => pixel_buf_wr_int(i),
|
||||
pixel_buf_wr_data => pixel_buf_wr_data_int(i),
|
||||
pixel_buf_rdy => pixel_buf_rdy(i),
|
||||
|
||||
all_on_emul => all_on_emul(i),
|
||||
all_on_emul => all_on_emul(i),
|
||||
bpp_mode => bpp_mode(i)(1 downto 0),
|
||||
chan_en => chan_en,
|
||||
print_data_width => print_data_width,
|
||||
clear_buffer => clear_buffer(i),
|
||||
empty => empty(i),
|
||||
full => full(i),
|
||||
overrun => overrun(i),
|
||||
underrun => underrun(i),
|
||||
fp_drop => fp_drop(i),
|
||||
dbl_drop => dbl_drop(i),
|
||||
|
||||
pixel_buf_wr_aux => pixel_buf_wr_int(i+MAX_HEADS),
|
||||
pixel_buf_wr_data_aux => pixel_buf_wr_data_int(i+MAX_HEADS),
|
||||
pixel_buf_rdy_aux => pixel_buf_rdy(i+MAX_HEADS),
|
||||
pixel_buf_last_word_aux => pixel_buf_last_word,
|
||||
cpu_gl_map => cpu_gl_map_head(i),
|
||||
cpu_gl_map_en => cpu_gl_map_en,
|
||||
|
||||
en_dual_data_path => en_dual_data_path,
|
||||
bpp_mode => bpp_mode(i)(1 downto 0),
|
||||
chan_en => chan_en,
|
||||
print_data_width => print_data_width,
|
||||
clear_buffer => clear_buffer(i),
|
||||
empty => empty(i),
|
||||
full => full(i),
|
||||
overrun => overrun(i),
|
||||
underrun => underrun(i),
|
||||
fp_drop => fp_drop(i),
|
||||
dbl_drop => dbl_drop(i),
|
||||
overlap_error => overlap_error(i),
|
||||
cpu_start_dly_head => cpu_start_dly_head(i),
|
||||
cpu_data_start => cpu_data_start(i),
|
||||
cpu_data_start_first => cpu_data_start_first(i),
|
||||
cpu_data_start_last => cpu_data_start_last(i),
|
||||
cpu_adc_meas => cpu_adc_meas(i),
|
||||
|
||||
cpu_gl_map => cpu_gl_map_head(i),
|
||||
cpu_gl_map_en => cpu_gl_map_en,
|
||||
fire_req => fire_req_int(i),
|
||||
fire_data => fire_req_data_int,
|
||||
|
||||
cpu_start_dly_head => cpu_start_dly_head(i),
|
||||
cpu_data_start => cpu_data_start(i),
|
||||
cpu_data_start_first => cpu_data_start_first(i),
|
||||
cpu_data_start_last => cpu_data_start_last(i),
|
||||
cpu_adc_meas => cpu_adc_meas(i),
|
||||
stm8_trigger_rx => stm8_trigger_rx_int(i),
|
||||
sig_seq_force_dacs_0v => sig_seq_force_dacs_0v,
|
||||
dac_0v_value => dac_0v_value,
|
||||
|
||||
fire_req => fire_req_int(i),
|
||||
fire_req_start_merge => fire_req_start_merge_int(i),
|
||||
fire_data => fire_req_data_int,
|
||||
wave_req_ext => wave_req_cpu(i),
|
||||
wave_addr_ext => wave_addr_cpu(i),
|
||||
wave_delay_ext => (others => '0'),
|
||||
|
||||
px_buf_ch_nactive => px_buf_ch_nactive(i*NUM_CHANS+NUM_CHANS-1 downto i*NUM_CHANS),
|
||||
seq_dac_data => seq_dac_data_int(i),
|
||||
wave_seq_busy => wave_seq_busy(i),
|
||||
print_seq_busy => print_seq_busy(i),
|
||||
|
||||
stm8_trigger_rx => stm8_trigger_rx_int(i),
|
||||
print_all_on => print_all_on_int(i),
|
||||
print_latch => print_latch_int(i),
|
||||
print_clk => print_clk_int(i downto i),
|
||||
print_data => print_data_int(i * MAX_OP_WIDTH + MAX_OP_WIDTH - 1 downto i * MAX_OP_WIDTH),
|
||||
|
||||
diag_word_count => diag_word_count(i),
|
||||
|
||||
cpu_fire_req_start_merge => cpu_fire_req_start_merge,
|
||||
cpu_fire_req_pulse => cpu_fire_req_pulse and not cpu_fire_req_mask(i),
|
||||
|
||||
cpu_start_seq_go => cpu_start_seq_go(i) and cpu_start_seq_pulse,
|
||||
cpu_start_seq_address => cpu_start_seq_address,
|
||||
|
||||
sig_seq_force_dacs_0v => sig_seq_force_dacs_0v,
|
||||
dac_0v_value => dac_0v_value,
|
||||
|
||||
wave_req_ext => wave_req_cpu(i),
|
||||
wave_addr_ext => wave_addr_cpu(i),
|
||||
wave_delay_ext => (others => '0'),
|
||||
|
||||
seq_dac_data => seq_dac_data_int(i),
|
||||
wave_seq_busy => wave_seq_busy(i),
|
||||
print_seq_busy => print_seq_busy(i),
|
||||
|
||||
print_all_on => print_all_on_int(i),
|
||||
print_latch => print_latch_int(i),
|
||||
print_clk => print_clk_int(i downto i),
|
||||
print_data => print_data_int(i * MAX_OP_WIDTH + MAX_OP_WIDTH - 1 downto i * MAX_OP_WIDTH),
|
||||
|
||||
diag_peek_sel => diag_peek_sel(i),
|
||||
diag_peek_addr => diag_peek_addr,
|
||||
diag_peek_data => diag_peek_data_int(i),
|
||||
diag_peek_rdptr => diag_peek_rdptr_int(i),
|
||||
diag_peek_wrptr => diag_peek_wrptr_int(i),
|
||||
diag_peek_wdata => diag_peek_wdata,
|
||||
diag_peek_wr => diag_peek_wr,
|
||||
|
||||
diag_word_count => diag_word_count(i),
|
||||
|
||||
debug_out => print_unit_dbg((i * 4) + 3 downto (i * 4))
|
||||
debug_out => print_unit_dbg((i * 4) + 3 downto (i * 4))
|
||||
|
||||
);
|
||||
end generate GEN_PRINT_UNIT_LOOP;
|
||||
|
|
@ -678,8 +520,8 @@ begin
|
|||
print_clk(i downto i) <= print_clk_int(i downto i);
|
||||
|
||||
-- When not combining, the maximum o/p width is take the bottom N bits from each channel
|
||||
print_data(i * MAX_OP_WIDTH + MAX_OP_WIDTH - 1 downto i * MAX_OP_WIDTH) <= print_data_int(3 * MAX_OP_WIDTH + MAX_OP_WIDTH / MAX_HEADS - 1 downto 3 * MAX_OP_WIDTH) &
|
||||
print_data_int(2 * MAX_OP_WIDTH + MAX_OP_WIDTH / MAX_HEADS - 1 downto 2 * MAX_OP_WIDTH) &
|
||||
print_data(i * MAX_OP_WIDTH + MAX_OP_WIDTH - 1 downto i * MAX_OP_WIDTH) <= print_data_int(3 * MAX_OP_WIDTH + MAX_OP_WIDTH / MAX_HEADS - 1 downto 3 * MAX_OP_WIDTH) &
|
||||
print_data_int(2 * MAX_OP_WIDTH + MAX_OP_WIDTH / MAX_HEADS - 1 downto 2 * MAX_OP_WIDTH) &
|
||||
print_data_int(MAX_OP_WIDTH + MAX_OP_WIDTH / MAX_HEADS - 1 downto MAX_OP_WIDTH) &
|
||||
print_data_int(MAX_OP_WIDTH / MAX_HEADS - 1 downto 0);
|
||||
end if;
|
||||
|
|
@ -706,14 +548,14 @@ begin
|
|||
DAC_DATA_WIDTH => DAC_DATA_WIDTH
|
||||
)
|
||||
port map(
|
||||
|
||||
|
||||
clk_x2 => clk_x2,
|
||||
rst_n => rst_n,
|
||||
seq_dac_data0 => seq_dac_data(i * 2),
|
||||
seq_dac_data1 => seq_dac_data(i * 2 + 1),
|
||||
|
||||
|
||||
dac_data => dac_data(i)
|
||||
|
||||
|
||||
);
|
||||
end generate GEN_DAC_IF_LOOP;
|
||||
|
||||
|
|
@ -723,11 +565,10 @@ begin
|
|||
|
||||
print_streamer_inst : entity work.print_streamer
|
||||
generic map(
|
||||
MAX_HEADS => MAX_HEADS,
|
||||
NUM_HEADS => NUM_HEADS,
|
||||
NUM_CHANS => NUM_CHANS,
|
||||
NO_ZERO_GAP => NO_ZERO_GAP,
|
||||
STREAMER_LOGGER => STREAMER_LOGGER
|
||||
MAX_HEADS => MAX_HEADS,
|
||||
NUM_HEADS => NUM_HEADS,
|
||||
NUM_EXT_DSTS => NUM_HEADS + 1,
|
||||
SLIM => SLIM
|
||||
)
|
||||
port map(
|
||||
|
||||
|
|
@ -740,6 +581,14 @@ begin
|
|||
avs_csr_read => print_streamer_read,
|
||||
avs_csr_readdata => print_streamer_readdata,
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest,
|
||||
|
||||
avm_rx_burstcount => avm_rx_burstcount,
|
||||
avm_rx_address => avm_rx_address,
|
||||
avm_rx_read => avm_rx_read,
|
||||
avm_rx_readdata => avm_rx_readdata,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid,
|
||||
|
||||
axm_awaddr => axm_awaddr,
|
||||
axm_awprot => axm_awprot,
|
||||
axm_awvalid => axm_awvalid,
|
||||
|
|
@ -767,45 +616,20 @@ begin
|
|||
axm_rvalid => axm_rvalid,
|
||||
axm_rready => axm_rready,
|
||||
|
||||
dest_port_wr => pixel_buf_wr,
|
||||
dest_port_wr => dest_port_wr(NUM_HEADS downto 0),
|
||||
dest_port_wr_data => pixel_buf_wr_data,
|
||||
dest_port_rdy => pixel_buf_rdy,
|
||||
dest_port_last_word => pixel_buf_last_word,
|
||||
dest_port_rdy => dest_port_rdy(NUM_HEADS downto 0),
|
||||
|
||||
debug_out => ps_debug
|
||||
);
|
||||
|
||||
-- DIAGs
|
||||
P_DIAG : process(rst_n, clk) is
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
diag_nonzero_head <= (others => (others => '0'));
|
||||
print_clk_int_d <= (others => '1');
|
||||
diag_nonzero_inc <= (others => '0');
|
||||
elsif clk'event and clk = '1' then
|
||||
diag_nonzero_inc <= (others => '0');
|
||||
print_clk_int_d <= print_clk_int;
|
||||
-- The first NUM_HEADS ready signals are from the head pixel buffers,
|
||||
-- followed by the print streamer.
|
||||
dest_port_rdy <= ps_rdy & pixel_buf_rdy;
|
||||
|
||||
for i in 0 to (MAX_HEADS-1) loop
|
||||
|
||||
if diag_nonzero_clr(i) then
|
||||
diag_nonzero_head(i) <= (others => '0');
|
||||
else
|
||||
if diag_nonzero_inc(i) = '1' then
|
||||
if unsigned(diag_nonzero_head(i)) /= 127 then
|
||||
diag_nonzero_head(i) <= std_logic_vector(unsigned(diag_nonzero_head(i))+1);
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if print_clk_int(i) = '0' and print_clk_int_d(i) = '1' then
|
||||
if unsigned(print_data_int(i * MAX_OP_WIDTH + 7 downto i * MAX_OP_WIDTH)) /= 0 then
|
||||
diag_nonzero_inc(i) <= '1';
|
||||
end if;
|
||||
end if;
|
||||
end loop;
|
||||
end if;
|
||||
end process;
|
||||
pixel_buf_wr <= dest_port_wr(pixel_buf_wr'length - 1 downto 0);
|
||||
ps_wr <= dest_port_wr(pixel_buf_wr'length);
|
||||
ps_wr_data <= pixel_buf_wr_data;
|
||||
|
||||
end rtl;
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
},
|
||||
"status" : {
|
||||
"address" : "4",
|
||||
"width" : "26",
|
||||
"width" : "28",
|
||||
"description" : "Command port",
|
||||
"fields" : {
|
||||
"queue_space" : {
|
||||
|
|
@ -122,6 +122,18 @@
|
|||
"reset" : "16",
|
||||
"description" : "Amount of command space left in queue, in units of commands (2 words). I.e. when 1, can write a single command of two words."
|
||||
},
|
||||
"tlb_mismatch_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "TLB mapping mis-match error."
|
||||
},
|
||||
"tlb_empty_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "TLB empty error."
|
||||
},
|
||||
"auto_load_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
|
|
@ -168,7 +180,7 @@
|
|||
},
|
||||
"diags" : {
|
||||
"address" : "5",
|
||||
"width" : "28",
|
||||
"width" : "20",
|
||||
"description" : "Command port",
|
||||
"fields" : {
|
||||
"remain" : {
|
||||
|
|
@ -206,12 +218,6 @@
|
|||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Destination ready"
|
||||
},
|
||||
"logger_wr_ptr" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0",
|
||||
"description" : "Data streamer command logger write pointer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -318,13 +324,6 @@
|
|||
"type" : "w",
|
||||
"reset" : "0",
|
||||
"description" : "Redirection read address"
|
||||
},
|
||||
"diag_logger_rdata" : {
|
||||
"address" : "15",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Data streamer command queue logger read data"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[{
|
||||
"ip_name" : "print_streamer",
|
||||
"bus" : "csr",
|
||||
"addr_hi_bit" : "6",
|
||||
"addr_hi_bit" : "5",
|
||||
"addr_lo_bit" : "4",
|
||||
"description" : "This block is the top level for the GMA SOM board soft IP",
|
||||
"sub_blocks" : {
|
||||
|
|
@ -24,26 +24,6 @@
|
|||
"instance" : "3",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x30"
|
||||
},
|
||||
"data_streamer:e" : {
|
||||
"instance" : "0_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x40"
|
||||
},
|
||||
"data_streamer:f" : {
|
||||
"instance" : "1_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x50"
|
||||
},
|
||||
"data_streamer:g" : {
|
||||
"instance" : "2_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x60"
|
||||
},
|
||||
"data_streamer:h" : {
|
||||
"instance" : "3_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x70"
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
entity avm_to_axi_master is
|
||||
generic (
|
||||
|
|
@ -34,21 +35,21 @@ entity avm_to_axi_master is
|
|||
);
|
||||
port (
|
||||
en_acp_window : in std_logic;
|
||||
|
||||
|
||||
--AXI write address bus
|
||||
axm_awaddr : out std_logic_vector(31 downto 0) := (others => '0'); -- @suppress "Unused port: axm_awaddr is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_awprot : out std_logic_vector( 2 downto 0) := (others => '0'); -- @suppress "Unused port: axm_awprot is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_awaddr : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
axm_awprot : out std_logic_vector( 2 downto 0) := (others => '0');
|
||||
axm_awvalid : out std_logic; --master addr valid
|
||||
axm_awready : in std_logic; --slave ready to accept -- @suppress "Unused port: axm_awready is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_awready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write data bus
|
||||
axm_wdata : out std_logic_vector(31 downto 0) := (others => '0'); -- @suppress "Unused port: axm_wdata is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_wlast : out std_logic := '0'; --last transfer in burst -- @suppress "Unused port: axm_wlast is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_wdata : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
axm_wlast : out std_logic := '0'; --last transfer in burst
|
||||
axm_wvalid : out std_logic; --master data valid
|
||||
axm_wready : in std_logic; --slave ready to accept -- @suppress "Unused port: axm_wready is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_wready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write response bus
|
||||
axm_bvalid : in std_logic; -- @suppress "Unused port: axm_bvalid is not used in work.avm_to_axi_master(rtl)"
|
||||
axm_bvalid : in std_logic;
|
||||
axm_bready : out std_logic;
|
||||
|
||||
--AXI read address bus
|
||||
|
|
@ -68,13 +69,18 @@ entity avm_to_axi_master is
|
|||
axm_rready : out std_logic; --master ready to accept
|
||||
|
||||
-- AVM input port 0
|
||||
avm_rx_read : in std_logic;
|
||||
avm_rx_burstcount : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address : in std_logic_vector(31 downto 0);
|
||||
|
||||
avm_rx_read0 : in std_logic;
|
||||
avm_rx_burstcount0 : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address0 : in std_logic_vector(31 downto 0);
|
||||
|
||||
-- AVM input port 1
|
||||
avm_rx_read1 : in std_logic;
|
||||
avm_rx_burstcount1 : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address1 : in std_logic_vector(31 downto 0);
|
||||
|
||||
-- AVM common signals
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic
|
||||
|
||||
|
|
@ -83,20 +89,26 @@ end entity;
|
|||
|
||||
architecture rtl of avm_to_axi_master is
|
||||
|
||||
signal avm_rx_read : std_logic;
|
||||
signal avm_rx_address : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_burstcount : std_logic_vector(11 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
-- Mux the Avalon master bus between port 0 and port 1. Port 0 has priority.
|
||||
avm_rx_read <= avm_rx_read0 or avm_rx_read1;
|
||||
avm_rx_address <= avm_rx_address0 when avm_rx_read0 = '1' else avm_rx_address1;
|
||||
avm_rx_burstcount <= avm_rx_burstcount0 when avm_rx_read0 = '1' else avm_rx_burstcount1;
|
||||
|
||||
axm_awvalid <= '0';
|
||||
axm_wvalid <= '0';
|
||||
axm_bready <= '0';
|
||||
|
||||
axm_arvalid <= avm_rx_read;
|
||||
axm_araddr <= '1' & avm_rx_address(30 downto 0) when en_acp_window = '1' else -- Access via ACP window (bit 31 set)
|
||||
avm_rx_address(31 downto 0); -- Can access any location including ACP window
|
||||
|
||||
|
||||
axm_araddr <= en_acp_window & avm_rx_address(30 downto 0); -- Access via ACP window (bit 31 set)
|
||||
axm_arlen <= std_logic_vector(unsigned(avm_rx_burstcount(7 downto 0)) - 1);
|
||||
axm_arsize <= 3X"2"; -- 4 bytes transfers (2^ARSIZE bytes)
|
||||
axm_arburst <= "01"; -- Increment
|
||||
axm_arburst <= "01"; -- Increment
|
||||
axm_arprot <= "000"; -- Unpriviledged, non-secure, data access
|
||||
axm_arcache <= ARCACHE;
|
||||
axm_aruser <= ARUSER;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
package mem_arbiter_pkg is
|
||||
type bus_array_t is array(natural range <>) of std_logic_vector;
|
||||
|
|
@ -35,26 +36,27 @@ end package;
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
--use work.pkg_functions.all;
|
||||
use work.pkg_functions.all;
|
||||
use work.mem_arbiter_pkg.all;
|
||||
|
||||
entity mem_arbiter is
|
||||
generic (
|
||||
NUM_PORTS : natural range 1 to 16 := 8
|
||||
NUM_HEADS : natural range 1 to 4 := 4
|
||||
);
|
||||
port (
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
transfer_active : in std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
avm_rx_waitrequest_in : out std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
avm_rx_burstcount_in : in bus_array_t (0 to NUM_PORTS-1)(11 downto 0);
|
||||
avm_rx_address_in : in bus_array_t (0 to NUM_PORTS-1)(31 downto 0);
|
||||
avm_rx_read_in : in std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
avm_rx_readdata_in : out bus_array_t (0 to NUM_PORTS-1)(31 downto 0);
|
||||
avm_rx_readdatavalid_in : out std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
transfer_active : in std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
avm_rx_waitrequest_in : out std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
avm_rx_burstcount_in : in bus_array_t (0 to NUM_HEADS-1)(11 downto 0);
|
||||
avm_rx_address_in : in bus_array_t (0 to NUM_HEADS-1)(31 downto 0);
|
||||
avm_rx_read_in : in std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
avm_rx_readdata_in : out bus_array_t (0 to NUM_HEADS-1)(31 downto 0);
|
||||
avm_rx_readdatavalid_in : out std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
|
||||
avm_rx_waitrequest : in std_logic;
|
||||
avm_rx_burstcount : out std_logic_vector(11 downto 0);
|
||||
|
|
@ -69,17 +71,17 @@ end entity mem_arbiter;
|
|||
|
||||
architecture rtl of mem_arbiter is
|
||||
|
||||
signal enable : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal mask : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal reqs : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal prior_choice : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal any_choice : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal transfer_active_dly : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal enable : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal mask : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal reqs : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal prior_choice : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal any_choice : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal transfer_active_dly : std_logic_vector(NUM_HEADS-1 downto 0);
|
||||
signal sel_trans_end : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
GEN_ARB_LOOP : for i in 0 to NUM_PORTS-1 generate
|
||||
GEN_ARB_LOOP : for i in 0 to NUM_HEADS-1 generate
|
||||
|
||||
avm_rx_waitrequest_in(i) <= avm_rx_waitrequest or not enable(i);
|
||||
avm_rx_readdata_in(i) <= avm_rx_readdata;
|
||||
|
|
@ -88,60 +90,39 @@ GEN_ARB_LOOP : for i in 0 to NUM_PORTS-1 generate
|
|||
end generate GEN_ARB_LOOP;
|
||||
|
||||
-- Mux burst count on selected source
|
||||
avm_rx_burstcount <= avm_rx_burstcount_in(7) when enable(7) = '1' else
|
||||
avm_rx_burstcount_in(6) when enable(6) = '1' else
|
||||
avm_rx_burstcount_in(5) when enable(5) = '1' else
|
||||
avm_rx_burstcount_in(4) when enable(4) = '1' else
|
||||
avm_rx_burstcount_in(3) when enable(3) = '1' else
|
||||
avm_rx_burstcount <= avm_rx_burstcount_in(3) when enable(3) = '1' else
|
||||
avm_rx_burstcount_in(2) when enable(2) = '1' else
|
||||
avm_rx_burstcount_in(1) when enable(1) = '1' else
|
||||
avm_rx_burstcount_in(0);
|
||||
|
||||
-- Mux address on selected source
|
||||
avm_rx_address <= avm_rx_address_in(7) when enable(7) = '1' else
|
||||
avm_rx_address_in(6) when enable(6) = '1' else
|
||||
avm_rx_address_in(5) when enable(5) = '1' else
|
||||
avm_rx_address_in(4) when enable(4) = '1' else
|
||||
avm_rx_address_in(3) when enable(3) = '1' else
|
||||
avm_rx_address <= avm_rx_address_in(3) when enable(3) = '1' else
|
||||
avm_rx_address_in(2) when enable(2) = '1' else
|
||||
avm_rx_address_in(1) when enable(1) = '1' else
|
||||
avm_rx_address_in(0);
|
||||
|
||||
-- Issue a read whenever an enabled channel is requesting
|
||||
avm_rx_read <= '1' when (enable and avm_rx_read_in) /= 8x"0" else '0';
|
||||
avm_rx_read <= '1' when (enable and avm_rx_read_in) /= 4x"0" else '0';
|
||||
|
||||
-- Request vector for prioritised channels
|
||||
reqs <= avm_rx_read_in and not mask;
|
||||
|
||||
-- Priority encoder to choose from one or more reqs
|
||||
prior_choice <= std_logic_vector(to_unsigned(2#10000000#, NUM_PORTS)) when reqs(7) else
|
||||
std_logic_vector(to_unsigned(2#01000000#, NUM_PORTS)) when reqs(6) else
|
||||
std_logic_vector(to_unsigned(2#00100000#, NUM_PORTS)) when reqs(5) else
|
||||
std_logic_vector(to_unsigned(2#00010000#, NUM_PORTS)) when reqs(4) else
|
||||
std_logic_vector(to_unsigned(2#00001000#, NUM_PORTS)) when reqs(3) else
|
||||
std_logic_vector(to_unsigned(2#00000100#, NUM_PORTS)) when reqs(2) else
|
||||
std_logic_vector(to_unsigned(2#00000010#, NUM_PORTS)) when reqs(1) else
|
||||
std_logic_vector(to_unsigned(2#00000001#, NUM_PORTS));
|
||||
prior_choice <= "1000" when reqs(3) else
|
||||
"0100" when reqs(2) else
|
||||
"0010" when reqs(1) else
|
||||
"0001";
|
||||
|
||||
-- Priority encoder to choose from any requesting channel
|
||||
any_choice <= std_logic_vector(to_unsigned(2#00000001#, NUM_PORTS)) when avm_rx_read_in(0) else
|
||||
std_logic_vector(to_unsigned(2#00000010#, NUM_PORTS)) when avm_rx_read_in(1) else
|
||||
std_logic_vector(to_unsigned(2#00000100#, NUM_PORTS)) when avm_rx_read_in(2) else
|
||||
std_logic_vector(to_unsigned(2#00001000#, NUM_PORTS)) when avm_rx_read_in(3) else
|
||||
std_logic_vector(to_unsigned(2#00010000#, NUM_PORTS)) when avm_rx_read_in(4) else
|
||||
std_logic_vector(to_unsigned(2#00100000#, NUM_PORTS)) when avm_rx_read_in(5) else
|
||||
std_logic_vector(to_unsigned(2#01000000#, NUM_PORTS)) when avm_rx_read_in(6) else
|
||||
std_logic_vector(to_unsigned(2#10000000#, NUM_PORTS));
|
||||
any_choice <= "0001" when avm_rx_read_in(0) else
|
||||
"0010" when avm_rx_read_in(1) else
|
||||
"0100" when avm_rx_read_in(2) else
|
||||
"1000";
|
||||
|
||||
-- Flag when selected channel end a transfer
|
||||
sel_trans_end <= (transfer_active_dly(0) and not transfer_active(0) and enable(0)) or
|
||||
(transfer_active_dly(1) and not transfer_active(1) and enable(1)) or
|
||||
(transfer_active_dly(2) and not transfer_active(2) and enable(2)) or
|
||||
(transfer_active_dly(3) and not transfer_active(3) and enable(3)) or
|
||||
(transfer_active_dly(4) and not transfer_active(4) and enable(4)) or
|
||||
(transfer_active_dly(5) and not transfer_active(5) and enable(5)) or
|
||||
(transfer_active_dly(6) and not transfer_active(6) and enable(6)) or
|
||||
(transfer_active_dly(7) and not transfer_active(7) and enable(7));
|
||||
(transfer_active_dly(3) and not transfer_active(3) and enable(3));
|
||||
|
||||
-- Arbitration state process
|
||||
process (clk, rst_n)
|
||||
|
|
@ -159,7 +140,7 @@ end generate GEN_ARB_LOOP;
|
|||
|
||||
-- If no active channel or just ending a transfer, arbitrate for any new requests
|
||||
if unsigned(enable) = 0 or sel_trans_end = '1' then
|
||||
|
||||
|
||||
-- By default clear any outstanding enable.
|
||||
enable <= (others => '0');
|
||||
|
||||
|
|
|
|||
|
|
@ -31,71 +31,77 @@
|
|||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pkg_functions.all;
|
||||
use work.mem_arbiter_pkg.all;
|
||||
|
||||
entity print_streamer is
|
||||
generic (
|
||||
CMD_QUEUE_DEPTH : natural range 1 to 1024 := 32;
|
||||
MAX_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_CHANS : natural range 1 to 16 := 2;
|
||||
NO_ZERO_GAP : boolean := false;
|
||||
STREAMER_LOGGER : boolean := false;
|
||||
LOGGER_DEPTH : integer range 1 to 1024 := 256
|
||||
generic(
|
||||
CMD_QUEUE_DEPTH : natural range 1 to 1024 := 32;
|
||||
MAX_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_EXT_DSTS : natural range 1 to 16 := 5; -- NUM_HEADS+1
|
||||
SLIM : boolean := false
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
avs_csr_address : in std_logic_vector(10 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
avs_csr_readdata : out std_logic_vector(31 downto 0);
|
||||
avs_csr_address : in std_logic_vector(9 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
avs_csr_readdata : out std_logic_vector(31 downto 0);
|
||||
|
||||
-- External master port for access to memory system via AXI bus
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
avm_rx_burstcount : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address : in std_logic_vector(31 downto 0);
|
||||
avm_rx_read : in std_logic;
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic;
|
||||
|
||||
--AXI write address bus
|
||||
axm_awaddr : out std_logic_vector(31 downto 0);
|
||||
axm_awprot : out std_logic_vector( 2 downto 0);
|
||||
axm_awvalid : out std_logic; --master addr valid
|
||||
axm_awready : in std_logic; --slave ready to accept
|
||||
axm_awaddr : out std_logic_vector(31 downto 0);
|
||||
axm_awprot : out std_logic_vector(2 downto 0);
|
||||
axm_awvalid : out std_logic; --master addr valid
|
||||
axm_awready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write data bus
|
||||
axm_wdata : out std_logic_vector(31 downto 0);
|
||||
axm_wlast : out std_logic; --last transfer in burst
|
||||
axm_wvalid : out std_logic; --master data valid
|
||||
axm_wready : in std_logic; --slave ready to accept
|
||||
axm_wdata : out std_logic_vector(31 downto 0);
|
||||
axm_wlast : out std_logic; --last transfer in burst
|
||||
axm_wvalid : out std_logic; --master data valid
|
||||
axm_wready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write response bus
|
||||
axm_bvalid : in std_logic;
|
||||
axm_bready : out std_logic;
|
||||
axm_bvalid : in std_logic;
|
||||
axm_bready : out std_logic;
|
||||
|
||||
--AXI read address bus
|
||||
axm_araddr : out std_logic_vector(31 downto 0);
|
||||
axm_arlen : out std_logic_vector( 7 downto 0); --burst length - 1 to 256 (ARLEN = burst len -1)
|
||||
axm_arsize : out std_logic_vector( 2 downto 0); --size, nb bytes, of each transfer in burst
|
||||
axm_arburst : out std_logic_vector( 1 downto 0); --for bursts>1, accept only incr burst=01
|
||||
axm_arcache : out std_logic_vector( 3 downto 0);
|
||||
axm_aruser : out std_logic;
|
||||
axm_arprot : out std_logic_vector( 2 downto 0);
|
||||
axm_arvalid : out std_logic; --master addr valid
|
||||
axm_arready : in std_logic; --slave ready to accept
|
||||
axm_araddr : out std_logic_vector(31 downto 0);
|
||||
axm_arlen : out std_logic_vector(7 downto 0); --burst length - 1 to 256 (ARLEN = burst len -1)
|
||||
axm_arsize : out std_logic_vector(2 downto 0); --size, nb bytes, of each transfer in burst
|
||||
axm_arburst : out std_logic_vector(1 downto 0); --for bursts>1, accept only incr burst=01
|
||||
axm_arcache : out std_logic_vector(3 downto 0);
|
||||
axm_aruser : out std_logic;
|
||||
axm_arprot : out std_logic_vector(2 downto 0);
|
||||
axm_arvalid : out std_logic; --master addr valid
|
||||
axm_arready : in std_logic; --slave ready to accept
|
||||
|
||||
-- AXI read data bus
|
||||
axm_rdata : in std_logic_vector(31 downto 0);
|
||||
axm_rvalid : in std_logic; --slave data valid
|
||||
axm_rready : out std_logic; --master ready to access
|
||||
axm_rdata : in std_logic_vector(31 downto 0);
|
||||
axm_rvalid : in std_logic; --slave data valid
|
||||
axm_rready : out std_logic; --master ready to access
|
||||
|
||||
dest_port_wr : out std_logic_vector(MAX_HEADS*NUM_CHANS-1 downto 0);
|
||||
dest_port_wr_data : out std_logic_vector(31 downto 0);
|
||||
dest_port_rdy : in std_logic_vector(MAX_HEADS*NUM_CHANS-1 downto 0);
|
||||
dest_port_last_word : out std_logic;
|
||||
dest_port_wr : out std_logic_vector(NUM_EXT_DSTS - 1 downto 0);
|
||||
dest_port_wr_data : out std_logic_vector(31 downto 0);
|
||||
dest_port_rdy : in std_logic_vector(NUM_EXT_DSTS - 1 downto 0);
|
||||
|
||||
irq : out std_logic;
|
||||
irq : out std_logic;
|
||||
|
||||
debug_out : out std_logic_vector(19 downto 0)
|
||||
debug_out : out std_logic_vector(19 downto 0)
|
||||
|
||||
);
|
||||
|
||||
|
|
@ -103,509 +109,438 @@ end entity print_streamer;
|
|||
|
||||
architecture rtl of print_streamer is
|
||||
|
||||
constant CMD_QUEUE_DEPTH_LOG2 : integer := log2(CMD_QUEUE_DEPTH);
|
||||
constant CMD_QUEUE_DEPTH_LOG2 : integer := log2(CMD_QUEUE_DEPTH) - 1;
|
||||
|
||||
-- Data streamer control and status
|
||||
signal cmd_port_pulse : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal cmd_port : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal status_queue_space : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 5 downto 0);
|
||||
signal control_clear_cmd : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_clear_errors : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_msb : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_watermark : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal control_en_acp_window : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_disable : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_clr_dst0_count : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal auto_cmd_active : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal auto_load_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal bad_cmd_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal cpu_race_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal overrun_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal handle : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(11 downto 0);
|
||||
type queue_spc_t is array (0 to NUM_HEADS - 1) of std_logic_vector(5 downto 0);
|
||||
type watermark_t is array (0 to NUM_HEADS - 1) of std_logic_vector(7 downto 0);
|
||||
type handle_t is array (0 to NUM_HEADS - 1) of std_logic_vector(11 downto 0);
|
||||
type debug_t is array (0 to NUM_HEADS - 1) of std_logic_vector(19 downto 0);
|
||||
|
||||
-- Avalon read interfaces from the data streamers
|
||||
signal avm_rx_burstcount_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(11 downto 0);
|
||||
signal avm_rx_address_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avm_rx_read_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avm_rx_waitrequest_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avm_rx_readdata_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avm_rx_readdatavalid_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal cmd_port_pulse : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal cmd_port : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal status_queue_space : queue_spc_t;
|
||||
signal control_clear_cmd : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal control_clear_errors : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal control_msb : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal control_watermark : watermark_t;
|
||||
signal control_en_acp_window : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal control_disable : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal control_clr_dst0_count : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal auto_cmd_active : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal auto_load_err : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal bad_cmd_err : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal cpu_race_err : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal overrun_err : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal handle : handle_t;
|
||||
|
||||
-- Arbitrated avalon read interface
|
||||
signal avm_rx_waitrequest_arb : std_logic;
|
||||
signal avm_rx_burstcount_arb : std_logic_vector(11 downto 0);
|
||||
signal avm_rx_address_arb : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_read_arb : std_logic;
|
||||
signal avm_rx_readdata_arb : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_readdatavalid_arb : std_logic;
|
||||
signal avm_rx_burstcount_int : bus_array_t(0 to MAX_HEADS - 1)(11 downto 0);
|
||||
signal avm_rx_address_int : bus_array_t(0 to MAX_HEADS - 1)(31 downto 0);
|
||||
signal avm_rx_read_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal avm_rx_waitrequest_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal avm_rx_readdata_int : bus_array_t(0 to MAX_HEADS - 1)(31 downto 0);
|
||||
signal avm_rx_readdatavalid_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
-- Diagnostic signals
|
||||
signal debug_out_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(19 downto 0);
|
||||
signal diag_1 : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_2 : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal dst0_word_count : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avm_rx_waitrequest_arb : std_logic;
|
||||
signal avm_rx_burstcount_arb : std_logic_vector(11 downto 0);
|
||||
signal avm_rx_address_arb : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_read_arb : std_logic;
|
||||
signal avm_rx_readdata_arb : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_readdatavalid_arb : std_logic;
|
||||
|
||||
-- Register access signals for each of the data streamer register blocks
|
||||
signal avs_csr_readdata_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avs_csr_write_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avs_csr_read_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal debug_out_int : debug_t;
|
||||
|
||||
-- Streamer interrupt signal
|
||||
signal irq_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal diag_1 : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal diag_2 : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal dst0_word_count : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
|
||||
-- Dta streamer data output write busses
|
||||
signal dest_port_wr_data_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal dest_port_last_word_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avs_csr_readdata_int : bus_array_t(0 to MAX_HEADS - 1)(31 downto 0);
|
||||
signal avs_csr_write_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
signal avs_csr_read_int : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
-- Data streamer actives statuses
|
||||
signal transfer_active : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal irq_int : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
|
||||
-- Streamer FIFO signals
|
||||
signal fifo_wr_port_pulse : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_wr_port : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_wr_port_in : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_rd_port : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_rd_port_pulse : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_empty : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_full : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_underrun : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_overrun : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_controls_clr_fifo : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_controls_clr_errors : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_controls_pop_rd_port : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_rd_addr : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_loop_count : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 9 downto 0);
|
||||
signal dest_port_wr_data_int : bus_array_t(0 to MAX_HEADS - 1)(31 downto 0);
|
||||
|
||||
signal diag_cmd_q_write : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal diag_cmd_q_write_data : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_cmd_q_read_data : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_cmd_q_rd_addr : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(log2(LOGGER_DEPTH)-2 downto 0) := (others => (others => '0'));
|
||||
signal diag_cmd_q_clr_log : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0) := (others => '0');
|
||||
signal diag_cmd_q_wr_count : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(log2(LOGGER_DEPTH)-2 downto 0) := (others => (others => '0'));
|
||||
signal dest_port_wr_0 : std_logic_vector(1 downto 0);
|
||||
signal dest_port_rdy_0 : std_logic_vector(1 downto 0);
|
||||
|
||||
-- ID signals
|
||||
signal ip_id_ip_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal ip_id_mfr_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal ip_ver_minor_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal ip_ver_major_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal fifo_wr_port_pulse : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_wr_port : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal fifo_wr_port_in : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal fifo_rd_port : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal fifo_rd_port_pulse : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_status_empty : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_status_full : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_status_underrun : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_status_overrun : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_controls_clr_fifo : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_controls_clr_errors : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_controls_pop_rd_port : std_logic_vector(NUM_HEADS - 1 downto 0);
|
||||
signal fifo_rd_addr : bus_array_t(0 to NUM_HEADS - 1)(31 downto 0);
|
||||
signal fifo_loop_count : bus_array_t(0 to NUM_HEADS - 1)(9 downto 0);
|
||||
|
||||
signal ip_id_ip_number : bus_array_t(0 to NUM_HEADS - 1)(7 downto 0);
|
||||
signal ip_id_mfr_number : bus_array_t(0 to NUM_HEADS - 1)(7 downto 0);
|
||||
signal ip_ver_minor_number : bus_array_t(0 to NUM_HEADS - 1)(7 downto 0);
|
||||
signal ip_ver_major_number : bus_array_t(0 to NUM_HEADS - 1)(7 downto 0);
|
||||
|
||||
signal dest_port_wr_int : std_logic_vector(MAX_HEADS downto 0);
|
||||
|
||||
signal transfer_active : std_logic_vector(MAX_HEADS - 1 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
-- -----------------------------------
|
||||
-- Data path combinatorial logic
|
||||
-- -----------------------------------
|
||||
debug_out <= debug_out_int(0);
|
||||
|
||||
-- Export debug bus from streamer 0
|
||||
debug_out <= debug_out_int(0);
|
||||
irq <= '0' when irq_int = std_logic_vector(to_unsigned(0, NUM_HEADS)) else '1';
|
||||
|
||||
-- Interrupt on output if any interrupt asserted
|
||||
irq <= '0' when irq_int = std_logic_vector(to_unsigned(0, NUM_CHANS*MAX_HEADS)) else '1';
|
||||
dest_port_wr_int(NUM_EXT_DSTS - 1 downto 0) <= dest_port_wr;
|
||||
|
||||
dest_port_wr_data <= dest_port_wr_data_int(3) when dest_port_wr_int(3) = '1' else
|
||||
dest_port_wr_data_int(2) when dest_port_wr_int(2) = '1' else
|
||||
dest_port_wr_data_int(1) when dest_port_wr_int(1) = '1' else
|
||||
dest_port_wr_data_int(0);
|
||||
|
||||
|
||||
-- Mux the destination output bus from data streamers with an (arbitrary) priority encoding
|
||||
process (all)
|
||||
begin
|
||||
dest_port_wr_data <= dest_port_wr_data_int(0);
|
||||
dest_port_wr(0) <= dest_port_wr_0(0);
|
||||
dest_port_wr(NUM_EXT_DSTS - 1) <= dest_port_wr_0(1);
|
||||
|
||||
for i in NUM_CHANS*MAX_HEADS-1 downto 1 loop
|
||||
if dest_port_wr(i) then
|
||||
dest_port_wr_data <= dest_port_wr_data_int(i);
|
||||
end if;
|
||||
end loop;
|
||||
end process;
|
||||
dest_port_rdy_0(0) <= dest_port_rdy(0);
|
||||
dest_port_rdy_0(1) <= dest_port_rdy(NUM_EXT_DSTS - 1);
|
||||
|
||||
dest_port_last_word <= '1' when unsigned(dest_port_last_word_int) /= 0 else '0';
|
||||
|
||||
-- When the number of heads is less than the coonfigured maximum, tie off upper
|
||||
-- bits of key signals
|
||||
GEN_TIE_OFF_REQD : if MAX_HEADS > NUM_HEADS generate
|
||||
|
||||
GEN_TIE_OFF : for i in NUM_HEADS to MAX_HEADS-1 generate
|
||||
|
||||
avm_rx_read_int(i) <= '0';
|
||||
avm_rx_read_int(i+MAX_HEADS) <= '0';
|
||||
transfer_active(i) <= '0';
|
||||
transfer_active(i+MAX_HEADS) <= '0';
|
||||
avs_csr_readdata_int(i) <= (others => '0');
|
||||
avs_csr_readdata_int(i+MAX_HEADS) <= (others => '0');
|
||||
dest_port_last_word_int(i) <= '0';
|
||||
dest_port_last_word_int(i+MAX_HEADS) <= '0';
|
||||
dest_port_wr(i) <= '0';
|
||||
dest_port_wr(i+MAX_HEADS) <= '0';
|
||||
avm_rx_burstcount_int(i) <= (others => '0');
|
||||
avm_rx_burstcount_int(i+MAX_HEADS) <= (others => '0');
|
||||
avm_rx_address_int(i) <= (others => '0');
|
||||
avm_rx_address_int(i+MAX_HEADS) <= (others => '0');
|
||||
dest_port_wr_data_int(i) <= (others => '0');
|
||||
dest_port_wr_data_int(i+MAX_HEADS) <= (others => '0');
|
||||
diag_1(i) <= (others => '0');
|
||||
diag_1(i+MAX_HEADS) <= (others => '0');
|
||||
diag_2(i) <= (others => '0');
|
||||
diag_2(i+MAX_HEADS) <= (others => '0');
|
||||
irq_int(i) <= '0';
|
||||
irq_int(i+MAX_HEADS) <= '0';
|
||||
|
||||
GEN_TIE_OFF : for i in NUM_HEADS to MAX_HEADS - 1 generate
|
||||
avm_rx_read_int(i) <= '0';
|
||||
dest_port_wr_int(i + 1) <= '0';
|
||||
transfer_active(i) <= '0';
|
||||
avs_csr_readdata_int(i) <= (others => '0');
|
||||
end generate GEN_TIE_OFF;
|
||||
|
||||
end generate GEN_TIE_OFF_REQD;
|
||||
|
||||
-- If zero gap support is not required tie off the signals from the uninstantiated zero gap logic
|
||||
GEN_ZG_TIE_OFF : if NO_ZERO_GAP generate
|
||||
GEN_ZG_TIE_OFF_LOOP : for i in MAX_HEADS to MAX_HEADS+NUM_HEADS-1 generate
|
||||
|
||||
print_streamer_csr_decode_1 : entity work.print_streamer_csr_decode -- @suppress "Generic map uses default values. Missing optional actuals: ADDR_DECODE_HI_BIT, ADDR_DECODE_LO_BIT"
|
||||
port map(
|
||||
|
||||
avs_csr_readdata_int(i) <= (others => '0');
|
||||
dest_port_last_word_int(i) <= '0';
|
||||
dest_port_wr(i) <= '0';
|
||||
avm_rx_burstcount_int(i) <= (others => '0');
|
||||
dest_port_wr_data_int(i) <= (others => '0');
|
||||
diag_1(i) <= (others => '0');
|
||||
diag_2(i) <= (others => '0');
|
||||
irq_int(i) <= '0';
|
||||
data_streamer_0_write => avs_csr_write_int(0),
|
||||
data_streamer_0_read => avs_csr_read_int(0),
|
||||
data_streamer_0_readdata => avs_csr_readdata_int(0),
|
||||
data_streamer_1_write => avs_csr_write_int(1),
|
||||
data_streamer_1_read => avs_csr_read_int(1),
|
||||
data_streamer_1_readdata => avs_csr_readdata_int(1),
|
||||
data_streamer_2_write => avs_csr_write_int(2),
|
||||
data_streamer_2_read => avs_csr_read_int(2),
|
||||
data_streamer_2_readdata => avs_csr_readdata_int(2),
|
||||
data_streamer_3_write => avs_csr_write_int(3),
|
||||
data_streamer_3_read => avs_csr_read_int(3),
|
||||
data_streamer_3_readdata => avs_csr_readdata_int(3),
|
||||
|
||||
end generate;
|
||||
end generate GEN_ZG_TIE_OFF;
|
||||
avs_address => avs_csr_address(5 downto 4),
|
||||
avs_write => avs_csr_write,
|
||||
avs_read => avs_csr_read,
|
||||
avs_readdata => avs_csr_readdata
|
||||
|
||||
-- -----------------------------------
|
||||
-- Register access address decode
|
||||
-- -----------------------------------
|
||||
);
|
||||
|
||||
print_streamer_csr_decode_1 : entity work.print_streamer_csr_decode
|
||||
generic map (
|
||||
ADDR_DECODE_HI_BIT => 6,
|
||||
ADDR_DECODE_LO_BIT => 4
|
||||
)
|
||||
port map (
|
||||
GEN_PRINT_STREAMER_LOOP : for i in 0 to NUM_HEADS - 1 generate
|
||||
|
||||
data_streamer_0_write => avs_csr_write_int(0),
|
||||
data_streamer_0_read => avs_csr_read_int(0),
|
||||
data_streamer_0_readdata => avs_csr_readdata_int(0),
|
||||
data_streamer_1_write => avs_csr_write_int(1),
|
||||
data_streamer_1_read => avs_csr_read_int(1),
|
||||
data_streamer_1_readdata => avs_csr_readdata_int(1),
|
||||
data_streamer_2_write => avs_csr_write_int(2),
|
||||
data_streamer_2_read => avs_csr_read_int(2),
|
||||
data_streamer_2_readdata => avs_csr_readdata_int(2),
|
||||
data_streamer_3_write => avs_csr_write_int(3),
|
||||
data_streamer_3_read => avs_csr_read_int(3),
|
||||
data_streamer_3_readdata => avs_csr_readdata_int(3),
|
||||
data_streamer_csr_regs_inst : entity work.data_streamer_csr_regs
|
||||
generic map(
|
||||
ADDR_DECODE_WIDTH => 4
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
data_streamer_0_aux_write => avs_csr_write_int(4),
|
||||
data_streamer_0_aux_read => avs_csr_read_int(4),
|
||||
data_streamer_0_aux_readdata => avs_csr_readdata_int(4),
|
||||
data_streamer_1_aux_write => avs_csr_write_int(5),
|
||||
data_streamer_1_aux_read => avs_csr_read_int(5),
|
||||
data_streamer_1_aux_readdata => avs_csr_readdata_int(5),
|
||||
data_streamer_2_aux_write => avs_csr_write_int(6),
|
||||
data_streamer_2_aux_read => avs_csr_read_int(6),
|
||||
data_streamer_2_aux_readdata => avs_csr_readdata_int(6),
|
||||
data_streamer_3_aux_write => avs_csr_write_int(7),
|
||||
data_streamer_3_aux_read => avs_csr_read_int(7),
|
||||
data_streamer_3_aux_readdata => avs_csr_readdata_int(7),
|
||||
control_clear_cmd => control_clear_cmd(i),
|
||||
control_clear_errors => control_clear_errors(i),
|
||||
control_msb => control_msb(i),
|
||||
control_watermark => control_watermark(i),
|
||||
control_en_acp_window => control_en_acp_window(i),
|
||||
control_disable => control_disable(i),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i),
|
||||
cmd_port_pulse => cmd_port_pulse(i),
|
||||
cmd_port => cmd_port(i),
|
||||
cmd_port_in => (others => '0'),
|
||||
status_queue_space => status_queue_space(i)(5 downto 1),
|
||||
|
||||
avs_address => avs_csr_address(6 downto 4),
|
||||
avs_write => avs_csr_write,
|
||||
avs_read => avs_csr_read,
|
||||
avs_readdata => avs_csr_readdata
|
||||
status_tlb_mismatch_err => '0',
|
||||
status_tlb_empty_err => '0',
|
||||
status_auto_load_err => auto_load_err(i),
|
||||
status_bad_cmd_err => bad_cmd_err(i),
|
||||
status_cpu_race_err => cpu_race_err(i),
|
||||
status_overrun_err => overrun_err(i),
|
||||
status_auto_cmd_active => auto_cmd_active(i),
|
||||
status_cmd_depth_log2 => std_logic_vector(to_unsigned(CMD_QUEUE_DEPTH_LOG2, 4)),
|
||||
status_handle => handle(i),
|
||||
|
||||
);
|
||||
diags_remain => debug_out_int(i)(11 downto 0),
|
||||
diags_cmd_pending => debug_out_int(i)(12),
|
||||
diags_data_active => debug_out_int(i)(13),
|
||||
diags_cmd_avail => debug_out_int(i)(14),
|
||||
diags_dst_sel => debug_out_int(i)(18 downto 15),
|
||||
diags_dst_rdy => debug_out_int(i)(19),
|
||||
|
||||
-- -----------------------------------
|
||||
--Instantiation of streamer channels
|
||||
-- -----------------------------------
|
||||
curr_cmd => diag_1(i),
|
||||
curr_param1 => diag_2(i),
|
||||
|
||||
dst0_word_count => dst0_word_count(i),
|
||||
|
||||
GEN_AUX_LOOP : for j in 0 to 1 generate
|
||||
fifo_wr_port_pulse => fifo_wr_port_pulse(i),
|
||||
fifo_wr_port => fifo_wr_port(i),
|
||||
fifo_wr_port_in => fifo_wr_port_in(i),
|
||||
fifo_rd_port => fifo_rd_port(i),
|
||||
fifo_rd_port_pulse => fifo_rd_port_pulse(i),
|
||||
fifo_status_empty => fifo_status_empty(i),
|
||||
fifo_status_full => fifo_status_full(i),
|
||||
fifo_status_underrun => fifo_status_underrun(i),
|
||||
fifo_status_overrun => fifo_status_overrun(i),
|
||||
fifo_status_loop_count => fifo_loop_count(i),
|
||||
fifo_controls_clr_fifo => fifo_controls_clr_fifo(i),
|
||||
fifo_controls_clr_errors => fifo_controls_clr_errors(i),
|
||||
fifo_controls_pop_rd_port => fifo_controls_pop_rd_port(i),
|
||||
|
||||
fifo_rd_addr => fifo_rd_addr(i),
|
||||
|
||||
GEN_PRINT_STREAMER_LOOP : for i in 0 to NUM_HEADS-1 generate
|
||||
ip_id_ip_number => ip_id_ip_number(i),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i),
|
||||
ip_ver_major_number => ip_ver_major_number(i),
|
||||
|
||||
GEN_ZERO_GAP : if NO_ZERO_GAP = false or j = 0 generate
|
||||
avs_address => avs_csr_address(3 downto 0),
|
||||
avs_write => avs_csr_write_int(i),
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => avs_csr_read_int(i),
|
||||
avs_readdata => avs_csr_readdata_int(i)
|
||||
|
||||
-- ----------------------------------
|
||||
-- Streamer logger
|
||||
-- ----------------------------------
|
||||
GEN_LOGGER : if STREAMER_LOGGER generate
|
||||
);
|
||||
|
||||
streamer_log_inst : entity work.streamer_logger_7
|
||||
generic map (
|
||||
LOGGER_DEPTH => LOGGER_DEPTH
|
||||
)
|
||||
port map (
|
||||
fifo_queue_inst : entity work.streamer_fifo_0
|
||||
port map(
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
wr_req => diag_cmd_q_write(i+j*MAX_HEADS),
|
||||
wr_data => diag_cmd_q_write_data(i+j*MAX_HEADS),
|
||||
wr_ptr => diag_cmd_q_wr_count(i+j*MAX_HEADS),
|
||||
fifo_wr_port_pulse => fifo_wr_port_pulse(i),
|
||||
fifo_wr_port => fifo_wr_port(i),
|
||||
fifo_wr_port_in => fifo_wr_port_in(i),
|
||||
fifo_rd_port => fifo_rd_port(i),
|
||||
fifo_rd_port_pulse => fifo_rd_port_pulse(i),
|
||||
fifo_status_empty => fifo_status_empty(i),
|
||||
fifo_status_full => fifo_status_full(i),
|
||||
fifo_status_underrun => fifo_status_underrun(i),
|
||||
fifo_status_overrun => fifo_status_overrun(i),
|
||||
fifo_controls_clr_fifo => fifo_controls_clr_fifo(i),
|
||||
fifo_controls_clr_errors => fifo_controls_clr_errors(i),
|
||||
fifo_controls_pop_rd_port => fifo_controls_pop_rd_port(i),
|
||||
fifo_loop_count => fifo_loop_count(i),
|
||||
|
||||
rd_addr => diag_cmd_q_rd_addr(i+j*MAX_HEADS),
|
||||
rd_data_out => diag_cmd_q_read_data(i+j*MAX_HEADS),
|
||||
clr_logger => diag_cmd_q_clr_log(i+j*MAX_HEADS)
|
||||
avm_rx_address => avm_rx_address_int(i)(31 downto 28),
|
||||
avm_rx_read => avm_rx_read_int(i),
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i)
|
||||
|
||||
);
|
||||
);
|
||||
|
||||
end generate;
|
||||
GEN_DATA_STREAMER0 : if i = 0 generate
|
||||
|
||||
-- -----------------------------------
|
||||
-- Data streamer registers
|
||||
-- -----------------------------------
|
||||
|
||||
|
||||
data_streamer_csr_regs_inst : entity work.data_streamer_csr_regs
|
||||
generic map (
|
||||
ADDR_DECODE_WIDTH => 4
|
||||
)
|
||||
port map (
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
control_clear_cmd => control_clear_cmd(i+j*MAX_HEADS),
|
||||
control_clear_errors => control_clear_errors(i+j*MAX_HEADS),
|
||||
control_msb => control_msb(i+j*MAX_HEADS),
|
||||
control_watermark => control_watermark(i+j*MAX_HEADS),
|
||||
control_en_acp_window => control_en_acp_window(i+j*MAX_HEADS),
|
||||
control_disable => control_disable(i+j*MAX_HEADS),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i+j*MAX_HEADS),
|
||||
cmd_port_pulse => cmd_port_pulse(i+j*MAX_HEADS),
|
||||
cmd_port => cmd_port(i+j*MAX_HEADS),
|
||||
cmd_port_in => (others => '0'),
|
||||
|
||||
status_queue_space => status_queue_space(i+j*MAX_HEADS)(5 downto 1),
|
||||
status_auto_load_err => auto_load_err(i+j*MAX_HEADS),
|
||||
status_bad_cmd_err => bad_cmd_err(i+j*MAX_HEADS),
|
||||
status_cpu_race_err => cpu_race_err(i+j*MAX_HEADS),
|
||||
status_overrun_err => overrun_err(i+j*MAX_HEADS),
|
||||
status_auto_cmd_active => auto_cmd_active(i+j*MAX_HEADS),
|
||||
status_cmd_depth_log2 => std_logic_vector(to_unsigned(CMD_QUEUE_DEPTH_LOG2, 4)),
|
||||
status_handle => handle(i+j*MAX_HEADS),
|
||||
|
||||
diags_remain => debug_out_int(i+j*MAX_HEADS)(11 downto 0),
|
||||
diags_cmd_pending => debug_out_int(i+j*MAX_HEADS)(12),
|
||||
diags_data_active => debug_out_int(i+j*MAX_HEADS)(13),
|
||||
diags_cmd_avail => debug_out_int(i+j*MAX_HEADS)(14),
|
||||
diags_dst_sel => debug_out_int(i+j*MAX_HEADS)(18 downto 15),
|
||||
diags_dst_rdy => debug_out_int(i+j*MAX_HEADS)(19),
|
||||
|
||||
diags_logger_wr_ptr => diag_cmd_q_wr_count(i+j*MAX_HEADS),
|
||||
diag_logger_rdata => diag_cmd_q_read_data(i+j*MAX_HEADS),
|
||||
|
||||
curr_cmd => diag_1(i+j*MAX_HEADS),
|
||||
curr_param1 => diag_2(i+j*MAX_HEADS),
|
||||
|
||||
dst0_word_count => dst0_word_count(i+j*MAX_HEADS),
|
||||
|
||||
fifo_wr_port_pulse => fifo_wr_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_wr_port => fifo_wr_port(i+j*MAX_HEADS),
|
||||
fifo_wr_port_in => fifo_wr_port_in(i+j*MAX_HEADS),
|
||||
fifo_rd_port => fifo_rd_port(i+j*MAX_HEADS),
|
||||
fifo_rd_port_pulse => fifo_rd_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_status_empty => fifo_status_empty(i+j*MAX_HEADS),
|
||||
fifo_status_full => fifo_status_full(i+j*MAX_HEADS),
|
||||
fifo_status_underrun => fifo_status_underrun(i+j*MAX_HEADS),
|
||||
fifo_status_overrun => fifo_status_overrun(i+j*MAX_HEADS),
|
||||
fifo_status_loop_count => fifo_loop_count(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_fifo => fifo_controls_clr_fifo(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_errors => fifo_controls_clr_errors(i+j*MAX_HEADS),
|
||||
fifo_controls_pop_rd_port => fifo_controls_pop_rd_port(i+j*MAX_HEADS),
|
||||
fifo_rd_addr => fifo_rd_addr(i+j*MAX_HEADS),
|
||||
|
||||
ip_id_ip_number => ip_id_ip_number(i+j*MAX_HEADS),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i+j*MAX_HEADS),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i+j*MAX_HEADS),
|
||||
ip_ver_major_number => ip_ver_major_number(i+j*MAX_HEADS),
|
||||
|
||||
avs_address => avs_csr_address(3 downto 0),
|
||||
avs_write => avs_csr_write_int(i+j*MAX_HEADS),
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => avs_csr_read_int(i+j*MAX_HEADS),
|
||||
avs_readdata => avs_csr_readdata_int(i+j*MAX_HEADS)
|
||||
|
||||
);
|
||||
|
||||
-- -----------------------------------
|
||||
-- Streamer indirection FIFO
|
||||
-- -----------------------------------
|
||||
|
||||
fifo_queue_inst : entity work.streamer_fifo_0
|
||||
port map (
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
fifo_wr_port_pulse => fifo_wr_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_wr_port => fifo_wr_port(i+j*MAX_HEADS),
|
||||
fifo_wr_port_in => fifo_wr_port_in(i+j*MAX_HEADS),
|
||||
fifo_rd_port => fifo_rd_port(i+j*MAX_HEADS),
|
||||
fifo_rd_port_pulse => fifo_rd_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_status_empty => fifo_status_empty(i+j*MAX_HEADS),
|
||||
fifo_status_full => fifo_status_full(i+j*MAX_HEADS),
|
||||
fifo_status_underrun => fifo_status_underrun(i+j*MAX_HEADS),
|
||||
fifo_status_overrun => fifo_status_overrun(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_fifo => fifo_controls_clr_fifo(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_errors => fifo_controls_clr_errors(i+j*MAX_HEADS),
|
||||
fifo_controls_pop_rd_port => fifo_controls_pop_rd_port(i+j*MAX_HEADS),
|
||||
fifo_loop_count => fifo_loop_count(i+j*MAX_HEADS),
|
||||
|
||||
avm_rx_address => avm_rx_address_int(i+j*MAX_HEADS)(31 downto 28),
|
||||
avm_rx_read => avm_rx_read_int(i+j*MAX_HEADS),
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i+j*MAX_HEADS),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i+j*MAX_HEADS)
|
||||
|
||||
);
|
||||
|
||||
-- -----------------------------------
|
||||
-- Data streamer logic
|
||||
-- -----------------------------------
|
||||
|
||||
data_streamer_inst : entity work.data_streamer_7
|
||||
data_streamer_inst : entity work.data_streamer_7
|
||||
generic map(
|
||||
NUM_EXT_DSTS => 1,
|
||||
CMD_QUEUE_DEPTH => CMD_QUEUE_DEPTH,
|
||||
EXCLUDE_VIRTUAL_MAPPING_LOGIC => true
|
||||
NUM_EXT_DSTS => 2,
|
||||
CMD_QUEUE_DEPTH => CMD_QUEUE_DEPTH,
|
||||
EXCLUDE_VIRTUAL_MAPPING_LOGIC => SLIM
|
||||
)
|
||||
port map(
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
control_clear_cmd => control_clear_cmd(i+j*MAX_HEADS),
|
||||
control_clear_errors => control_clear_errors(i+j*MAX_HEADS),
|
||||
control_msb => control_msb(i+j*MAX_HEADS),
|
||||
control_watermark => control_watermark(i+j*MAX_HEADS),
|
||||
control_disable => control_disable(i+j*MAX_HEADS),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i+j*MAX_HEADS),
|
||||
control_clear_cmd => control_clear_cmd(i),
|
||||
control_clear_errors => control_clear_errors(i),
|
||||
control_msb => control_msb(i),
|
||||
control_watermark => control_watermark(i),
|
||||
control_disable => control_disable(i),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i),
|
||||
|
||||
cmd_port_wr => cmd_port_pulse(i+j*MAX_HEADS),
|
||||
cmd_port => cmd_port(i+j*MAX_HEADS),
|
||||
cmd_port_wr => cmd_port_pulse(i),
|
||||
cmd_port => cmd_port(i),
|
||||
|
||||
auto_load_err => auto_load_err(i+j*MAX_HEADS),
|
||||
bad_cmd_err => bad_cmd_err(i+j*MAX_HEADS),
|
||||
cpu_race_err => cpu_race_err(i+j*MAX_HEADS),
|
||||
overrun_err => overrun_err(i+j*MAX_HEADS),
|
||||
auto_cmd_active => auto_cmd_active(i+j*MAX_HEADS),
|
||||
status_queue_space => status_queue_space(i+j*MAX_HEADS),
|
||||
handle => handle(i+j*MAX_HEADS),
|
||||
auto_load_err => auto_load_err(i),
|
||||
bad_cmd_err => bad_cmd_err(i),
|
||||
cpu_race_err => cpu_race_err(i),
|
||||
overrun_err => overrun_err(i),
|
||||
auto_cmd_active => auto_cmd_active(i),
|
||||
status_queue_space => status_queue_space(i),
|
||||
handle => handle(i),
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i+j*MAX_HEADS),
|
||||
avm_rx_burstcount => avm_rx_burstcount_int(i+j*MAX_HEADS),
|
||||
avm_rx_address => avm_rx_address_int(i+j*MAX_HEADS),
|
||||
avm_rx_read => avm_rx_read_int(i+j*MAX_HEADS),
|
||||
avm_rx_readdata => avm_rx_readdata_int(i+j*MAX_HEADS),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i+j*MAX_HEADS),
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i),
|
||||
avm_rx_burstcount => avm_rx_burstcount_int(i),
|
||||
avm_rx_address => avm_rx_address_int(i),
|
||||
avm_rx_read => avm_rx_read_int(i),
|
||||
avm_rx_readdata => avm_rx_readdata_int(i),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i),
|
||||
|
||||
dest_port_wr => dest_port_wr(i+j*MAX_HEADS downto i+j*MAX_HEADS),
|
||||
dest_port_wr_data => dest_port_wr_data_int(i+j*MAX_HEADS),
|
||||
dest_port_rdy => dest_port_rdy(i+j*MAX_HEADS downto i+j*MAX_HEADS),
|
||||
dest_port_last_word => dest_port_last_word_int(i+j*MAX_HEADS),
|
||||
dest_port_wr => dest_port_wr_0,
|
||||
dest_port_wr_data => dest_port_wr_data_int(i),
|
||||
dest_port_rdy => dest_port_rdy_0,
|
||||
|
||||
ip_id_ip_number => ip_id_ip_number(i+j*MAX_HEADS),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i+j*MAX_HEADS),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i+j*MAX_HEADS),
|
||||
ip_ver_major_number => ip_ver_major_number(i+j*MAX_HEADS),
|
||||
transfer_active => transfer_active(i),
|
||||
|
||||
transfer_active => transfer_active(i+j*MAX_HEADS),
|
||||
irq => irq_int(i),
|
||||
|
||||
irq => irq_int(i+j*MAX_HEADS),
|
||||
ld_q_redirect_addr => fifo_rd_addr(i),
|
||||
|
||||
ip_id_ip_number => ip_id_ip_number(i),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i),
|
||||
ip_ver_major_number => ip_ver_major_number(i),
|
||||
|
||||
ld_q_redirect_addr => fifo_rd_addr(i+j*MAX_HEADS),
|
||||
debug_out => debug_out_int(i),
|
||||
diag_dst0_count => dst0_word_count(i),
|
||||
diag_1 => diag_1(i),
|
||||
diag_2 => diag_2(i)
|
||||
|
||||
debug_out => debug_out_int(i+j*MAX_HEADS),
|
||||
diag_dst0_count => dst0_word_count(i+j*MAX_HEADS),
|
||||
diag_1 => diag_1(i+j*MAX_HEADS),
|
||||
diag_2 => diag_2(i+j*MAX_HEADS),
|
||||
);
|
||||
end generate GEN_DATA_STREAMER0;
|
||||
|
||||
diag_cmd_q_write => diag_cmd_q_write(i+j*MAX_HEADS),
|
||||
diag_cmd_q_write_data => diag_cmd_q_write_data(i+j*MAX_HEADS)
|
||||
GEN_DATA_STREAMER : if i /= 0 generate
|
||||
|
||||
data_streamer_inst : entity work.data_streamer_7
|
||||
generic map(
|
||||
NUM_EXT_DSTS => 1,
|
||||
CMD_QUEUE_DEPTH => CMD_QUEUE_DEPTH,
|
||||
EXCLUDE_VIRTUAL_MAPPING_LOGIC => SLIM
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
control_clear_cmd => control_clear_cmd(i),
|
||||
control_clear_errors => control_clear_errors(i),
|
||||
control_msb => control_msb(i),
|
||||
control_watermark => control_watermark(i),
|
||||
control_disable => control_disable(i),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i),
|
||||
|
||||
cmd_port_wr => cmd_port_pulse(i),
|
||||
cmd_port => cmd_port(i),
|
||||
|
||||
auto_load_err => auto_load_err(i),
|
||||
bad_cmd_err => bad_cmd_err(i),
|
||||
cpu_race_err => cpu_race_err(i),
|
||||
overrun_err => overrun_err(i),
|
||||
auto_cmd_active => auto_cmd_active(i),
|
||||
status_queue_space => status_queue_space(i),
|
||||
handle => handle(i),
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i),
|
||||
avm_rx_burstcount => avm_rx_burstcount_int(i),
|
||||
avm_rx_address => avm_rx_address_int(i),
|
||||
avm_rx_read => avm_rx_read_int(i),
|
||||
avm_rx_readdata => avm_rx_readdata_int(i),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i),
|
||||
|
||||
dest_port_wr => dest_port_wr(i downto i),
|
||||
dest_port_wr_data => dest_port_wr_data_int(i),
|
||||
dest_port_rdy => dest_port_rdy(i downto i),
|
||||
|
||||
transfer_active => transfer_active(i),
|
||||
|
||||
irq => irq_int(i),
|
||||
|
||||
ld_q_redirect_addr => fifo_rd_addr(i),
|
||||
|
||||
ip_id_ip_number => ip_id_ip_number(i),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i),
|
||||
ip_ver_major_number => ip_ver_major_number(i),
|
||||
|
||||
debug_out => debug_out_int(i),
|
||||
diag_dst0_count => dst0_word_count(i),
|
||||
diag_1 => diag_1(i),
|
||||
diag_2 => diag_2(i)
|
||||
|
||||
);
|
||||
|
||||
end generate GEN_ZERO_GAP;
|
||||
end generate GEN_DATA_STREAMER;
|
||||
|
||||
GEN_NO_ZERO_GAP : if NO_ZERO_GAP and j = 1 generate
|
||||
|
||||
transfer_active(i+MAX_HEADS) <= '0';
|
||||
auto_cmd_active(i+MAX_HEADS) <= '0';
|
||||
avm_rx_read_int(i+MAX_HEADS) <= '0';
|
||||
|
||||
end generate GEN_NO_ZERO_GAP;
|
||||
|
||||
end generate GEN_PRINT_STREAMER_LOOP;
|
||||
|
||||
end generate GEN_AUX_LOOP;
|
||||
|
||||
-- -----------------------------------
|
||||
-- Memory arbitration
|
||||
-- -----------------------------------
|
||||
end generate GEN_PRINT_STREAMER_LOOP;
|
||||
|
||||
mem_arbiter_inst : entity work.mem_arbiter
|
||||
generic map(
|
||||
NUM_PORTS => MAX_HEADS*2
|
||||
)
|
||||
port map(
|
||||
generic map(
|
||||
NUM_HEADS => MAX_HEADS -- arbiter always for the maximim
|
||||
)
|
||||
port map(
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
transfer_active => transfer_active,
|
||||
avm_rx_waitrequest_in => avm_rx_waitrequest_int,
|
||||
avm_rx_burstcount_in => avm_rx_burstcount_int,
|
||||
avm_rx_address_in => avm_rx_address_int,
|
||||
avm_rx_read_in => avm_rx_read_int,
|
||||
avm_rx_readdata_in => avm_rx_readdata_int,
|
||||
avm_rx_readdatavalid_in => avm_rx_readdatavalid_int,
|
||||
transfer_active => transfer_active,
|
||||
avm_rx_waitrequest_in => avm_rx_waitrequest_int,
|
||||
avm_rx_burstcount_in => avm_rx_burstcount_int,
|
||||
avm_rx_address_in => avm_rx_address_int,
|
||||
avm_rx_read_in => avm_rx_read_int,
|
||||
avm_rx_readdata_in => avm_rx_readdata_int,
|
||||
avm_rx_readdatavalid_in => avm_rx_readdatavalid_int,
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_arb,
|
||||
avm_rx_burstcount => avm_rx_burstcount_arb,
|
||||
avm_rx_address => avm_rx_address_arb,
|
||||
avm_rx_read => avm_rx_read_arb,
|
||||
avm_rx_readdata => avm_rx_readdata_arb,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_arb
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_arb,
|
||||
avm_rx_burstcount => avm_rx_burstcount_arb,
|
||||
avm_rx_address => avm_rx_address_arb,
|
||||
avm_rx_read => avm_rx_read_arb,
|
||||
avm_rx_readdata => avm_rx_readdata_arb,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_arb
|
||||
|
||||
);
|
||||
);
|
||||
|
||||
-- -----------------------------------
|
||||
-- Avalon to AXI-4 adapter
|
||||
-- -----------------------------------
|
||||
avm_to_axi_master_inst : entity work.avm_to_axi_master -- @suppress "Generic map uses default values. Missing optional actuals: ARUSER, ARCACHE"
|
||||
port map(
|
||||
|
||||
avm_to_axi_master_inst : entity work.avm_to_axi_master
|
||||
port map (
|
||||
en_acp_window => control_en_acp_window(0),
|
||||
|
||||
en_acp_window => control_en_acp_window(0),
|
||||
axm_awaddr => axm_awaddr,
|
||||
axm_awprot => axm_awprot,
|
||||
axm_awvalid => axm_awvalid,
|
||||
axm_awready => axm_awready,
|
||||
|
||||
axm_awaddr => axm_awaddr,
|
||||
axm_awprot => axm_awprot,
|
||||
axm_awvalid => axm_awvalid,
|
||||
axm_awready => axm_awready,
|
||||
axm_wdata => axm_wdata,
|
||||
axm_wlast => axm_wlast,
|
||||
axm_wvalid => axm_wvalid,
|
||||
axm_wready => axm_wready,
|
||||
|
||||
axm_wdata => axm_wdata,
|
||||
axm_wlast => axm_wlast,
|
||||
axm_wvalid => axm_wvalid,
|
||||
axm_wready => axm_wready,
|
||||
axm_bvalid => axm_bvalid,
|
||||
axm_bready => axm_bready,
|
||||
|
||||
axm_bvalid => axm_bvalid,
|
||||
axm_bready => axm_bready,
|
||||
axm_araddr => axm_araddr,
|
||||
axm_arlen => axm_arlen,
|
||||
axm_arsize => axm_arsize,
|
||||
axm_arburst => axm_arburst,
|
||||
axm_arcache => axm_arcache,
|
||||
axm_aruser => axm_aruser,
|
||||
axm_arprot => axm_arprot,
|
||||
axm_arvalid => axm_arvalid,
|
||||
axm_arready => axm_arready,
|
||||
|
||||
axm_araddr => axm_araddr,
|
||||
axm_arlen => axm_arlen,
|
||||
axm_arsize => axm_arsize,
|
||||
axm_arburst => axm_arburst,
|
||||
axm_arcache => axm_arcache,
|
||||
axm_aruser => axm_aruser,
|
||||
axm_arprot => axm_arprot,
|
||||
axm_arvalid => axm_arvalid,
|
||||
axm_arready => axm_arready,
|
||||
axm_rdata => axm_rdata,
|
||||
axm_rvalid => axm_rvalid,
|
||||
axm_rready => axm_rready,
|
||||
|
||||
axm_rdata => axm_rdata,
|
||||
axm_rvalid => axm_rvalid,
|
||||
axm_rready => axm_rready,
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_arb,
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_arb,
|
||||
avm_rx_burstcount => avm_rx_burstcount_arb,
|
||||
avm_rx_address => avm_rx_address_arb,
|
||||
avm_rx_read => avm_rx_read_arb,
|
||||
avm_rx_readdata => avm_rx_readdata_arb,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_arb
|
||||
avm_rx_burstcount1 => avm_rx_burstcount,
|
||||
avm_rx_address1 => avm_rx_address,
|
||||
avm_rx_read1 => avm_rx_read,
|
||||
|
||||
);
|
||||
avm_rx_burstcount0 => avm_rx_burstcount_arb,
|
||||
avm_rx_address0 => avm_rx_address_arb,
|
||||
avm_rx_read0 => avm_rx_read_arb,
|
||||
|
||||
avm_rx_readdata => avm_rx_readdata_arb,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_arb
|
||||
|
||||
);
|
||||
|
||||
avm_rx_waitrequest <= avm_rx_waitrequest_arb;
|
||||
avm_rx_readdata <= avm_rx_readdata_arb;
|
||||
avm_rx_readdatavalid <= avm_rx_readdatavalid_arb;
|
||||
|
||||
|
||||
end architecture;
|
||||
end architecture;
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
"bus" : "csr",
|
||||
"addr_hi_bit" : "5",
|
||||
"addr_lo_bit" : "4",
|
||||
"addr_width" : "4",
|
||||
"description" : "This block is the print unit for the GMA SOM board soft IP",
|
||||
"sub_blocks" : {
|
||||
"generic_sequencer_15:a" : {
|
||||
|
|
@ -17,115 +16,9 @@
|
|||
"offset" : "0x10"
|
||||
},
|
||||
"generic_delay_queue_1" : {
|
||||
"instance" : "0",
|
||||
"instance" : "",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x20"
|
||||
},
|
||||
"local" : {
|
||||
"instance" : "",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x30"
|
||||
}
|
||||
},
|
||||
"registers" : {
|
||||
"ip_id" : {
|
||||
"address" : "0",
|
||||
"width" : "32",
|
||||
"description" : "Unique ID for this IP block",
|
||||
"fields" : {
|
||||
"ip_number" : {
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x10",
|
||||
"description" : "IP identifier number"
|
||||
},
|
||||
"mfr_number" : {
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x06",
|
||||
"description" : "Manufacturer number"
|
||||
|
||||
},
|
||||
"reserved" : {
|
||||
"type" : "rsv",
|
||||
"bit_len" : "16",
|
||||
"description" : "Reserved bits"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ip_ver" : {
|
||||
"address" : "1",
|
||||
"width" : "32",
|
||||
"description" : "Bits[7:0] = Minor version number, Bits[15:8] = Major version number, etc.",
|
||||
"fields" : {
|
||||
"minor_number" : {
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x02",
|
||||
"description" : "Minor number"
|
||||
},
|
||||
"major_number" : {
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x00",
|
||||
"description" : "Major number"
|
||||
|
||||
},
|
||||
"reserved" : {
|
||||
"type" : "rsv",
|
||||
"bit_len" : "16",
|
||||
"description" : "Reserved bits"
|
||||
}
|
||||
}
|
||||
},
|
||||
"fire_req_count0" : {
|
||||
"address" : "5",
|
||||
"type" : "r",
|
||||
"width" : "32",
|
||||
"reset" : "0x00",
|
||||
"description" : "Fire request count for channel 0."
|
||||
},
|
||||
"fire_req_count1" : {
|
||||
"address" : "6",
|
||||
"type" : "r",
|
||||
"width" : "32",
|
||||
"reset" : "0x00",
|
||||
"description" : "Fire request count for channel 1."
|
||||
},
|
||||
"fire_start_img_count0" : {
|
||||
"address" : "7",
|
||||
"type" : "r",
|
||||
"width" : "32",
|
||||
"reset" : "0x00",
|
||||
"description" : "Start image count for channel 0."
|
||||
},
|
||||
"fire_start_img_count1" : {
|
||||
"address" : "8",
|
||||
"type" : "r",
|
||||
"width" : "32",
|
||||
"reset" : "0x00",
|
||||
"description" : "Start image count for channel 1."
|
||||
},
|
||||
"last_stripe_count0" : {
|
||||
"address" : "9",
|
||||
"type" : "r",
|
||||
"width" : "32",
|
||||
"reset" : "0x00",
|
||||
"description" : "Last stripe count for channel 0."
|
||||
},
|
||||
"last_stripe_count1" : {
|
||||
"address" : "10",
|
||||
"type" : "r",
|
||||
"width" : "32",
|
||||
"reset" : "0x00",
|
||||
"description" : "Last stripe count for channel 1."
|
||||
},
|
||||
"chan_active" : {
|
||||
"address" : "11",
|
||||
"type" : "r",
|
||||
"width" : "2",
|
||||
"reset" : "0x00",
|
||||
"description" : "Channel active state for pixel buffer inline-merge logic"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,21 +19,17 @@
|
|||
--! @li pixel_* : Pixel buffer write interface inputs
|
||||
--! @li fire_* : Timing fire request input
|
||||
--! @li stm8_trigger_rx : STM8 measurement trigger output
|
||||
--! @li en_dual_data_path : Enable inline merge dual path (if configured for dual path)
|
||||
--! @li seq_dac_data_* : DAC data output, muxed with adjacent head in parent to form DAC data output
|
||||
--! @li wav_*_ext : External wave trigger input
|
||||
--! @li chan_en : print channel enable input
|
||||
--! @li bpp_mode : bits per pixel mode input
|
||||
--! @li print_data_width : Select the print data with (number of active DIN shift inputs of head).
|
||||
--! @li clear_buffer : Pixel buffer clear pulse signal input
|
||||
--! @li empty : Data core empty status output
|
||||
--! @li full : Data core full (with look-ahead) status output
|
||||
--! @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 overlap_error : In line merge overlap error flag
|
||||
--! @li fire_* : Timing fire request input
|
||||
--! @li clear_buffer : Pixel buffer clear pulse signal input
|
||||
--! @li cpu_gl_map_en : Enable input for CPU control of GL mapping
|
||||
--! @li cpu_gl_map : CPU value for GL mapping
|
||||
|
|
@ -44,9 +40,6 @@
|
|||
--! @li print_latch : LATCH control output to head
|
||||
--! @li print_clk : CLK output to head
|
||||
--! @li print_data : DATA output to head
|
||||
--! @li diag_peek_* : Pixel buffer access interface
|
||||
--! @li diag_word_* : Pixel buffer diagnostic word count
|
||||
--! @li debug_out : Debug signal output port
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li Module is a single clock domain synchronous block
|
||||
|
|
@ -54,18 +47,18 @@
|
|||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Dave Steele
|
||||
--! @copyright (c) 2024 Global Inkjet Systems
|
||||
--! @date 2024-1-10
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2018 Global Inkjet Systems
|
||||
--! @date 2018-1-10
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.common_pkg.all;
|
||||
use work.pixel_buffer_2_pkg.all;
|
||||
|
||||
entity print_unit is
|
||||
generic(
|
||||
|
|
@ -75,101 +68,74 @@ entity print_unit is
|
|||
MAX_OP_WIDTH : natural range 1 to 48 := 48;
|
||||
MAX_BPP : integer := 3;
|
||||
SHIFT_DEPTH : integer range 1 to 1024 := 128;
|
||||
NO_ZERO_GAP : boolean := false;
|
||||
EN_PEEK : boolean := false;
|
||||
NUM_CHANS : integer range 1 to 4 := 2; -- number of PD inline-merge channels
|
||||
PCLK_CLK_RATIO : integer range 1 to 32 := 8
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
avs_csr_address : in std_logic_vector( 5 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
avs_csr_readdata : out std_logic_vector(31 downto 0);
|
||||
avs_csr_address : in std_logic_vector(5 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
avs_csr_readdata : out std_logic_vector(31 downto 0);
|
||||
|
||||
avs_seq_address : in std_logic_vector( 9 downto 0);
|
||||
avs_seq_write : in std_logic;
|
||||
avs_seq_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_seq_read : in std_logic;
|
||||
avs_seq_readdata : out std_logic_vector(31 downto 0);
|
||||
avs_seq_address : in std_logic_vector(9 downto 0);
|
||||
avs_seq_write : in std_logic;
|
||||
avs_seq_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_seq_read : in std_logic;
|
||||
avs_seq_readdata : out std_logic_vector(31 downto 0);
|
||||
|
||||
pixel_buf_wr : in std_logic;
|
||||
pixel_buf_wr_data : in std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy : out std_logic;
|
||||
pixel_buf_last_word : in std_logic;
|
||||
pixel_buf_wr : in std_logic;
|
||||
pixel_buf_wr_data : in std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy : out std_logic;
|
||||
|
||||
pixel_buf_wr_aux : in std_logic;
|
||||
pixel_buf_wr_data_aux : in std_logic_vector(31 downto 0);
|
||||
pixel_buf_rdy_aux : out std_logic;
|
||||
pixel_buf_last_word_aux : in std_logic;
|
||||
all_on_emul : in std_logic;
|
||||
chan_en : in std_logic;
|
||||
bpp_mode : in std_logic_vector(1 downto 0);
|
||||
print_data_width : in std_logic_vector(5 downto 0);
|
||||
clear_buffer : in std_logic;
|
||||
empty : out std_logic;
|
||||
full : out std_logic;
|
||||
overrun : out std_logic;
|
||||
underrun : out std_logic;
|
||||
fp_drop : out std_logic;
|
||||
dbl_drop : out std_logic;
|
||||
|
||||
en_dual_data_path : in std_logic;
|
||||
all_on_emul : in std_logic;
|
||||
chan_en : in std_logic;
|
||||
bpp_mode : in std_logic_vector(1 downto 0);
|
||||
print_data_width : in std_logic_vector(5 downto 0);
|
||||
clear_buffer : in std_logic;
|
||||
empty : out std_logic;
|
||||
full : out std_logic;
|
||||
overrun : out std_logic;
|
||||
underrun : out std_logic;
|
||||
fp_drop : out std_logic;
|
||||
dbl_drop : out std_logic;
|
||||
overlap_error : out std_logic;
|
||||
fire_req : in std_logic;
|
||||
fire_data : in std_logic_vector(7 downto 0);
|
||||
|
||||
px_buf_ch_nactive : out std_logic_vector(NUM_CHANS-1 downto 0);
|
||||
cpu_gl_map : in std_logic_vector(7 downto 0);
|
||||
cpu_gl_map_en : in std_logic;
|
||||
|
||||
fire_req : in std_logic;
|
||||
fire_req_start_merge : in std_logic;
|
||||
fire_data : in std_logic_vector( 7 downto 0);
|
||||
cpu_data_start : in std_logic;
|
||||
cpu_data_start_first : in std_logic;
|
||||
cpu_data_start_last : in std_logic;
|
||||
cpu_start_dly_head : in std_logic_vector(7 downto 0);
|
||||
cpu_adc_meas : in std_logic;
|
||||
|
||||
cpu_gl_map : in std_logic_vector(7 downto 0);
|
||||
cpu_gl_map_en : in std_logic;
|
||||
cpu_fire_req_start_merge : in std_logic;
|
||||
cpu_fire_req_pulse : in std_logic;
|
||||
stm8_trigger_rx : out std_logic;
|
||||
sig_seq_force_dacs_0v : in std_logic;
|
||||
dac_0v_value : in std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
|
||||
cpu_start_seq_go : in std_logic;
|
||||
cpu_start_seq_address : in std_logic_vector( 7 downto 0);
|
||||
wave_req_ext : in std_logic;
|
||||
wave_addr_ext : in std_logic_vector(7 downto 0);
|
||||
wave_delay_ext : in std_logic_vector(11 downto 0);
|
||||
|
||||
cpu_data_start : in std_logic;
|
||||
cpu_data_start_first : in std_logic;
|
||||
cpu_data_start_last : in std_logic;
|
||||
cpu_start_dly_head : in std_logic_vector(7 downto 0);
|
||||
cpu_adc_meas : in std_logic;
|
||||
seq_dac_data : out std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
wave_seq_busy : out std_logic;
|
||||
print_seq_busy : out std_logic;
|
||||
|
||||
stm8_trigger_rx : out std_logic;
|
||||
sig_seq_force_dacs_0v : in std_logic;
|
||||
dac_0v_value : in std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
print_clk : out std_logic_vector(0 downto 0);
|
||||
print_data : out std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
|
||||
wave_req_ext : in std_logic;
|
||||
wave_addr_ext : in std_logic_vector(7 downto 0);
|
||||
wave_delay_ext : in std_logic_vector(11 downto 0);
|
||||
print_all_on : out std_logic;
|
||||
print_latch : out std_logic;
|
||||
|
||||
seq_dac_data : out std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
wave_seq_busy : out std_logic;
|
||||
print_seq_busy : out std_logic;
|
||||
diag_word_count : out std_logic_vector(6 downto 0);
|
||||
|
||||
print_clk : out std_logic_vector(0 downto 0);
|
||||
print_data : out std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
|
||||
print_all_on : out std_logic;
|
||||
print_latch : out std_logic;
|
||||
|
||||
diag_peek_sel : in std_logic;
|
||||
diag_peek_addr : in std_logic_vector(31 downto 0);
|
||||
diag_peek_data : out std_logic_vector(31 downto 0);
|
||||
diag_peek_rdptr : out std_logic_vector( 7 downto 0);
|
||||
diag_peek_wrptr : out std_logic_vector( 7 downto 0);
|
||||
diag_peek_wdata : in std_logic_vector(31 downto 0);
|
||||
diag_peek_wr : in std_logic;
|
||||
|
||||
diag_word_count : out std_logic_vector(6 downto 0);
|
||||
|
||||
debug_out : out std_logic_vector(3 downto 0)
|
||||
debug_out : out std_logic_vector(3 downto 0)
|
||||
);
|
||||
end entity print_unit;
|
||||
|
||||
|
|
@ -193,29 +159,29 @@ architecture rtl of print_unit is
|
|||
-- setting the GL mapping and the start bit with delay (sent via delay queue
|
||||
-- in data core).
|
||||
subtype GL_REMAP_BITS is natural range 7 downto 0;
|
||||
constant GL_REMAP_UPDATE_BIT : integer := 8;
|
||||
constant GL_REMAP_UPDATE_BIT : integer := 8;
|
||||
|
||||
subtype START_DLY_BITS is natural range START_DLY_WIDTH + 9 - 1 downto 9;
|
||||
constant START_DLY_REQ_BIT : integer := START_DLY_WIDTH + 9;
|
||||
constant START_DLY_FIRST_BIT : integer := START_DLY_WIDTH + 10;
|
||||
constant START_DLY_LAST_BIT : integer := START_DLY_WIDTH + 11;
|
||||
constant START_DLY_REQ_BIT : integer := START_DLY_WIDTH + 9;
|
||||
constant START_DLY_FIRST_BIT : integer := START_DLY_WIDTH + 10;
|
||||
constant START_DLY_LAST_BIT : integer := START_DLY_WIDTH + 11;
|
||||
subtype RSVD_BITS is natural range START_DLY_WIDTH + 14 downto START_DLY_WIDTH + 12; -- @suppress "Unused declaration" : helps clarity
|
||||
constant SEQ_HOLD_OFF_SEL_BIT : integer := START_DLY_WIDTH + 15;
|
||||
constant SEQ_BUS_WIDTH : integer := START_DLY_WIDTH + 16;
|
||||
constant SEQ_BURST_WORD2_BIT : integer := START_DLY_WIDTH + 15;
|
||||
constant SEQ_BUS_WIDTH : integer := START_DLY_WIDTH + 16;
|
||||
|
||||
signal avs_csr_write_seq_wave : std_logic;
|
||||
signal avs_csr_read_seq_wave : std_logic;
|
||||
signal avs_csr_rdata_seq_wave : std_logic_vector(31 downto 0);
|
||||
signal avs_csr_write_seq_wave : std_logic;
|
||||
signal avs_csr_read_seq_wave : std_logic;
|
||||
signal avs_csr_rdata_seq_wave : std_logic_vector(31 downto 0);
|
||||
|
||||
signal avs_seq_write_seq_wave : std_logic;
|
||||
signal avs_seq_read_seq_wave : std_logic;
|
||||
signal avs_seq_read_seq_wave_dly : std_logic;
|
||||
signal avs_seq_rdata_seq_wave : std_logic_vector(31 downto 0);
|
||||
signal avs_seq_rdata_seq_wave_int : std_logic_vector(31 downto 0);
|
||||
signal avs_seq_write_seq_wave : std_logic;
|
||||
signal avs_seq_read_seq_wave : std_logic;
|
||||
signal avs_seq_read_seq_wave_dly : std_logic;
|
||||
signal avs_seq_rdata_seq_wave : std_logic_vector(31 downto 0);
|
||||
signal avs_seq_rdata_seq_wave_int : std_logic_vector(31 downto 0);
|
||||
|
||||
signal avs_csr_write_seq_print : std_logic;
|
||||
signal avs_csr_read_seq_print : std_logic;
|
||||
signal avs_csr_rdata_seq_print : std_logic_vector(31 downto 0);
|
||||
signal avs_csr_write_seq_print : std_logic;
|
||||
signal avs_csr_read_seq_print : std_logic;
|
||||
signal avs_csr_rdata_seq_print : std_logic_vector(31 downto 0);
|
||||
|
||||
signal avs_seq_write_seq_print : std_logic;
|
||||
signal avs_seq_read_seq_print : std_logic;
|
||||
|
|
@ -223,141 +189,79 @@ architecture rtl of print_unit is
|
|||
signal avs_seq_rdata_seq_print : std_logic_vector(31 downto 0);
|
||||
signal avs_seq_rdata_seq_print_int : std_logic_vector(31 downto 0);
|
||||
|
||||
signal wave_req_dly : std_logic;
|
||||
signal wave_addr_dly : std_logic_vector(7 downto 0);
|
||||
signal avs_csr_write_dly : std_logic;
|
||||
signal avs_csr_read_dly : std_logic;
|
||||
signal avs_csr_rdata_dly : std_logic_vector(31 downto 0);
|
||||
|
||||
signal vector_out : std_logic_vector(VECTOR_WIDTH - 1 downto 0);
|
||||
signal stm8_trigger_rx_int : std_logic;
|
||||
signal wave_req_dly : std_logic;
|
||||
signal wave_addr_dly : std_logic_vector(7 downto 0);
|
||||
|
||||
signal trig_count : std_logic_vector(7 downto 0);
|
||||
signal stm8_trigger_rx_int_d : std_logic;
|
||||
signal wave_vector_out : std_logic_vector(VECTOR_WIDTH - 1 downto 0);
|
||||
signal stm8_trigger_rx_int : std_logic;
|
||||
|
||||
signal wav_trigger_in : std_logic_vector(TRIGGER_WIDTH - 1 downto 0);
|
||||
signal trig_count : std_logic_vector(7 downto 0);
|
||||
signal stm8_trigger_rx_int_d : std_logic;
|
||||
|
||||
signal vector_print : std_logic_vector(18 downto 0);
|
||||
signal wav_trigger_in : std_logic_vector(TRIGGER_WIDTH - 1 downto 0);
|
||||
|
||||
signal wave_req : std_logic;
|
||||
signal wave_addr : std_logic_vector(7 downto 0);
|
||||
signal wave_delay : std_logic_vector(11 downto 0);
|
||||
signal vector_print : std_logic_vector(18 downto 0);
|
||||
|
||||
signal wave_req_int : std_logic;
|
||||
signal wave_addr_int : std_logic_vector(5 downto 0);
|
||||
signal wave_delay_int : std_logic_vector(11 downto 0);
|
||||
signal wave_req : std_logic;
|
||||
signal wave_addr : std_logic_vector(7 downto 0);
|
||||
signal wave_delay : 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;
|
||||
signal seq_data_ack : std_logic;
|
||||
signal wave_req_int : std_logic;
|
||||
signal wave_addr_int : std_logic_vector(5 downto 0);
|
||||
signal wave_delay_int : std_logic_vector(11 downto 0);
|
||||
|
||||
signal seq_dac_data_int : std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
signal seq_data_config : std_logic_vector(SEQ_BUS_WIDTH - 1 downto 0);
|
||||
signal seq_data_valid : std_logic;
|
||||
signal seq_data_ack : std_logic;
|
||||
|
||||
signal seq_start_req_int : std_logic;
|
||||
signal seq_start_first_pulse_int : std_logic;
|
||||
signal seq_start_last_pulse_int : std_logic;
|
||||
signal seq_dac_data_int : std_logic_vector(DAC_DATA_WIDTH - 1 downto 0);
|
||||
|
||||
signal fire_req_held_off : std_logic;
|
||||
signal sequencers_busy : std_logic;
|
||||
signal seq_start_delay_int : std_logic_vector(START_DLY_WIDTH - 1 downto 0);
|
||||
signal seq_start_req_int : std_logic;
|
||||
signal seq_start_req_first_int : std_logic;
|
||||
signal seq_start_req_last_int : std_logic;
|
||||
|
||||
signal print_seq_start : std_logic;
|
||||
signal print_seq_start_addr : std_logic_vector( 8 downto 0);
|
||||
signal seq_gl_map_update : std_logic;
|
||||
signal seq_fp_holdoff_update : std_logic;
|
||||
signal print_seq_trig : std_logic_vector(1 downto 0);
|
||||
signal fire_req_int : std_logic;
|
||||
signal sequencers_busy : std_logic;
|
||||
|
||||
signal seq_gl_map_update : std_logic;
|
||||
signal seq_fp_holdoff_update : std_logic;
|
||||
signal print_seq_trig : std_logic_vector(1 downto 0);
|
||||
signal pulse_count : std_logic_vector(11 downto 0);
|
||||
signal pulse4096 : std_logic;
|
||||
signal pulse_reset : std_logic;
|
||||
signal pulse_reset_last : std_logic;
|
||||
|
||||
signal fire_req_int : std_logic;
|
||||
signal fire_req_int_d : std_logic;
|
||||
signal drop_stripe : std_logic;
|
||||
signal fire_req_start_merge_int : std_logic;
|
||||
|
||||
signal delay_queue_write : std_logic;
|
||||
signal delay_queue_read : std_logic;
|
||||
signal delay_queue_readdata : std_logic_vector(31 downto 0);
|
||||
|
||||
signal local_write : std_logic;
|
||||
signal local_read : std_logic;
|
||||
signal local_readdata : std_logic_vector(31 downto 0);
|
||||
signal chan_active : std_logic_vector(NUM_CHANS-1 downto 0);
|
||||
signal pulse_count : std_logic_vector(11 downto 0);
|
||||
signal pulse4096 : std_logic;
|
||||
signal pulse_reset : std_logic;
|
||||
signal pulse_reset_last : std_logic;
|
||||
|
||||
signal print_data_i : std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
signal print_all_on_i : std_logic;
|
||||
signal print_clk_i : std_logic_vector(0 downto 0);
|
||||
signal allon_reg : std_logic_vector(3 downto 0);
|
||||
signal allon_cnt : std_logic_vector(log2(SHIFT_DEPTH) + log2(PCLK_CLK_RATIO) downto 0);
|
||||
signal allon_pclk : std_logic;
|
||||
signal allon_mux : std_logic;
|
||||
|
||||
signal diag_fire_req_count : data_array_t(1 downto 0)(31 downto 0);
|
||||
signal diag_fire_simg_count : data_array_t(1 downto 0)(31 downto 0);
|
||||
signal diag_last_stripe_count : data_array_t(1 downto 0)(31 downto 0);
|
||||
signal print_data_i : std_logic_vector(MAX_OP_WIDTH - 1 downto 0);
|
||||
signal print_all_on_i : std_logic;
|
||||
signal print_clk_i : std_logic_vector(0 downto 0);
|
||||
signal allon_reg : std_logic_vector(3 downto 0);
|
||||
signal allon_cnt : std_logic_vector(log2(SHIFT_DEPTH) + log2(PCLK_CLK_RATIO) downto 0);
|
||||
signal allon_pclk : std_logic;
|
||||
signal allon_mux : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- Combinatorial logic
|
||||
-- -----------------------------------------------
|
||||
chan_active <= not px_buf_ch_nactive;
|
||||
|
||||
-- Place holder for debug signals
|
||||
debug_out <= "00" & wave_req & wave_req_dly;
|
||||
|
||||
-- Merge fire request from FPM and from CPU registers
|
||||
fire_req_int <= '1' when fire_req /= '0' or cpu_fire_req_pulse = '1' else '0';
|
||||
drop_stripe <= (fire_req or cpu_fire_req_pulse) and sequencers_busy; -- Ensure pixel buffer and print sequencer are tied together to both drop or neither drop
|
||||
fire_req_start_merge_int <= cpu_fire_req_start_merge when cpu_fire_req_pulse else fire_req_start_merge;
|
||||
|
||||
-- Merge sequencer start address from CPU registers and internal logic.
|
||||
print_seq_start <= (fire_req_int or cpu_start_seq_go) and not sequencers_busy and not print_seq_busy;
|
||||
print_seq_start_addr <= "0" & cpu_start_seq_address when cpu_start_seq_go else
|
||||
"0" & fire_data;
|
||||
-- Pulse creation from wave requests
|
||||
-- Generate the update pulses for sequence state off of the print data sequencer's burst bus
|
||||
seq_fp_holdoff_update <= seq_data_valid and seq_data_config(SEQ_HOLD_OFF_SEL_BIT);
|
||||
seq_gl_map_update <= seq_data_valid and seq_data_config(GL_REMAP_UPDATE_BIT) and not seq_data_config(SEQ_HOLD_OFF_SEL_BIT);
|
||||
|
||||
-- Allow firing of data core from CPU if requested, else comes from the wave sequencer.
|
||||
seq_start_req_int <= seq_data_config(START_DLY_REQ_BIT) when seq_data_valid = '1' and seq_data_config(SEQ_HOLD_OFF_SEL_BIT) = '0' else cpu_data_start;
|
||||
seq_start_first_pulse_int <= (cpu_data_start and cpu_data_start_first) or (seq_data_config(START_DLY_FIRST_BIT) and seq_data_valid and not seq_data_config(SEQ_HOLD_OFF_SEL_BIT));
|
||||
seq_start_last_pulse_int <= (cpu_data_start and cpu_data_start_last) or (seq_data_config(START_DLY_LAST_BIT) and seq_data_valid and not seq_data_config(SEQ_HOLD_OFF_SEL_BIT));
|
||||
|
||||
-- Make this constant, triggering on bit 0 all the time
|
||||
wav_trigger_in <= std_logic_vector(to_unsigned(0, TRIGGER_WIDTH - 2)) & pulse4096 & '1';
|
||||
|
||||
-- Export the wave sequencer vector bits to the appropriate outputs
|
||||
stm8_trigger_rx_int <= vector_out(STM8_TRIG_BIT) or cpu_adc_meas;
|
||||
print_all_on_i <= vector_out(PRINT_ALL_ON_BIT);
|
||||
print_all_on <= vector_out(PRINT_ALL_ON_BIT);
|
||||
stm8_trigger_rx_int <= wave_vector_out(STM8_TRIG_BIT) or cpu_adc_meas;
|
||||
print_all_on_i <= wave_vector_out(PRINT_ALL_ON_BIT);
|
||||
print_all_on <= wave_vector_out(PRINT_ALL_ON_BIT);
|
||||
print_data <= print_data_i when all_on_emul = '0' or print_all_on = '0' else (others => '1');
|
||||
print_clk <= print_clk_i when all_on_emul = '0' or allon_mux = '0' else (others => allon_pclk);
|
||||
print_latch <= vector_out(PRINT_LATCH_BIT);
|
||||
pulse_reset <= vector_out(RESET_TICK_BIT);
|
||||
print_latch <= wave_vector_out(PRINT_LATCH_BIT);
|
||||
pulse_reset <= wave_vector_out(RESET_TICK_BIT);
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- Hold fire requests
|
||||
-- -----------------------------------------------
|
||||
|
||||
HOLD_FIRE_REQ: process (rst_n, clk)
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
fire_req_held_off <= '0';
|
||||
fire_req_int_d <= '0';
|
||||
elsif clk'event and clk = '1' then
|
||||
|
||||
fire_req_int_d <= fire_req_int;
|
||||
|
||||
if fire_req_int_d = '0' and fire_req_int = '1' then
|
||||
fire_req_held_off <= '1';
|
||||
elsif print_seq_start = '1' then
|
||||
fire_req_held_off <= '0';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- Inject head clock cycles on rising edge of all_on, but only if all_on_emul(ation) is high
|
||||
-- Assumption is that HMB will be operated with all_on_emul true, and waveform sequences setting
|
||||
-- Inject head clock cycles on rising edge of all_on, but only if all_on_emul(ation) is high
|
||||
-- Assumption is that HMB will be operated with all_on_emul true, and waveform sequences setting
|
||||
-- print_all_on high at the end of each waveform to trigger loading of ones ready for any spitting that might be needed.
|
||||
INJECT_ALLON : process(rst_n, clk)
|
||||
begin
|
||||
|
|
@ -416,7 +320,7 @@ begin
|
|||
if sig_seq_force_dacs_0v = '1' then
|
||||
seq_dac_data_int <= dac_0v_value;
|
||||
else
|
||||
seq_dac_data_int <= vector_out(DAC_DATA_WIDTH - 1 downto 0);
|
||||
seq_dac_data_int <= wave_vector_out(DAC_DATA_WIDTH - 1 downto 0);
|
||||
end if;
|
||||
seq_dac_data <= seq_dac_data_int;
|
||||
end if;
|
||||
|
|
@ -442,22 +346,16 @@ begin
|
|||
|
||||
pulse4096 <= '0';
|
||||
|
||||
if unsigned(pulse_count) = 4095 then
|
||||
if unsigned(pulse_count) = 0 then
|
||||
pulse4096 <= '1';
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- CSR bus address decode
|
||||
-- -----------------------------------------------
|
||||
|
||||
print_unit_csr_decode_inst : entity work.print_unit_csr_decode
|
||||
generic map (
|
||||
ADDR_DECODE_HI_BIT => 5,
|
||||
ADDR_DECODE_LO_BIT => 4
|
||||
)
|
||||
port map (
|
||||
-- Auto-generated Avalon CSR bus decoder block
|
||||
print_unit_csr_decode_1 : entity work.print_unit_csr_decode
|
||||
port map(
|
||||
|
||||
-- Decoded read/write strobes and returned read data
|
||||
generic_sequencer_15_wav_write => avs_csr_write_seq_wave,
|
||||
|
|
@ -468,14 +366,11 @@ begin
|
|||
generic_sequencer_15_print_read => avs_csr_read_seq_print,
|
||||
generic_sequencer_15_print_readdata => avs_csr_rdata_seq_print,
|
||||
|
||||
generic_delay_queue_1_0_write => delay_queue_write,
|
||||
generic_delay_queue_1_0_read => delay_queue_read,
|
||||
generic_delay_queue_1_0_readdata => delay_queue_readdata,
|
||||
generic_delay_queue_1_write => avs_csr_write_dly,
|
||||
generic_delay_queue_1_read => avs_csr_read_dly,
|
||||
generic_delay_queue_1_readdata => avs_csr_rdata_dly,
|
||||
|
||||
-- Avalon CSR slave interface
|
||||
local_write => local_write,
|
||||
local_read => local_read,
|
||||
local_readdata => local_readdata,
|
||||
avs_address => avs_csr_address(5 downto 4),
|
||||
avs_write => avs_csr_write,
|
||||
avs_read => avs_csr_read,
|
||||
|
|
@ -483,35 +378,6 @@ begin
|
|||
|
||||
);
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- Local registers
|
||||
-- -----------------------------------------------
|
||||
|
||||
print_unit_csr_regs_inst : entity work.print_unit_csr_regs
|
||||
generic map (
|
||||
ADDR_DECODE_WIDTH => 4
|
||||
)
|
||||
port map (
|
||||
-- Clock and reset
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
fire_req_count0 => diag_fire_req_count(0),
|
||||
fire_req_count1 => diag_fire_req_count(1),
|
||||
fire_start_img_count0 => diag_fire_simg_count(0),
|
||||
last_stripe_count0 => diag_last_stripe_count(0),
|
||||
fire_start_img_count1 => diag_fire_simg_count(1),
|
||||
last_stripe_count1 => diag_last_stripe_count(1),
|
||||
chan_active => chan_active,
|
||||
|
||||
avs_address => avs_csr_address(3 downto 0),
|
||||
avs_write => local_write,
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => local_read,
|
||||
avs_readdata => local_readdata
|
||||
|
||||
);
|
||||
|
||||
-- Auto-generated Avalon SEQ bus decoder block
|
||||
print_unit_seq_decode_1 : entity work.print_unit_seq_decode
|
||||
port map(
|
||||
|
|
@ -530,16 +396,14 @@ begin
|
|||
avs_readdata => avs_seq_readdata
|
||||
);
|
||||
|
||||
print_seq_trig <= vector_out(PRINT_LATCH_BIT) & '1';
|
||||
print_seq_trig <= wave_vector_out(PRINT_LATCH_BIT) & '1';
|
||||
|
||||
-- Mask the fire request to the print data sequencer when a current sequence can't accept a new one
|
||||
fire_req_int <= fire_req and not sequencers_busy;
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- instantiate a print sequencer
|
||||
-- -----------------------------------------------
|
||||
|
||||
seq_print_core_inst : entity work.generic_sequencer_15
|
||||
generic map(
|
||||
SEQ_DEPTH => 512,
|
||||
BUS_WIDTH => SEQ_BUS_WIDTH,
|
||||
VECTOR_WIDTH => 19,
|
||||
TRIGGER_WIDTH => 2,
|
||||
|
|
@ -561,14 +425,14 @@ begin
|
|||
avs_csr_read => avs_csr_read_seq_print,
|
||||
avs_csr_readdata => avs_csr_rdata_seq_print,
|
||||
|
||||
avs_seq_address => avs_seq_address(8 downto 0),
|
||||
avs_seq_address => avs_seq_address(7 downto 0),
|
||||
avs_seq_write => avs_seq_write_seq_print,
|
||||
avs_seq_writedata => avs_seq_writedata,
|
||||
avs_seq_read => avs_seq_read_seq_print,
|
||||
avs_seq_readdata => avs_seq_rdata_seq_print_int,
|
||||
|
||||
start_req => print_seq_start,
|
||||
start_addr => print_seq_start_addr,
|
||||
start_req => fire_req_int,
|
||||
start_addr => fire_data,
|
||||
|
||||
trigger_in => print_seq_trig,
|
||||
pos_in => (others => '0'),
|
||||
|
|
@ -615,10 +479,10 @@ begin
|
|||
reset_n => rst_n,
|
||||
|
||||
avs_address => avs_csr_address(3 downto 0),
|
||||
avs_write => delay_queue_write,
|
||||
avs_write => avs_csr_write_dly,
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => delay_queue_read,
|
||||
avs_readdata => delay_queue_readdata,
|
||||
avs_read => avs_csr_read_dly,
|
||||
avs_readdata => avs_csr_rdata_dly,
|
||||
|
||||
-- Incoming signals and packets to be delayed
|
||||
ingress_valid => wave_req,
|
||||
|
|
@ -675,7 +539,7 @@ begin
|
|||
|
||||
busy => wave_seq_busy,
|
||||
|
||||
vector_out => vector_out,
|
||||
vector_out => wave_vector_out,
|
||||
|
||||
bus_data => open,
|
||||
bus_valid => open,
|
||||
|
|
@ -684,83 +548,62 @@ begin
|
|||
|
||||
avs_seq_rdata_seq_wave <= avs_seq_rdata_seq_wave_int when avs_seq_read_seq_wave_dly = '1' else (others => '0');
|
||||
|
||||
-- Allow firing of data core from CPU if requested, else comes from the wave sequencer.
|
||||
seq_start_req_int <= cpu_data_start or (seq_data_valid and seq_data_config(START_DLY_REQ_BIT) and not seq_data_config(SEQ_BURST_WORD2_BIT));
|
||||
seq_start_req_first_int <= (cpu_data_start and cpu_data_start_first) or seq_data_config(START_DLY_FIRST_BIT);
|
||||
seq_start_req_last_int <= (cpu_data_start and cpu_data_start_last) or seq_data_config(START_DLY_LAST_BIT);
|
||||
seq_start_delay_int <= "00" & cpu_start_dly_head when cpu_data_start = '1' else seq_data_config(START_DLY_BITS);
|
||||
|
||||
seq_gl_map_update <= seq_data_valid and seq_data_config(GL_REMAP_UPDATE_BIT) and not seq_data_config(SEQ_BURST_WORD2_BIT);
|
||||
seq_fp_holdoff_update <= seq_data_valid and seq_data_config(SEQ_BURST_WORD2_BIT);
|
||||
|
||||
-- -----------------------------------------------
|
||||
-- Instantiate the data core
|
||||
-- -----------------------------------------------
|
||||
|
||||
data_core_1 : entity work.data_core
|
||||
generic map(
|
||||
MAX_BPP => MAX_BPP,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH,
|
||||
DELAY_WIDTH => START_DLY_WIDTH,
|
||||
NO_ZERO_GAP => NO_ZERO_GAP,
|
||||
EN_PEEK => EN_PEEK,
|
||||
NUM_CHANS => NUM_CHANS
|
||||
DELAY_WIDTH => START_DLY_WIDTH
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
pixel_buf_wr => pixel_buf_wr,
|
||||
pixel_buf_wr_data => pixel_buf_wr_data,
|
||||
pixel_buf_rdy => pixel_buf_rdy,
|
||||
pixel_buf_last_word => pixel_buf_last_word,
|
||||
pixel_buf_wr => pixel_buf_wr,
|
||||
pixel_buf_wr_data => pixel_buf_wr_data,
|
||||
pixel_buf_rdy => pixel_buf_rdy,
|
||||
|
||||
pixel_buf_wr_aux => pixel_buf_wr_aux,
|
||||
pixel_buf_wr_data_aux => pixel_buf_wr_data_aux,
|
||||
pixel_buf_rdy_aux => pixel_buf_rdy_aux,
|
||||
pixel_buf_last_word_aux => pixel_buf_last_word_aux,
|
||||
chan_en => chan_en,
|
||||
bpp_mode => bpp_mode,
|
||||
print_data_width => print_data_width,
|
||||
clear_buffer => clear_buffer,
|
||||
|
||||
en_dual_data_path => en_dual_data_path,
|
||||
chan_en => chan_en,
|
||||
bpp_mode => bpp_mode,
|
||||
print_data_width => print_data_width,
|
||||
clear_buffer => clear_buffer,
|
||||
fire_req => fire_req,
|
||||
sequencers_busy => sequencers_busy,
|
||||
fp_holdoff_update => seq_fp_holdoff_update,
|
||||
wave_seq_len => seq_data_config(15 downto 0),
|
||||
|
||||
fire_req => fire_req,
|
||||
fire_req_start_merge => fire_req_start_merge_int,
|
||||
drop_stripe => drop_stripe,
|
||||
sequencers_busy => sequencers_busy,
|
||||
px_buf_ch_nactive => px_buf_ch_nactive,
|
||||
fp_holdoff_update => seq_fp_holdoff_update,
|
||||
seq_data_config => seq_data_config(15 downto 0),
|
||||
cpu_gl_map => cpu_gl_map,
|
||||
cpu_gl_map_en => cpu_gl_map_en,
|
||||
|
||||
cpu_gl_map => cpu_gl_map,
|
||||
cpu_gl_map_en => cpu_gl_map_en,
|
||||
empty => empty,
|
||||
full => full,
|
||||
underrun => underrun,
|
||||
overrun => overrun,
|
||||
dbl_drop => dbl_drop,
|
||||
fp_drop => fp_drop,
|
||||
|
||||
empty => empty,
|
||||
full => full,
|
||||
underrun => underrun,
|
||||
overrun => overrun,
|
||||
dbl_drop => dbl_drop,
|
||||
overlap_error => overlap_error,
|
||||
fp_drop => fp_drop,
|
||||
seq_start_req => seq_start_req_int,
|
||||
seq_start_first_pulse => seq_start_req_first_int,
|
||||
seq_start_last_pulse => seq_start_req_last_int,
|
||||
seq_start_delay => seq_start_delay_int,
|
||||
|
||||
seq_start_req => seq_start_req_int,
|
||||
seq_start_first_pulse => seq_start_first_pulse_int,
|
||||
seq_start_last_pulse => seq_start_last_pulse_int,
|
||||
seq_gl_map => seq_data_config(GL_REMAP_BITS),
|
||||
seq_gl_map_update => seq_gl_map_update,
|
||||
|
||||
seq_gl_map => seq_data_config(GL_REMAP_BITS),
|
||||
seq_gl_map_update => seq_gl_map_update,
|
||||
print_data => print_data_i,
|
||||
print_clk => print_clk_i,
|
||||
|
||||
all_on => '0',
|
||||
|
||||
print_data => print_data_i,
|
||||
print_clk => print_clk_i,
|
||||
|
||||
diag_peek_sel => diag_peek_sel,
|
||||
diag_peek_addr => diag_peek_addr,
|
||||
diag_peek_data => diag_peek_data,
|
||||
diag_peek_rdptr => diag_peek_rdptr,
|
||||
diag_peek_wrptr => diag_peek_wrptr,
|
||||
diag_peek_wdata => diag_peek_wdata,
|
||||
diag_peek_wr => diag_peek_wr,
|
||||
|
||||
diag_fire_req_count => diag_fire_req_count,
|
||||
diag_fire_simg_count => diag_fire_simg_count,
|
||||
diag_last_stripe_count => diag_last_stripe_count,
|
||||
diag_word_count => diag_word_count
|
||||
diag_word_count => diag_word_count
|
||||
|
||||
);
|
||||
|
||||
|
|
@ -796,4 +639,4 @@ begin
|
|||
|
||||
end process;
|
||||
|
||||
end rtl;
|
||||
end rtl;
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief Pulse width modulator
|
||||
--! @brief PWM with specifiable perio (in clk ticks), and control granularity of 1/256
|
||||
--!
|
||||
--! @details PWM with specifiable period (in clk ticks), and control granularity of 1/256
|
||||
--! @details See
|
||||
--! https://confluence.gisapps.co.uk/pages/viewpage.action?spaceKey=GMAHMB&title=HMB-FD-GMA+Design+Documentation
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li clk : nominally 100MHz
|
||||
|
|
@ -20,14 +21,17 @@
|
|||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2020 Global Inkjet Systems
|
||||
--! @date 2020-3-20
|
||||
--! @copyright (c) 2018 Global Inkjet Systems
|
||||
--! @date 2018-9-20
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pkg_functions.all;
|
||||
|
||||
entity pwm is
|
||||
port(
|
||||
|
|
@ -65,11 +69,13 @@ begin
|
|||
elsif clk'event and clk = '1' then
|
||||
|
||||
-- If the phase count reaches 1/256th of period, reset to 0 and increment the phase number
|
||||
if unsigned(phase_count) = (unsigned(period_div256) - 1) then
|
||||
phase_count <= (others => '0');
|
||||
phase <= std_logic_vector(unsigned(phase) + 1);
|
||||
else
|
||||
phase_count <= std_logic_vector(unsigned(phase_count) + 1);
|
||||
if unsigned(mod_val) /= 0 then
|
||||
if unsigned(phase_count) = (unsigned(period_div256) - 1) then
|
||||
phase_count <= (others => '0');
|
||||
phase <= std_logic_vector(unsigned(phase) + 1);
|
||||
else
|
||||
phase_count <= std_logic_vector(unsigned(phase_count) + 1);
|
||||
end if;
|
||||
end if;
|
||||
|
||||
-- If the phase number is less than the specified modulation value, set
|
||||
|
|
|
|||
|
|
@ -510,10 +510,10 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to hps_sdio_D7
|
|||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to hps_sdio_CLK
|
||||
|
||||
# I2C
|
||||
set_location_assignment PIN_C19 -to SDA_APP
|
||||
set_location_assignment PIN_A21 -to SDA_SOM
|
||||
set_location_assignment PIN_B16 -to SCL_APP
|
||||
set_location_assignment PIN_K18 -to SCL_SOM
|
||||
set_location_assignment PIN_C19 -to SDA_SOM
|
||||
set_location_assignment PIN_A21 -to SDA_APP
|
||||
set_location_assignment PIN_B16 -to SCL_SOM
|
||||
set_location_assignment PIN_K18 -to SCL_APP
|
||||
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SCL_SOM
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDA_SOM
|
||||
|
|
|
|||
|
|
@ -315,7 +315,6 @@
|
|||
internal="hps_0.spim0_sclk_out"
|
||||
type="clock"
|
||||
dir="start" />
|
||||
<interface name="i2c" internal="core_0.i2c" type="conduit" dir="end" />
|
||||
<interface name="hv_clk" internal="core_0.hv_clk" type="conduit" dir="end" />
|
||||
<interface name="lvds_rx" internal="core_0.lvds_rx" />
|
||||
<interface name="lvds_tx" internal="core_0.lvds_tx" type="conduit" dir="end" />
|
||||
|
|
|
|||
|
|
@ -26,8 +26,4 @@ set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_0|altera_pll
|
|||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_0|altera_pll_i|general[1].gpll~PLL_OUTPUT_COUNTER|divclk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_1|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|hps_0|fpga_interfaces|peripheral_spim0|sclk_out}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|hps_0|fpga_interfaces|peripheral_i2c1|out_clk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
|
||||
# False path from I2C clock to out to back in again
|
||||
set_false_path -from {top_system_1|hps_0|fpga_interfaces|peripheral_i2c0|out_clk} -to {top_system:top_system_1|core:core_0|i2c_stat_d[*]}
|
||||
set_false_path -from {top_system_1|hps_0|fpga_interfaces|peripheral_i2c1|out_clk} -to {top_system:top_system_1|core:core_0|i2c_stat_d[*]}
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|hps_0|fpga_interfaces|peripheral_i2c1|out_clk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
###################################################################
|
||||
# Makefile for SoM logic synthesis
|
||||
#
|
||||
# Copyright (c) 2020 Global Inkjet Systems
|
||||
#
|
||||
###################################################################
|
||||
|
||||
SYSTOPNAME = top
|
||||
HPSNAME = hps_0
|
||||
|
||||
OPFILEDIR = output_files
|
||||
QPFFILE = ${SYSTOPNAME}.qpf
|
||||
QSYSFILE = ${SYSTOPNAME}_system.qsys
|
||||
|
||||
FPGATYPE = "Cyclone V"
|
||||
FPGAPART = 5CSEBA4U23C7
|
||||
|
||||
MAKE_EXE = mingw32-make
|
||||
|
||||
all: autobuild hps synth
|
||||
|
||||
${SYSTOPNAME}_system.sopcinfo:
|
||||
@qsys-generate ${QSYSFILE} --synthesis=VHDL --output-directory=${SYSTOPNAME} --family=${FPGATYPE} --part=${FPGAPART}
|
||||
|
||||
${HPSNAME}.h: ${SYSTOPNAME}_system.sopcinfo
|
||||
@bash -c "sopc-create-header-files ${SYSTOPNAME}_system.sopcinfo --single ${HPSNAME}.h --module ${HPSNAME}"
|
||||
|
||||
synth: ${SYSTOPNAME}_system.sopcinfo
|
||||
@quartus_sh --flow compile ${QPFFILE}
|
||||
@cat ${OPFILEDIR}/${SYSTOPNAME}.sta.rpt | grep "Info" | grep -v "Worst case slack is "
|
||||
|
||||
qsys : ${SYSTOPNAME}_system.sopcinfo
|
||||
hps: ${HPSNAME}.h
|
||||
|
||||
.PHONY: autobuild
|
||||
autobuild:
|
||||
@${MAKE_EXE} -C ..\src\test autobuild
|
||||
|
||||
clean:
|
||||
@${MAKE_EXE} -C ..\src\test clean
|
||||
@rm -rf .qsys_edit db hps_isw_handoff incremental_db ${SYSTOPNAME} c5_pin_model_dump.txt *.csv *.qws *.sopcinfo
|
||||
@rm -rf ${OPFILEDIR}/*.rpt \
|
||||
${OPFILEDIR}/*.done \
|
||||
${OPFILEDIR}/*.smsg \
|
||||
${OPFILEDIR}/*.summary \
|
||||
${OPFILEDIR}/*.jdi \
|
||||
${OPFILEDIR}/*.pin \
|
||||
${OPFILEDIR}/*.rbf \
|
||||
${OPFILEDIR}/*.sof \
|
||||
${OPFILEDIR}/*.sld
|
||||
@rm -rf ${HPSNAME}.h
|
||||
|
|
@ -26,9 +26,9 @@
|
|||
# Notes:
|
||||
#
|
||||
# 1) The default values for assignments are stored in the file:
|
||||
# top_assignment_defaults.qdf
|
||||
# top_assignment_defaults.qdf
|
||||
# If this file doesn't exist, see file:
|
||||
# assignment_defaults.qdf
|
||||
# assignment_defaults.qdf
|
||||
#
|
||||
# 2) Altera recommends that you do not modify this file. This
|
||||
# file is updated automatically by the Quartus Prime software
|
||||
|
|
@ -42,7 +42,7 @@ set_global_assignment -name DEVICE 5CSEBA4U23C7
|
|||
set_global_assignment -name TOP_LEVEL_ENTITY top
|
||||
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 16.0.0
|
||||
set_global_assignment -name PROJECT_CREATION_TIME_DATE "12:02:26 MAY 23, 2017"
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "18.1.0 SP0.18std Standard Edition"
|
||||
set_global_assignment -name LAST_QUARTUS_VERSION "18.1.0 Standard Edition"
|
||||
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
|
||||
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
|
||||
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
|
||||
|
|
@ -184,7 +184,6 @@ set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[11]
|
|||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[12] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[13] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[14] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[15] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[1] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[2] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name IO_STANDARD "SSTL-15 CLASS I" -to memory_mem_a[3] -tag __hps_sdram_p0
|
||||
|
|
@ -312,7 +311,6 @@ set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_
|
|||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[12] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[13] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[14] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[15] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[1] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[2] -tag __hps_sdram_p0
|
||||
set_instance_assignment -name CURRENT_STRENGTH_NEW "MAXIMUM CURRENT" -to memory_mem_a[3] -tag __hps_sdram_p0
|
||||
|
|
@ -338,7 +336,6 @@ set_location_assignment PIN_A25 -to memory_mem_ras_n
|
|||
set_location_assignment PIN_G25 -to memory_mem_ba[2]
|
||||
set_location_assignment PIN_H25 -to memory_mem_ba[1]
|
||||
set_location_assignment PIN_A27 -to memory_mem_ba[0]
|
||||
set_location_assignment PIN_F24 -to memory_mem_a[15]
|
||||
set_location_assignment PIN_G23 -to memory_mem_a[14]
|
||||
set_location_assignment PIN_C24 -to memory_mem_a[13]
|
||||
set_location_assignment PIN_D24 -to memory_mem_a[12]
|
||||
|
|
@ -494,10 +491,10 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to hps_sdio_D7
|
|||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to hps_sdio_CLK
|
||||
|
||||
# I2C
|
||||
set_location_assignment PIN_C19 -to SDA_APP
|
||||
set_location_assignment PIN_A21 -to SDA_SOM
|
||||
set_location_assignment PIN_B16 -to SCL_APP
|
||||
set_location_assignment PIN_K18 -to SCL_SOM
|
||||
set_location_assignment PIN_C19 -to SDA_SOM
|
||||
set_location_assignment PIN_A21 -to SDA_APP
|
||||
set_location_assignment PIN_B16 -to SCL_SOM
|
||||
set_location_assignment PIN_K18 -to SCL_APP
|
||||
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SCL_SOM
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDA_SOM
|
||||
|
|
@ -834,4 +831,4 @@ set_global_assignment -name SDC_FILE ./top_system_timing.sdc
|
|||
set_global_assignment -name CDF_FILE ./output_files/Chain1.cdf
|
||||
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS ON
|
||||
set_global_assignment -name NUM_PARALLEL_PROCESSORS 5
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
description=""
|
||||
tags=""
|
||||
categories="System" />
|
||||
<parameter name="bonusData"><![CDATA[bonusData
|
||||
<parameter name="bonusData"><![CDATA[bonusData
|
||||
{
|
||||
element clk_0
|
||||
{
|
||||
|
|
@ -315,7 +315,6 @@
|
|||
internal="hps_0.spim0_sclk_out"
|
||||
type="clock"
|
||||
dir="start" />
|
||||
<interface name="i2c" internal="core_0.i2c" type="conduit" dir="end" />
|
||||
<interface name="hv_clk" internal="core_0.hv_clk" type="conduit" dir="end" />
|
||||
<interface name="lvds_rx" internal="core_0.lvds_rx" />
|
||||
<interface name="lvds_tx" internal="core_0.lvds_tx" type="conduit" dir="end" />
|
||||
|
|
@ -350,10 +349,8 @@
|
|||
<parameter name="LVDS_TX_CHANS" value="16" />
|
||||
<parameter name="MAX_HEADS" value="4" />
|
||||
<parameter name="MAX_OP_WIDTH" value="32" />
|
||||
<parameter name="NO_ZERO_GAP" value="true" />
|
||||
<parameter name="NUM_DDR" value="1" />
|
||||
<parameter name="NUM_HEADS" value="4" />
|
||||
<parameter name="SEB_EPD_ENABLE" value="true" />
|
||||
<parameter name="NUM_LVDS_DDR" value="1" />
|
||||
<parameter name="NUM_LVDS_RX_PIO" value="1" />
|
||||
<parameter name="NUM_LVDS_TX_PIO" value="30" />
|
||||
|
|
@ -365,7 +362,6 @@
|
|||
<parameter name="TRIGGER_WIDTH" value="16" />
|
||||
<parameter name="TX_SERDES_RATIO" value="7" />
|
||||
<parameter name="VECTOR_WIDTH" value="18" />
|
||||
<parameter name="STREAMER_LOGGER" value="false" />
|
||||
</module>
|
||||
<module
|
||||
name="generic_versioning_0"
|
||||
|
|
@ -609,7 +605,7 @@
|
|||
<parameter name="MEM_NUMBER_OF_RANKS_PER_DIMM" value="1" />
|
||||
<parameter name="MEM_PD" value="DLL off" />
|
||||
<parameter name="MEM_RANK_MULTIPLICATION_FACTOR" value="1" />
|
||||
<parameter name="MEM_ROW_ADDR_WIDTH" value="16" />
|
||||
<parameter name="MEM_ROW_ADDR_WIDTH" value="15" />
|
||||
<parameter name="MEM_RTT_NOM" value="RZQ/6" />
|
||||
<parameter name="MEM_RTT_WR" value="Dynamic ODT off" />
|
||||
<parameter name="MEM_SRT" value="Normal" />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ create_clock -name LVDS_TX_SER_CLK -period 10.00 [get_ports TX_P[16]]
|
|||
|
||||
derive_pll_clocks
|
||||
|
||||
# The fire pulse manager receiver clock is asynchronous to the system clock
|
||||
# The fire pulse manager receiver clock is asynchronous to the system clock
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_0|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}] -group [get_clocks {top_system_1|pll_1|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}]
|
||||
|
||||
create_clock -period 1000.0 -name virtual_ext_clk_1MHz ; # This is a virtual clock, because it's not relative to any internal clock
|
||||
|
|
@ -26,19 +26,4 @@ set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_0|altera_pll
|
|||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_0|altera_pll_i|general[1].gpll~PLL_OUTPUT_COUNTER|divclk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|pll_1|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|hps_0|fpga_interfaces|peripheral_spim0|sclk_out}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|hps_0|fpga_interfaces|peripheral_i2c1|out_clk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
|
||||
# False path from I2C clock to out to back in again
|
||||
set_false_path -from {top_system_1|hps_0|fpga_interfaces|peripheral_i2c0|out_clk} -to {top_system:top_system_1|core:core_0|i2c_stat_d[*]}
|
||||
set_false_path -from {top_system_1|hps_0|fpga_interfaces|peripheral_i2c1|out_clk} -to {top_system:top_system_1|core:core_0|i2c_stat_d[*]}
|
||||
|
||||
set quartus_exe $::TimeQuestInfo(nameofexecutable)
|
||||
|
||||
if { $quartus_exe == "quartus_fit" } {
|
||||
|
||||
post_message -type info "Over constraining hold"
|
||||
|
||||
set_clock_uncertainty 0.30 -add -hold -enable_same_physical_edge \
|
||||
-from [get_clocks {top_system_1|pll_0|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}] -to [get_clocks {top_system_1|pll_0|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}]
|
||||
}
|
||||
|
||||
set_clock_groups -asynchronous -group [get_clocks {top_system_1|hps_0|fpga_interfaces|peripheral_i2c1|out_clk}] -group [get_clocks {virtual_ext_clk_1MHz}]
|
||||
|
|
@ -491,10 +491,10 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to hps_sdio_D7
|
|||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to hps_sdio_CLK
|
||||
|
||||
# I2C
|
||||
set_location_assignment PIN_C19 -to SDA_APP
|
||||
set_location_assignment PIN_A21 -to SDA_SOM
|
||||
set_location_assignment PIN_B16 -to SCL_APP
|
||||
set_location_assignment PIN_K18 -to SCL_SOM
|
||||
set_location_assignment PIN_C19 -to SDA_SOM
|
||||
set_location_assignment PIN_A21 -to SDA_APP
|
||||
set_location_assignment PIN_B16 -to SCL_SOM
|
||||
set_location_assignment PIN_K18 -to SCL_APP
|
||||
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SCL_SOM
|
||||
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to SDA_SOM
|
||||
|
|
|
|||
|
|
@ -315,7 +315,6 @@
|
|||
internal="hps_0.spim0_sclk_out"
|
||||
type="clock"
|
||||
dir="start" />
|
||||
<interface name="i2c" internal="core_0.i2c" type="conduit" dir="end" />
|
||||
<interface name="hv_clk" internal="core_0.hv_clk" type="conduit" dir="end" />
|
||||
<interface name="lvds_rx" internal="core_0.lvds_rx" />
|
||||
<interface name="lvds_tx" internal="core_0.lvds_tx" type="conduit" dir="end" />
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue