Line 133... |
Line 133... |
signal memwr_out_stb_daq: std_logic;
|
signal memwr_out_stb_daq: std_logic;
|
signal memwr_in_ack_mem: std_logic;
|
signal memwr_in_ack_mem: std_logic;
|
signal memwr_out_cyc_daq: std_logic;
|
signal memwr_out_cyc_daq: std_logic;
|
signal memwr_out_adr: std_logic_vector (13 downto 0);
|
signal memwr_out_adr: std_logic_vector (13 downto 0);
|
signal memwr_in_dat: std_logic_vector (15 downto 0);
|
signal memwr_in_dat: std_logic_vector (15 downto 0);
|
|
signal memwr_out_dat: std_logic_vector (15 downto 0);
|
|
|
-- Outmgr
|
-- Outmgr
|
--signal outmgr_reset: std_logic;
|
--signal outmgr_reset: std_logic;
|
signal outmgr_en: std_logic;
|
signal outmgr_en: std_logic;
|
signal outmgr_load: std_logic;
|
signal outmgr_load: std_logic;
|
Line 205... |
Line 206... |
generic map(
|
generic map(
|
MEM_ADD_WIDTH => 14--: integer := 14
|
MEM_ADD_WIDTH => 14--: integer := 14
|
)
|
)
|
port map(
|
port map(
|
-- to memory
|
-- to memory
|
DAT_O_mem => DAT_O_memw, -- direct
|
DAT_O_mem => memwr_out_dat, -- direct
|
ADR_O_mem => memwr_out_adr,
|
ADR_O_mem => memwr_out_adr,
|
CYC_O_mem => CYC_O_memw, -- direct
|
CYC_O_mem => CYC_O_memw, -- direct
|
STB_O_mem => STB_O_memw, -- direct
|
STB_O_mem => STB_O_memw, -- direct
|
ACK_I_mem => memwr_in_ack_mem, -- direct
|
ACK_I_mem => memwr_in_ack_mem, -- direct
|
WE_O_mem => WE_O_memw, -- direct
|
WE_O_mem => WE_O_memw, -- direct
|
Line 265... |
Line 266... |
MEM_ADD_WIDTH => 14,--: integer := 14;
|
MEM_ADD_WIDTH => 14,--: integer := 14;
|
DATA_WIDTH => 10,--: integer := 10;
|
DATA_WIDTH => 10,--: integer := 10;
|
CHANNELS_WIDTH => 1 --: integer := 4
|
CHANNELS_WIDTH => 1 --: integer := 4
|
)
|
)
|
port map(
|
port map(
|
data_I => DAT_I_daq(9 downto 0),
|
data_I => memwr_out_dat(9 downto 0), -- values beign writed in memory
|
channel_I => chsel_channel,
|
channel_I => memwr_out_dat(10 downto 10),
|
trig_channel_I => reg_trigger_channel,
|
trig_channel_I => reg_trigger_channel,
|
address_I => memwr_out_adr,
|
address_I => memwr_out_adr,
|
final_address_I => reg_buffer_size,
|
final_address_I => reg_buffer_size,
|
offset_I => reg_trigger_offset,
|
offset_I => reg_trigger_offset,
|
level_I => reg_trigger_level,
|
level_I => reg_trigger_level,
|
Line 325... |
Line 326... |
);
|
);
|
|
|
------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------
|
-- Assignments
|
-- Assignments
|
ADR_O_memw <= memwr_out_adr;
|
ADR_O_memw <= memwr_out_adr;
|
|
DAT_O_memw <= memwr_out_dat;
|
|
|
ADR_O_daq <= '0' & chsel_channel(0) when strobe_adc = '0'
|
ADR_O_daq <= '0' & chsel_channel(0) when strobe_adc = '0'
|
else "10";
|
else "10";
|
DAT_O_daq <= dat_to_adc;
|
DAT_O_daq <= dat_to_adc;
|
CYC_O_daq <= strobe_adc or memwr_out_cyc_daq;
|
CYC_O_daq <= strobe_adc or memwr_out_cyc_daq;
|
STB_O_daq <= strobe_adc or memwr_out_stb_daq;
|
STB_O_daq <= strobe_adc or memwr_out_stb_daq;
|
Line 366... |
Line 369... |
|
|
|
|
when ST_RUNNING =>
|
when ST_RUNNING =>
|
|
|
memwr_reset <= '0';
|
memwr_reset <= '0';
|
if reg_trigger_en = '1' and trigger_out_adr = memwr_out_adr then
|
if reg_trigger_en = '1' and trigger_out_adr = memwr_out_adr and trigger_act = '1' then
|
memwr_en <= '0';
|
memwr_en <= '0';
|
else
|
else
|
memwr_en <= '1';
|
memwr_en <= '1';
|
end if;
|
end if;
|
|
|