Commit 14d02b13 authored by Javier Serrano's avatar Javier Serrano
Browse files

Added "Saturation Control ON/OFF" control bit


git-svn-id: svn+ssh://svn.cern.ch/reps/acc-fpga/trunk2@700 0a99fbf0-06a5-4c52-8a11-fe70044ee989
parent 18a83d84
......@@ -494,6 +494,7 @@ COMPONENT commands
FwdSwitch : OUT std_logic;
OutSwitch : OUT std_logic;
MainLoopSwitch : OUT std_logic;
SatDisabled: out std_logic;
DoAcquisition : OUT std_logic;
ConfigMode : OUT std_logic;
CONTROLR : OUT std_logic_vector(15 downto 0);
......@@ -567,6 +568,7 @@ signal ram1OEAux, ram1CSAux, ram1WEAux, iqSel1Aux: std_logic;
signal saturated, badlySaturated: std_logic;
signal cavIFixed, cavQFixed: std_logic_vector(13 downto 0);
signal cavIToMod, cavQToMod: std_logic_vector(13 downto 0);
signal satDisabled: std_logic;
begin
......@@ -818,6 +820,7 @@ U0_commands: commands PORT MAP(
FwdSwitch => fwdSwitch,
OutSwitch => outSwitch,
MainLoopSwitch => mainLoopSwitch,
SatDisabled => satDisabled,
DoAcquisition => doAcquisition,
ConfigMode => configMode,
CONTROLR => registers(CONTROLR),
......@@ -1047,8 +1050,10 @@ U0_satcontrol: satcontrol PORT MAP(
Qout => cavQFixed
);
cavIToMod <= cavIFF when (saturated='0' or mainLoopSwitch='1') else cavIFixed;
cavQToMod <= cavQFF when (saturated='0' or mainLoopSwitch='1') else cavQFixed;
cavIToMod <= cavIFF when (saturated='0' or mainLoopSwitch='1' or
(saturated='1' and satDisabled='1')) else cavIFixed;
cavQToMod <= cavQFF when (saturated='0' or mainLoopSwitch='1' or
(saturated='1' and satDisabled='1')) else cavQFixed;
U0_iqmodulator: iqmodulator PORT MAP(
resetna => ResetNA,
......
......@@ -17,6 +17,7 @@ entity Commands is
FwdSwitch : out std_logic;
OutSwitch : out std_logic;
MainLoopSwitch : out std_logic;
SatDisabled: out std_logic;
DoAcquisition: out std_logic; -- Check the state of this signal at RFOnRising time to decide whether to make acquisition or not.
ConfigMode: out std_logic;
CONTROLR : out std_logic_vector(15 downto 0);
......@@ -40,6 +41,7 @@ MainLoopSwitch <= softSwitchAux(0);
SWITCHCTRLR <= switchCtrlAux;
SOFTSWITCHR <= softSwitchAux;
CONTROLR <= controlAux;
SatDisabled <= controlAux(3);
ConfigMode <= not controlAux(0);
STATUSR <= X"000" & '0' & rfOnToggle & FProtect & controlAux(0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment