Commit 4f9bd553 authored by Paolo Baesso's avatar Paolo Baesso

Changed default CONF file name path to be relative. Fixed bug with DAC internal…

Changed default CONF file name path to be relative. Fixed bug with DAC internal threshold. Added monitor for triggering.
parent 9cecc3db
......@@ -6,6 +6,7 @@
/Enclustra_tests/
/TLU_v1e/scripts/datafiles
/Data/*
.Xil/
*.pyc
.svn/*
*.jou
......
......@@ -114,11 +114,15 @@ ARCHITECTURE rtl OF DUTInterfaces IS
signal s_DUT_interface_mode_modifier : std_logic_vector((2*g_NUM_DUTS)-1 downto 0) := (others => '1');
signal s_IgnoreShutterVeto : std_logic := '0'; -- --! When high the shutter won't veto triggers when low.
signal s_SPILL_delay : std_logic_vector(31 downto 0) := (others => '0');
signal s_SPILL_wait : std_logic_vector(31 downto 0) := (others => '0');
signal s_SPILL_width : std_logic_vector(31 downto 0) := (others => '0');
-- Signal for IPBus
constant c_N_CTRL : positive := 8;
constant c_N_STAT : positive := 8;
constant c_N_CTRL : positive := 9;
constant c_N_STAT : positive := 9;
signal s_status_to_ipbus, s_sync_status_to_ipbus : ipb_reg_v(c_N_STAT-1 downto 0);
signal s_control_from_ipbus,s_sync_control_from_ipbus : ipb_reg_v(c_N_CTRL-1 downto 0);
......@@ -170,6 +174,7 @@ BEGIN
s_DUT_interface_mode <= s_sync_control_from_ipbus(3)((2*g_NUM_DUTS)-1 downto 0);
s_DUT_interface_mode_modifier <= s_sync_control_from_ipbus(4)((2*g_NUM_DUTS)-1 downto 0);
-- Map the status registers
s_status_to_ipbus(0) <= std_logic_vector(to_unsigned(0,g_IPBUS_WIDTH-g_NUM_DUTS)) & s_DUT_mask;
s_status_to_ipbus(1) <= std_logic_vector(to_unsigned(0,g_IPBUS_WIDTH-g_NUM_DUTS)) & s_DUT_ignore_busy;
......
......@@ -42,7 +42,7 @@ class TLU:
self.VrefExt= parsed_cfg.getfloat(section_name, "VRefExt")
#self.intRefOn= False #Internal reference is OFF by default
self.intRefOn= bool(parsed_cfg.get(section_name, "intRefOn"))
self.intRefOn= int(parsed_cfg.get(section_name, "intRefOn"))
self.fwVersion = self.hw.getNode("version").read()
......
......@@ -51,7 +51,7 @@ class MyPrompt(cmd.Cmd):
(without quotation marks)"""
print "==== COMMAND RECEIVED: PARSE CONFIG"
#self.testme()
parsed_cfg= self.open_cfg_file(args, "/users/phpgb/workspace/myFirmware/AIDA/TLU_v1e/scripts/localConf.conf")
parsed_cfg= self.open_cfg_file(args, "./localConf.conf")
try:
theID = parsed_cfg.getint("Producer.fmctlu", "confid")
print "\t", theID
......@@ -69,10 +69,11 @@ class MyPrompt(cmd.Cmd):
"""Interrogates the TLU and prints the number of triggers seen by the input discriminators"""
TLU.getChStatus()
TLU.getAllChannelsCounts()
TLU.getPostVetoTrg()
return
def do_startRun(self, args):
"""Starts the TLU run"""
"""Starts the TLU run. If a number is specified, this number will be appended to the file name as Run_#"""
print "==== COMMAND RECEIVED: STARTING TLU RUN"
#startTLU( uhalDevice = self.hw, pychipsBoard = self.board, writeTimestamps = ( options.writeTimestamps == "True" ) )
arglist = args.split()
......@@ -152,7 +153,12 @@ class MyPrompt(cmd.Cmd):
def do_quit(self, args):
"""Quits the program."""
print "==== COMMAND RECEIVED: QUITTING TLU CONSOLE"
#raise SystemExit
if TLU.isRunning:
TLU.isRunning= False
TLU.stop(False, False)
self.root_file.Write()
self.root_file.Close()
print "Terminating run"
return True
def testme(self):
......
Markdown is supported
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