Ignore:
Timestamp:
07/16/10 16:25:44 (14 years ago)
Author:
dneise
Message:
DRS addresses may not be set via
sa 44 0 .. 31
File:
1 edited

Legend:

Unmodified
Added
Removed
  • FPGA/FAD/stable/FACT_FAD/FACT_FAD_lib/hdl/control_manager_beha.vhd

    r246 r252  
    3636      ram_write_en      : OUT    std_logic_vector (0 DOWNTO 0);
    3737      dac_array         : OUT    dac_array_type;
    38       roi_array         : OUT    roi_array_type
     38      roi_array         : OUT    roi_array_type;
     39      drs_address       : OUT    std_logic_vector (3 DOWNTO 0);
     40      drs_address_mode  : OUT    std_logic
    3941   );
    4042
     
    5355  signal int_dac_array : dac_array_type := DEFAULT_DAC;
    5456  signal int_roi_array : roi_array_type := DEFAULT_ROI;
     57  signal int_drs_address: std_logic_vector (3 DOWNTO 0) := DEFAULT_DRSADDR;
     58  signal int_drs_address_mode: std_logic := DEFAULT_DRSADDR_MODE;
    5559
    5660BEGIN
     
    6670       
    6771        when CTRL_INIT =>
     72          -- WRITES DEFAULT VALUES IN config ram
    6873          addr_cntr <= addr_cntr + 1;
    6974          ram_addr <= conv_std_logic_vector(addr_cntr, ADDR_WIDTH);
     
    7681          elsif (addr_cntr < NO_OF_ROI + NO_OF_DAC) then
    7782            ram_data_in <= conv_std_logic_vector(int_dac_array(addr_cntr - NO_OF_ROI), 16);
     83          elsif (addr_cntr < NO_OF_ROI + NO_OF_DAC + 1) then
     84            ram_data_in <=  "0000" & "0000"
     85                            & "000" & conv_std_logic_vector(int_drs_address_mode, 1)
     86                            & int_drs_address;
    7887          else
    7988            ram_write_en <= "0";
     
    8291     
    8392        when CTRL_IDLE =>
     93          --
    8494          addr_cntr <= 0;
    8595          ram_write_en <= "0";
     
    119129            dac_array(addr_cntr - NO_OF_ROI) <= conv_integer(ram_data_out);
    120130            ctrl_state <= CTRL_LOAD_ADDR;
    121           else
     131          elsif (addr_cntr < NO_OF_ROI + NO_OF_DAC + 1) then
     132             drs_address <= ram_data_out(3 downto 0);
     133             drs_address_mode <= ram_data_out(4);
     134             ctrl_state <= CTRL_LOAD_ADDR;
     135          else
    122136            addr_cntr <= 0;
    123137            config_started <= '0';
Note: See TracChangeset for help on using the changeset viewer.