HMBHMBSI1531-36 removed the shared variable from dpram_sclk. Small changes to fpm top level
This commit is contained in:
parent
2ccbfa8371
commit
6dea2bf4d6
2 changed files with 44 additions and 50 deletions
|
|
@ -6,7 +6,7 @@
|
|||
-- Author : GMG
|
||||
-- Company : Global Inkjet Systems
|
||||
-- Created : 2018-04-24
|
||||
-- Last update: 2019-03-12
|
||||
-- Last update: 2019-11-15
|
||||
-- SVN ID : Git
|
||||
-- Standard : VHDL'2008
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
@ -45,31 +45,23 @@ architecture rtl of dpram_sclk is
|
|||
subtype word_t is std_logic_vector(WIDTH-1 downto 0);
|
||||
type memory_t is array(DEPTH-1 downto 0) of word_t;
|
||||
|
||||
-- Declare the RAM
|
||||
shared variable ram : memory_t;
|
||||
|
||||
begin
|
||||
|
||||
-- Port A
|
||||
pPORT_A : process(clk)
|
||||
pRAM : process(clk)
|
||||
variable ram : memory_t;
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
-- Port A
|
||||
if(we_a = '1') then
|
||||
ram(to_integer(unsigned(addr_a))) := data_a;
|
||||
end if;
|
||||
q_a <= ram(to_integer(unsigned(addr_a)));
|
||||
end if;
|
||||
end process pPORT_A;
|
||||
|
||||
-- Port B
|
||||
pPORT_B : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
-- Port B
|
||||
if(we_b = '1') then
|
||||
ram(to_integer(unsigned(addr_b))) := data_b;
|
||||
end if;
|
||||
q_b <= ram(to_integer(unsigned(addr_b)));
|
||||
end if;
|
||||
end process pPORT_B;
|
||||
end process pRAM;
|
||||
|
||||
end rtl;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
-- Author : Gianmarco Girau
|
||||
-- Company : Global Inkjet Systems
|
||||
-- Created : 2017-09-06
|
||||
-- Last update: 2019-11-14
|
||||
-- Last update: 2019-11-15
|
||||
-- SVN ID : Git
|
||||
-- Standard : VHDL'08
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
@ -23,15 +23,17 @@ use work.fire_pulse_4_pkg.all;
|
|||
|
||||
entity fire_pulse_manager_4 is
|
||||
generic (
|
||||
CH_NUM : integer := 4; -- number of Pulse-Generator blocks
|
||||
ADD_SMB_DIAG : boolean := false; -- Instantiate SMB Diagnostic block
|
||||
ADD_EVENT_LOGGER : boolean := false; -- Instantiate Event-Logger block
|
||||
LOG_FIFO_SIZE : natural range 256 to 4096 := 1024;
|
||||
POF_PROT_VER : natural range 0 to 1 := 0; -- POF-Protocol Versions:
|
||||
-- 0 => Standard, 1 => Add Print-Start
|
||||
TOF_COMP_EN : boolean := false;
|
||||
PIXEL_PITCH_CORR_EN : boolean := false;
|
||||
OUT_PULSE_CONDITION : boolean := true);
|
||||
CH_NUM : integer := 4; -- number of Pulse-Generator blocks
|
||||
PD_QUEUE_SIZE : natural := 512;
|
||||
ADD_SMB_DIAG : boolean := false; -- Instantiate SMB Diagnostic block
|
||||
ADD_EVENT_LOGGER : boolean := false; -- Instantiate Event-Logger block
|
||||
LOG_FIFO_SIZE : natural range 256 to 4096 := 1024;
|
||||
POF_PROT_VER : natural range 0 to 1 := 0; -- POF-Protocol Versions:
|
||||
-- 0 => Standard, 1 => Add Print-Start
|
||||
PULSE_DELAY_EQUAL_EN : boolean := false;
|
||||
TOF_COMP_EN : boolean := false;
|
||||
PIXEL_PITCH_CORR_EN : boolean := false;
|
||||
OUT_PULSE_CONDITION : boolean := true);
|
||||
port(
|
||||
reset_n : in std_logic;
|
||||
clk : in std_logic; -- 100MHz
|
||||
|
|
@ -48,9 +50,9 @@ entity fire_pulse_manager_4 is
|
|||
-- on header J7
|
||||
-- Interrupt Senders
|
||||
ins_fpm_irq_0 : out std_logic;
|
||||
ins_fpm_irq_1 : out std_logic; -- @suppress "Unused port: ins_fpm_irq_1 is not used in work.fire_pulse_manager_1(rtl)"
|
||||
ins_fpm_irq_2 : out std_logic; -- @suppress "Unused port: ins_fpm_irq_2 is not used in work.fire_pulse_manager_1(rtl)"
|
||||
ins_fpm_irq_3 : out std_logic; -- @suppress "Unused port: ins_fpm_irq_3 is not used in work.fire_pulse_manager_1(rtl)"
|
||||
ins_fpm_irq_1 : out std_logic; -- @suppress "Unused port: ins_fpm_irq_1 is not used in work.fire_pulse_manager_4(rtl)"
|
||||
ins_fpm_irq_2 : out std_logic; -- @suppress "Unused port: ins_fpm_irq_2 is not used in work.fire_pulse_manager_4(rtl)"
|
||||
ins_fpm_irq_3 : out std_logic; -- @suppress "Unused port: ins_fpm_irq_3 is not used in work.fire_pulse_manager_4(rtl)"
|
||||
-- Avalon MM (Slave) Interface
|
||||
avs_address : in std_logic_vector(14 downto 0);
|
||||
avs_write : in std_logic;
|
||||
|
|
@ -62,16 +64,14 @@ end entity fire_pulse_manager_4;
|
|||
|
||||
architecture rtl of fire_pulse_manager_4 is
|
||||
|
||||
constant PD_QUEUE_SIZE : natural := 512;
|
||||
|
||||
-- Period used for Time-of-Flight compensation velocity measurememnt
|
||||
constant VEL_MEAS_PERIOD : natural := 10000;
|
||||
|
||||
constant POF_UART_BIT_BIV : integer := 6; -- POF-Rx UART sampling clock vs
|
||||
-- baudrate ratio
|
||||
|
||||
type diag_cnt_en_t is array (1 to CH_NUM) of boolean;
|
||||
constant DIAG_COUNTER_EN : diag_cnt_en_t := (1 => true, others => false);
|
||||
type diag_cnt_en_t is array (0 to CH_NUM-1) of boolean;
|
||||
constant DIAG_COUNTER_EN : diag_cnt_en_t := (0 => true, others => false);
|
||||
|
||||
signal reset_n_i : std_logic;
|
||||
--
|
||||
|
|
@ -109,8 +109,6 @@ architecture rtl of fire_pulse_manager_4 is
|
|||
--
|
||||
signal enable_rx : std_logic;
|
||||
signal uart_regen_bypass : std_logic;
|
||||
signal upd_max_pos : std_logic;
|
||||
signal upd_min_pos : std_logic;
|
||||
signal max_error_flag : std_logic;
|
||||
signal rx_watchdog : std_logic;
|
||||
signal rx_watchdog_en : std_logic;
|
||||
|
|
@ -127,8 +125,6 @@ architecture rtl of fire_pulse_manager_4 is
|
|||
signal dp_dir : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal set_pos_ie : std_logic;
|
||||
signal enc_pulse : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal enc_pulse_ie : std_logic;
|
||||
signal enc_pulse_pof : std_logic;
|
||||
signal pd_pulse : std_logic;
|
||||
signal pd_pulse_ie : std_logic;
|
||||
signal pd_pulse_pof : std_logic;
|
||||
|
|
@ -237,8 +233,8 @@ begin
|
|||
clk => clk,
|
||||
src_sel => src_sel,
|
||||
uart_regen_bypass => uart_regen_bypass,
|
||||
upd_max_pos => upd_max_pos,
|
||||
upd_min_pos => upd_min_pos,
|
||||
upd_max_pos => open,
|
||||
upd_min_pos => open,
|
||||
enable_rx => enable_rx,
|
||||
uart_bit_div => open,
|
||||
error_rate_thres => error_rate_thres,
|
||||
|
|
@ -321,15 +317,23 @@ begin
|
|||
-- Encoder Speed Detection
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
-- Used for Time-of-Flight Compensation
|
||||
iVEL : entity work.simple_enc_vel_detect_4
|
||||
port map (
|
||||
clk => clk,
|
||||
init => init,
|
||||
step_pos => inc_pos,
|
||||
step_neg => dec_pos,
|
||||
sampling_period => vel_sampling_per(0),
|
||||
vel_meas => vel_meas);
|
||||
gENC_VEL: if TOF_COMP_EN = true generate
|
||||
|
||||
-- Used for Time-of-Flight Compensation
|
||||
iVEL : entity work.simple_enc_vel_detect_4
|
||||
port map (
|
||||
clk => clk,
|
||||
init => init,
|
||||
step_pos => inc_pos,
|
||||
step_neg => dec_pos,
|
||||
sampling_period => vel_sampling_per(0),
|
||||
vel_meas => vel_meas);
|
||||
|
||||
else generate
|
||||
|
||||
vel_meas <= (others => '0');
|
||||
|
||||
end generate gENC_VEL;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Pulse Generator
|
||||
|
|
@ -339,10 +343,10 @@ begin
|
|||
iCH_PG : entity work.pulse_generator_2
|
||||
generic map(
|
||||
PD_QUEUE_SIZE => PD_QUEUE_SIZE,
|
||||
PULSE_DELAY_EQUAL_EN => false,
|
||||
PULSE_DELAY_EQUAL_EN => PULSE_DELAY_EQUAL_EN,
|
||||
OUT_PULSE_CONDITION => OUT_PULSE_CONDITION,
|
||||
OVERDRIVE_CHECK => false,
|
||||
DIAG_COUNTERS => DIAG_COUNTER_EN(i),
|
||||
DIAG_COUNTERS => DIAG_COUNTER_EN(i-1),
|
||||
TOF_COMP_EN => TOF_COMP_EN,
|
||||
PIXEL_PITCH_CORR_EN => PIXEL_PITCH_CORR_EN)
|
||||
port map(
|
||||
|
|
@ -614,6 +618,4 @@ begin
|
|||
avs_readdatavalid => cs_ie_read_valid,
|
||||
avs_readdata => cs_ie_read_data);
|
||||
|
||||
enc_pulse_ie <= inc_pos_ie when dp_dir(0) = '0' else dec_pos_ie;
|
||||
|
||||
end architecture rtl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue